In my project I'm working on, I have breakable objects which are created as a set of dynamic bodies. These objects can be "broken" by a kinematic sensor, which applies an impulse force in the begin collision callback. If the dynamic bodies are sleeping, this triggers an assert at cpSpaceComponent.c:172 "Failed condition: cpArbiterThreadForBody(arb, body)->next == NULL".
I'm not sure if applying an impulse in the collision callback this way is meant to be a supported operation, as it works fine if the dynamic bodies are not sleeping.
For now, I can work around the issue by adding the impulse in a post-step callback instead, however, this is not ideal as it means I have to persist the data outside of the scope of the collision callback.
In my project I'm working on, I have breakable objects which are created as a set of dynamic bodies. These objects can be "broken" by a kinematic sensor, which applies an impulse force in the begin collision callback. If the dynamic bodies are sleeping, this triggers an assert at cpSpaceComponent.c:172 "Failed condition: cpArbiterThreadForBody(arb, body)->next == NULL".
I'm not sure if applying an impulse in the collision callback this way is meant to be a supported operation, as it works fine if the dynamic bodies are not sleeping.
For now, I can work around the issue by adding the impulse in a post-step callback instead, however, this is not ideal as it means I have to persist the data outside of the scope of the collision callback.