NVIDIAGameWorks / PhysX-3.4

NVIDIA PhysX SDK 3.4
https://www.nvidia.com/
2.35k stars 274 forks source link

Crash when setting eUSE_KINEMATIC_TARGET_FOR_SCENE_QUERIES after eKINEMATIC. #28

Closed kermado closed 5 years ago

kermado commented 7 years ago

I get repeatable crashes (in debug) when just doing the following:

setRigidBodyFlag(physx::PxRigidBodyFlag::eKINEMATIC, true);
setRigidBodyFlag(physx::PxRigidBodyFlag::eUSE_KINEMATIC_TARGET_FOR_SCENE_QUERIES, true);

If I swap the order of these lines then it doesn't crash.

PierreTerdiman commented 7 years ago

Would you have more information? A minimal test doing just these two operations doesn't crash for me:

TEST_F(RigidBodyTests, KinematicSQ) { PxRigidDynamic* actor = getPhysics().createRigidDynamic(PxTransform(PxIdentity)); ASSERT_TRUE(actor!=NULL); if(actor) { actor->setRigidBodyFlag(PxRigidBodyFlag::eKINEMATIC, true); actor->setRigidBodyFlag(PxRigidBodyFlag::eUSE_KINEMATIC_TARGET_FOR_SCENE_QUERIES, true); } }

You might be doing something else on top of that, that triggers a crash. Would you have a small repro?

amoravanszky commented 5 years ago

Closing until there is an update.