You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm hoping someone can point me in the right direction of how to start debugging this issue, my code is somehow triggering an assertion that is deep enough within Rapier's internals that I'm not really sure where to start figuring what is going wrong, nor how to create a minimal reproduction case.
Somehow, the expected invariant from this line of code --assert!(e.floor() < RegionKey::MAX as Real); -- is being violated.
The best clue I have is that I'm trying to disable bodies with rapier2d::dynamics::rigid_body::RigidBody.set_enabled()(link to code). I only invoke this in one place in my code, and if I comment out that line, the crash seems to go away.
Some more details in case this sparks any ideas:
I'm trying to disable a player body when it is hit with a projectile, at the same instant I despawn an overlapping projectile body. Each body has a single RigidBody collider; additionally the player has several attached sensor colliders and the projectile has one attached sensor. So it may be the case that between two Rapier steps, two bodies with multiple overlapping sensor are despawned and disabled.
I kind of wonder if this is perhaps an unexpected edge case that is not covered by the invariant above, and that is causing the broad phase to crash somehow? But, again, since this is pretty deep in the internals I'm not really sure what this invariant means of how my user code could be causing it to be violated.
I apologize that this is a somewhat nebulous bug report, I'm just a little out of my depth so I'm not sure what info would be helpful. Happy to supply more info if you can point me in the direction of other details that might be useful. For whatever it's worth, below is a stack trace from adding "std::backtrace::Backtrace::force_capture()" just above the assertion:
Hi, I'm hoping someone can point me in the right direction of how to start debugging this issue, my code is somehow triggering an assertion that is deep enough within Rapier's internals that I'm not really sure where to start figuring what is going wrong, nor how to create a minimal reproduction case.
Somehow, the expected invariant from this line of code --
assert!(e.floor() < RegionKey::MAX as Real);
-- is being violated.The best clue I have is that I'm trying to disable bodies with
rapier2d::dynamics::rigid_body::RigidBody.set_enabled()
(link to code). I only invoke this in one place in my code, and if I comment out that line, the crash seems to go away.Some more details in case this sparks any ideas:
I'm trying to disable a player body when it is hit with a projectile, at the same instant I despawn an overlapping projectile body. Each body has a single RigidBody collider; additionally the player has several attached sensor colliders and the projectile has one attached sensor. So it may be the case that between two Rapier steps, two bodies with multiple overlapping sensor are despawned and disabled.
I kind of wonder if this is perhaps an unexpected edge case that is not covered by the invariant above, and that is causing the broad phase to crash somehow? But, again, since this is pretty deep in the internals I'm not really sure what this invariant means of how my user code could be causing it to be violated.
I apologize that this is a somewhat nebulous bug report, I'm just a little out of my depth so I'm not sure what info would be helpful. Happy to supply more info if you can point me in the direction of other details that might be useful. For whatever it's worth, below is a stack trace from adding "std::backtrace::Backtrace::force_capture()" just above the assertion:
Thank you!
The text was updated successfully, but these errors were encountered: