NVIDIAGameWorks / PhysX-3.4

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

Crash in activateInteractions #40

Closed hexc4t closed 6 years ago

hexc4t commented 7 years ago

I'm attaching a print screen from Visual Studio showing callstack and some of the local variables. physx_interation_crash

It seems that 'interaction' variable points to a broken memory location ( mIterationType field has a value of 0x57 which is far beyond allowed enum range ). I think the crash happens when one of the of the jointed bodies is removed at the same time when joint breaks. It's very hard to reproduce and I'm just guessing what might be the reason. We are now trying to reproduce this bug with asserts and checks turned on.

AlesBorovicka commented 7 years ago

Hi, please, try not to use VS2017, it is not supported atm, there is a compiler bug preventing us from upgrading the projects. The compiler fix should be hopefully in next VS2017 update. Regards, Ales

hexc4t commented 7 years ago

Ales, we are using VS2015. Forgot to mention, our PhysX version is 22121272.

AlesBorovicka commented 7 years ago

ah good, guess you don't have a repro for it?

hexc4t commented 7 years ago

Unfortunately, we don't have a repro for this bug. There is also a chance that somebody is overriding few bytes of PhysX memory space. I've changed PhysX allocator implementation so memory layout should be different. If memory corruption is the culprit then crash should move somewhere else or disappear. I will keep you informed.

hexc4t commented 6 years ago

Physx modification from Unreal Engine solved the problem: https://github.com/EpicGames/UnrealEngine/commit/190c28fbc42c83c730e1c75eec468decaebca734