I got an ArrayIndexOutOfBoundsException on line 513 of World.java. This is in version 1.4.1b1 of Jbox2d (Via the "Download Now" link on SourceForge http://sourceforge.net/projects/jbox2d/ ... r/download).
Either I'm doing something wrong or there's a bug. Maybe I should be using what's in svn instead of the zip file? If so, should I use what's in "trunk/src" or "trunk/updating"?
The exception appeared, after I removed a body from the world. In this particular run of the simulation, I'd created and destroyed a number of bodies without problems. I do all of my body adding/removing outside of the physics step and callbacks.
What's odd is that I get a callback on my BoundaryListener telling me that the body has moved outside the bounds of the world. Especially weird since I destroyed the body.
UPDATE: Looks like I'm destroying the body twice. I must be getting multiple contact notifications.
Here's the code and stack trace:
510: // Reset island and stack.
511: island.clear();
512: int stackCount = 0;
513: stack[stackCount++] = seed;
514: seed.m_flags |= Body.e_islandFlag;
java.lang.ArrayIndexOutOfBoundsException: 0
at org.jbox2d.dynamics.World.solve(World.java:513)
at org.jbox2d.dynamics.World.step(World.java:440)
...my code from here...
at java.lang.Thread.run(Thread.java:637)
Either I'm doing something wrong or there's a bug. Maybe I should be using what's in svn instead of the zip file? If so, should I use what's in "trunk/src" or "trunk/updating"?
The exception appeared, after I removed a body from the world. In this particular run of the simulation, I'd created and destroyed a number of bodies without problems. I do all of my body adding/removing outside of the physics step and callbacks.
What's odd is that I get a callback on my BoundaryListener telling me that the body has moved outside the bounds of the world. Especially weird since I destroyed the body.
UPDATE: Looks like I'm destroying the body twice. I must be getting multiple contact notifications.
Here's the code and stack trace:
510: // Reset island and stack.
511: island.clear();
512: int stackCount = 0;
513: stack[stackCount++] = seed;
514: seed.m_flags |= Body.e_islandFlag;
java.lang.ArrayIndexOutOfBoundsException: 0
at org.jbox2d.dynamics.World.solve(World.java:513)
at org.jbox2d.dynamics.World.step(World.java:440)
...my code from here...
at java.lang.Thread.run(Thread.java:637)