Cannot delete/change bodies

Andazeus

31-07-2012 15:58:20

Hello everyone!

A nasty problem is plaguing me for a days and simply can't find the cause for it.


Trying to delete OgreNewt bodies or doing certain changes (like SetPositionOrientation or RemoveForceAndTorqueCallback) mid simulation crash my program.
Under linux, I simply get a SegFault and under windows, I get an access violation pointing to the clear function in boost::function_template.hpp.

I am aware that changing bodies during world update is a bad idea. I tried queuing my pending body deletes in a vector and executing them during FrameEnded within the Ogre FrameListener, but the result is the same.

Got OgreNewt straight from svn a few weeks ago and using Newton 2.35.


This is driving me seriously crazy and I'd be open to any ideas on the matter.

Thanks!

Lax

28-08-2012 21:59:41

You must be a little bit more specific, show some code. Normally there is no problem on changing or deleting OgreNewt bodies.