From: Chris S. <chr...@gm...> - 2007-06-17 06:59:18
|
I'm unable to run a small ODE simulation for more than a couple minutes before ODE crashes with the error: ODE INTERNAL ERROR 2: invalid operation for locked space in dGeomMoved() Is this caused by ODE's buggy memory management, or is it something I'm doing? I'm manipulating ODE objects in a separate thread from the one running the ODE simulation. Could that be causing the error? What would be the best way to update a simulation from multiple threads without having to pause the simulation? Thanks, Chris |
From: Chris B. <chr...@gm...> - 2007-06-18 12:45:01
|
On 17/06/07, Chris Spencer <chr...@gm...> wrote: > I'm unable to run a small ODE simulation for more than a couple > minutes before ODE crashes with the error: > > ODE INTERNAL ERROR 2: invalid operation for locked space in dGeomMoved() > > Is this caused by ODE's buggy memory management, or is it something > I'm doing? I'm manipulating ODE objects in a separate thread from the > one running the ODE simulation. Could that be causing the error? What > would be the best way to update a simulation from multiple threads > without having to pause the simulation? You probably need to serialise all ODE operations in a single thread. Send messages to that thread to update the ODE objects, and call World.step() from that thread when your message queue is empty. Without examining the source in details it's impossible to tell the effect of changing objects and using objects in parallel. |
From: Chris S. <chr...@gm...> - 2007-06-18 17:53:22
|
Yep, that's exactly what I had to do to fix the problem. Thanks. Chris On 6/18/07, Chris Bainbridge <chr...@gm...> wrote: > On 17/06/07, Chris Spencer <chr...@gm...> wrote: > > I'm unable to run a small ODE simulation for more than a couple > > minutes before ODE crashes with the error: > > > > ODE INTERNAL ERROR 2: invalid operation for locked space in dGeomMoved() > > > > Is this caused by ODE's buggy memory management, or is it something > > I'm doing? I'm manipulating ODE objects in a separate thread from the > > one running the ODE simulation. Could that be causing the error? What > > would be the best way to update a simulation from multiple threads > > without having to pause the simulation? > > You probably need to serialise all ODE operations in a single thread. > Send messages to that thread to update the ODE objects, and call > World.step() from that thread when your message queue is empty. > Without examining the source in details it's impossible to tell the > effect of changing objects and using objects in parallel. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Pyode-user mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyode-user > |
From: Jon W. (ODE) <hpl...@mi...> - 2007-06-18 20:40:05
|
ODE is not thread safe. You can only manipulate objects when you know that the world collision/simulation isn't running. ODE does not have any known bugs in memory management. If you need to manipulate objects, then you should double-buffer the state, and pick up any requested changes before you call collide/step the next time in the simulation thread. Cheers, / h+ Chris Spencer wrote: > I'm unable to run a small ODE simulation for more than a couple > minutes before ODE crashes with the error: > > ODE INTERNAL ERROR 2: invalid operation for locked space in dGeomMoved() > > Is this caused by ODE's buggy memory management, or is it something > I'm doing? I'm manipulating ODE objects in a separate thread from the > one running the ODE simulation. Could that be causing the error? What > would be the best way to update a simulation from multiple threads > without having to pause the simulation? > > |
From: Chris S. <chr...@gm...> - 2007-06-18 21:09:03
|
On 6/18/07, Jon Watte (ODE) <hpl...@mi...> wrote: > ODE is not thread safe. You can only manipulate objects when you know > that the world collision/simulation isn't running. > ODE does not have any known bugs in memory management. The bug I'm referring to is the one reported at https://sourceforge.net/tracker/?func=detail&atid=382799&aid=1566350&group_id=24884 Even for thread-safe code, ODE tends to crash quite regularly when I try to add or remove large numbers of bodies/geoms from a simulation. Regards, Chris |
From: Chris B. <chr...@gm...> - 2007-06-18 23:12:20
|
On 18/06/07, Chris Spencer <chr...@gm...> wrote: > On 6/18/07, Jon Watte (ODE) <hpl...@mi...> wrote: > > ODE is not thread safe. You can only manipulate objects when you know > > that the world collision/simulation isn't running. > > ODE does not have any known bugs in memory management. > > The bug I'm referring to is the one reported at > https://sourceforge.net/tracker/?func=detail&atid=382799&aid=1566350&group_id=24884 > > Even for thread-safe code, ODE tends to crash quite regularly when I > try to add or remove large numbers of bodies/geoms from a simulation. One common problem with large number of bodies is running out of stack space. You can increase the stack space available to your program by running 'ulimit -s unlimited' from your shell, before you start your ODE program. But if you run python under gdb or similar you'll be able to see exactly which function is crashing (the stack problem is dSolveLCP). |