I am experiencing a strange crash in my program and I am running out of things to test, so I am wondering if this could be a bug in PhysX.
First of all some information:
- I downloaded the latest PhysX source from Github (3.3.3)
- I compiled the debug and release versions (64bit with the default /MTd code generation)
- My application comes in the form of a dll (in fact several dll’s but for this problem there’s only one that is important)
- I am using VStudio 2013
These are the tests:
Rigid simulation: Works as expected
Cloth: Works as expected
Fluids (CPU):
Is set by using: fluid->setParticleBaseFlag(PxParticleBaseFlag::eGPU, false);
Works as expected
Fluids (GPU):
Is set by using: fluid->setParticleBaseFlag(PxParticleBaseFlag::eGPU, true);
Works as expected if:
I add 1000 particles at each time step ending up with 500.000 particles at the end of the simulation
I add 2000 particles at each time step ending up with 1000.000 particles at the end of the simulation
I add 1.000.000 particles at the first time step and let it simulate (so not adding particles afterwards)
So I thought that the above tests would be enough to stress test the application (I am using a TitanX, so there’s a lot of memory available)
Now the problem started to show up when I added LESS particles at each time step:
I add 500 particles at each time step: Crash at 6th step (so 2500 particles)
I add 100 particles at each time step: Crash at 21th step (so 2100 particles)
So I started to narrow it down, stepping 2000 frames and adding 2 particles at each step:
Crash when I reach 2048 particles. (so exactly 2K), remember from the above tests that I’ve added a lot more than this without crashing).
The error is always the same:
Debug assertion failed!
Program …\PhysX3CommonDebug_x64.dll
File: …..\pxtask\src\CUDA\BlockingWait.cpp
Line: 82
Abort-retry-ignore
When I try to debug I end up in PhysX3Common at the function that causes this assert, so it’s my guess that it comes from deeper (the PhysX3GPU probably). But the sourcecode for that part isn’t available.
The blockingwait.cpp doesn’t exist and is not part of the sourcecode on Github either.
Is there anyone who has any idea or has seen something similar before?
Thanks.
creacon