ScShapeInstancePairLL.cpp(949) : Assertion failed: readIntFlag(WAS_IN_PERSISTENT_EVENT_LIST)

Does anybody know what this error means?

./…/…/SimulationController/src/ScShapeInstancePairLL.cpp(949) : Assertion failed: readIntFlag(WAS_IN_PERSISTENT_EVENT_LIST)

I narrowed it down to happening only in debug builds and when I specifically have threshold force notification callback enabled.

I tried making onContact completely empty and it still happens once in a while.

The filter code I have is very simple:

PxFilterFlags WorldPhysX::filter(	PxFilterObjectAttributes attributes0,
                                      PxFilterData filterData0,
                                      PxFilterObjectAttributes attributes1,
                                      PxFilterData filterData1,
                                      PxPairFlags& pairFlags,
                                      const void* constantBlock,
                                      PxU32 constantBlockSize)
{   
    pairFlags |= PxPairFlag::eCONTACT_DEFAULT | PxPairFlag::eNOTIFY_THRESHOLD_FORCE_FOUND;
    return PxFilterFlags();
}

Using physx-3.3.2_osx_sdk_core

Update:

Some more findings:

  • It appears the scenario happens when there are multiple static rigid actors in the world and dynamic actors are colliding with them.

  • If I were to create a single static plane and populate the scene with dynamic actors, the problem does not reproduce.

  • Reducing the number of CPUs in the dispatches to 1 does not resolve the issue.

  • Wrapping all scene access with R/RW locks does not resolve the issue.

My scene flags are as follows:

sceneDesc.flags |= PxSceneFlag::eENABLE_ACTIVETRANSFORMS  | PxSceneFlag::eADAPTIVE_FORCE | PxSceneFlag::eENABLE_PCM;

Full backtrace:

* thread #6: tid = 0x7a2ad6, 0x00007fff89c47866 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
    frame #0: 0x00007fff89c47866 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff88df135c libsystem_pthread.dylib`pthread_kill + 92
    frame #2: 0x00007fff89c04b1a libsystem_c.dylib`abort + 125
    frame #3: 0x0000000100173dee ColonyCraft`(anonymous namespace)::DefaultAssertHandler::operator()(char const*, char const*, int, bool&) + 94
    frame #4: 0x00000001007c9250 ColonyCraft`physx::Sc::ShapeInstancePairLL::onDeactivate(unsigned int) + 2496
    frame #5: 0x00000001007c9c52 ColonyCraft`non-virtual thunk to physx::Sc::ShapeInstancePairLL::onDeactivate(unsigned int) + 34
    frame #6: 0x00000001007e5090 ColonyCraft`physx::Sc::Actor::deactivateInteractions(unsigned int) + 688
    frame #7: 0x00000001007e5358 ColonyCraft`physx::Sc::Actor::setActive(bool, unsigned int) + 632
  * frame #8: 0x000000010077e34b ColonyCraft`physx::Sc::Scene::postIslandGenSecondPass(physx::PxBaseTask*) + 683
    frame #9: 0x00000001007af9be ColonyCraft`physx::Cm::DelegateTask<physx::Sc::Scene, &(physx::Sc::Scene::postIslandGenSecondPass(physx::PxBaseTask*))>::runInternal() + 110
    frame #10: 0x00000001007a3bc5 ColonyCraft`physx::Cm::Task::run() + 53
    frame #11: 0x0000000100d73b06 ColonyCraft`physx::Ext::DefaultCpuDispatcher::runTask(physx::PxBaseTask&) + 70
    frame #12: 0x0000000100d72d60 ColonyCraft`physx::Ext::CpuWorkerThread::execute() + 176
    frame #13: 0x000000010017a61e ColonyCraft`physx::shdfnd::(anonymous namespace)::PxThreadStart(void*) + 126
    frame #14: 0x00007fff88df0899 libsystem_pthread.dylib`_pthread_body + 138
    frame #15: 0x00007fff88df072a libsystem_pthread.dylib`_pthread_start + 137
    frame #16: 0x00007fff88df4fc9 libsystem_pthread.dylib`thread_start + 13