Assert using fluid particles on GPU

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

That’s a new one to me. I’ll bring this to the attention of engineers who maintain the fluid code to see what they have to say.

Hi,
I consulted the primary engineer responsible for the particle system, this problem does not appear to be a known issue. Would it be possible for you to fork the Github repo and put a reproduction sample on your fork? Then we’ll assign someone to look at it ASAP.

Thanks,
Mike

Hi Mike,

it’s a bit more complicated, I am developing a plugin for Lightwave 3D, so the result is a plugin file (which is in fact a dll) that is started from within Lightwave. So I would need to post my complete code and you would have to have LW to be able to test it. Is there another way to test this?

I’ll see if I can narrow it down further and produce a small exe that demonstrates the problem.

creacon

I’ve run into the same or similar issue, any luck?