java.lang.ArrayIndexOutOfBoundsException: -1

I very often get an error about a second (or less) after starting the applet, but after it runs for a while, I don't get errors anymore. When I get the error there are usually shapes that overlap each other:

Image

details
jbox2d version:
Current release version: 1.4.3
Current SVN version: 2.0.0

error message:
Code:
Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: -1
   at org.jbox2d.collision.BroadPhase.moveProxy(BroadPhase.java:457)
   at org.jbox2d.collision.Shape.synchronize(Shape.java:168)
   at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:677)
   at org.jbox2d.dynamics.World.solve(World.java:606)
   at org.jbox2d.dynamics.World.step(World.java:440)
   at game.run(game.java:570)
   at java.lang.Thread.run(Unknown Source)


lines 454-459 of BroadPhase.class/.java:
Code:
454        //Get old bound values
455        BoundValues oldValues = new BoundValues();
456        for (int axis = 0; axis < 2; ++axis) {
457            oldValues.lowerValues[axis] = m_bounds[axis][proxy.lowerBounds[axis]].value;
458            oldValues.upperValues[axis] = m_bounds[axis][proxy.upperBounds[axis]].value;
459        }
so, which version are you running
I don't know which version I have. Here's the first part of the readme.txt:
Quote:
-------------
JBox2d README
-------------

[This is an SVN pre-2.0 release version. Try running org.jbox2d.testbed.TestbedMain.java to see the demos]

JBox2d (http://www.sf.net/projects/jbox2d) is a Java port of Box2d (http://www.box2d.org), a 2D rigid body physics engine written in C++.
Box2d is maintained by Erin Catto.
JBox2d is maintained by quixote_arg and ewjordan.

There is also an Actionscript 3 version of this engine for Flash programmers, maintained by skatehead.

Issues can be discussed at the Box2d forums at http://www.box2d.org/forum/

Current release version: 1.4.3
Current SVN version: 2.0.0
try checking out the latest svn release, or I think there's a 2.0 release in the sourceforge files
I downloaded the new version and don't get any errors anymore. but probably that's because the boxes don't fall anymore =/ (I know it's because the density is 0)
Now all the boxes fall and I get the exception again...
Huh, ok so I would try the svn version, which was updated for a while after the 2.0 release in sourceforge. If that's giving you problems still, then I'll have to take a look into this.
where can I download the svn version?

btw... I got another error:

Exception in thread "Thread-6" java.lang.NullPointerException
at org.jbox2d.collision.PairManager.commit(PairManager.java:269)
at org.jbox2d.collision.BroadPhase.commit(BroadPhase.java:638)
at org.jbox2d.dynamics.World.solveTOI(World.java:902)
at org.jbox2d.dynamics.World.step(World.java:476)
at game.run(game.java:618)
at java.lang.Thread.run(Unknown Source)
I guess I really need another version:

Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: 2147483647
at org.jbox2d.collision.PairManager.removePair(PairManager.java:153)
at org.jbox2d.collision.PairManager.commit(PairManager.java:304)
at org.jbox2d.collision.BroadPhase.commit(BroadPhase.java:638)
at org.jbox2d.dynamics.World.solveTOI(World.java:902)
at org.jbox2d.dynamics.World.step(World.java:476)
at game.run(game.java:618)
at java.lang.Thread.run(Unknown Source)

I like errors =D:

Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: -1
at org.jbox2d.collision.BroadPhase.moveProxy(BroadPhase.java:458)
at org.jbox2d.collision.Shape.synchronize(Shape.java:239)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:710)
at org.jbox2d.dynamics.World.solve(World.java:672)
at org.jbox2d.dynamics.World.step(World.java:471)
at game.run(game.java:618)
at java.lang.Thread.run(Unknown Source)
it should show you on the sourceforge page with you click on the source tab.

Original thread: https://box2d.org/forum/viewtopic.php?t=4660