Events on Entities

Post and discuss features you'd like to see in the BEPUphysics library.
Post Reply
Posts: 22
Joined: Sat Oct 16, 2010 10:32 pm

Events on Entities

Post by thiago » Sat Feb 04, 2012 1:35 am


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);
the InternalInitialCollisionDetected is null.

Site Admin
Posts: 4709
Joined: Tue Jul 04, 2006 4:45 am

Re: Events on Entities

Post by Norbo » Sat Feb 04, 2012 2:06 am

Thanks for the report. Technically, this wasn't a supported action, so let me know if you find any additional oddities.

The development fork should contain the changes once codeplex lets me synchronize.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest