I was playing with events (initial collision detected events actualy) and i needed to remove the event inside the event. (i mean, call the RemoveAllEvents inside the event handler)
After i did i, the bepu crashed.
Using the debug, i sow that you were calling a null event.
I suggest you to check if the event are null before calling them.
Where bepu crashes: (ContactEventManager.cs)
Code: Select all
while (eventStorageInitialCollisionDetected.TryUnsafeDequeueFirst(out initialCollisionDetected))
InternalInitialCollisionDetected(owner, initialCollisionDetected.other, initialCollisionDetected.pair);