Do you mean the SCM Repositories?
java.lang.ArrayIndexOutOfBoundsException: -1
JavaNo, the SVN repository
http://sourceforge.net/projects/jbox2d/develop
that page will give you the svn url, you can use the command line "svn" command like they show, or look around online for a gui to do it for you
http://sourceforge.net/projects/jbox2d/develop
that page will give you the svn url, you can use the command line "svn" command like they show, or look around online for a gui to do it for you
I downloaded revision 250, but I still get the error:
and another error:
next error:
Code:
Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: -1
at org.jbox2d.collision.BroadPhase.moveProxy(BroadPhase.java:458)
at org.jbox2d.collision.shapes.Shape.synchronize(Shape.java:258)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:961)
at org.jbox2d.dynamics.World.solve(World.java:791)
at org.jbox2d.dynamics.World.step(World.java:577)
at game.run(game.java:622)
at java.lang.Thread.run(Unknown Source)
somehow proxy.lowerBounds becomes negative...at org.jbox2d.collision.BroadPhase.moveProxy(BroadPhase.java:458)
at org.jbox2d.collision.shapes.Shape.synchronize(Shape.java:258)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:961)
at org.jbox2d.dynamics.World.solve(World.java:791)
at org.jbox2d.dynamics.World.step(World.java:577)
at game.run(game.java:622)
at java.lang.Thread.run(Unknown Source)
and another error:
Code:
Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: -1
at org.jbox2d.collision.BroadPhase.query(BroadPhase.java:764)
at org.jbox2d.collision.BroadPhase.destroyProxy(BroadPhase.java:396)
at org.jbox2d.collision.shapes.Shape.destroyProxy(Shape.java:346)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:972)
at org.jbox2d.dynamics.World.solve(World.java:791)
at org.jbox2d.dynamics.World.step(World.java:577)
at game.run(game.java:622)
at java.lang.Thread.run(Unknown Source)
and the lines where the error occurs:at org.jbox2d.collision.BroadPhase.query(BroadPhase.java:764)
at org.jbox2d.collision.BroadPhase.destroyProxy(BroadPhase.java:396)
at org.jbox2d.collision.shapes.Shape.destroyProxy(Shape.java:346)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:972)
at org.jbox2d.dynamics.World.solve(World.java:791)
at org.jbox2d.dynamics.World.step(World.java:577)
at game.run(game.java:622)
at java.lang.Thread.run(Unknown Source)
Code:
assert (i >= 0) : ("i = " + i + "; s = " + s);
if ( bounds[i].isLower()) {
and i is -1 ???if ( bounds[i].isLower()) {
next error:
Code:
Exception in thread "Thread-6" java.lang.ArrayIndexOutOfBoundsException: 2147483647
at org.jbox2d.collision.BroadPhase.testOverlap(BroadPhase.java:177)
at org.jbox2d.collision.BroadPhase.moveProxy(BroadPhase.java:494)
at org.jbox2d.collision.shapes.Shape.synchronize(Shape.java:258)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:961)
at org.jbox2d.dynamics.World.solve(World.java:791)
at org.jbox2d.dynamics.World.step(World.java:577)
at game.run(game.java:621)
at java.lang.Thread.run(Unknown Source)
so p.upperBounds is 2147483647...at org.jbox2d.collision.BroadPhase.testOverlap(BroadPhase.java:177)
at org.jbox2d.collision.BroadPhase.moveProxy(BroadPhase.java:494)
at org.jbox2d.collision.shapes.Shape.synchronize(Shape.java:258)
at org.jbox2d.dynamics.Body.synchronizeShapes(Body.java:961)
at org.jbox2d.dynamics.World.solve(World.java:791)
at org.jbox2d.dynamics.World.step(World.java:577)
at game.run(game.java:621)
at java.lang.Thread.run(Unknown Source)
:/ ok so I looked into it, first of all, are you using two threads here? make sure all calls to the engine are from the same thread. Also, are you setting strange boundaries for your world coordinates?
Finally, compile with assertions on, and see if any assertions are tripped.
otherwise, I didn't find anything weird when I messed with it
Finally, compile with assertions on, and see if any assertions are tripped.
otherwise, I didn't find anything weird when I messed with it
I use 2 threads, but I only make calls to the engine through one of them.
I don't know what a strange boundary could be, I use (-20.01,-17.51) -> (20.01,17.51) for the world's AABB.
And is there any easy way to do number 3 in eclipse (compile with assertions on)?
I don't know what a strange boundary could be, I use (-20.01,-17.51) -> (20.01,17.51) for the world's AABB.
And is there any easy way to do number 3 in eclipse (compile with assertions on)?
not sure about where in eclipse you put it, but you add the -ea option, like
java -ea classtorun
java -ea classtorun
I'm sorry I didn't answer sooner, but I was very busy because of Easter.
I tried what you suggested: I called the java.exe with the -ea argument and the path to my class, but a java.lang.ClassNotForundException that caused an java.lang.NoClassDefFoundError was returned. I guess it's because I'm pretty unseless with command line things ;).
I tried what you suggested: I called the java.exe with the -ea argument and the path to my class, but a java.lang.ClassNotForundException that caused an java.lang.NoClassDefFoundError was returned. I guess it's because I'm pretty unseless with command line things ;).
Another question: My svn program updated JBox2D, and now there are multiple .jar files (there have also been many errors during the update =/). I then imported your project to eclipse to look at the newest code, but there are many errors o_O (i.e. the code can't be the code you used for the latest .jar). So probably it would be good to first clarify which .jar is the newest, because I might still use the old one. (I use the one in the "dist" folder, because it has the collisions.shapes package like the one before the 2nd svn update)
Seems like you're having a lot of trouble getting and using the latest JBox2D.
I do it entirely from within Eclipse, myself. Get and install the Subclipse plugin for Eclipse, and then tell Eclipse to make a new project. When you're prompted to select a wizard, choose "Checkout Projects from SVN". Tell the wizard the SVN URL for JBox2D, and go through the rest of the steps. If all goes well you'll end up with a nice JBox2D project in Eclipse that Eclipse can build without difficulty.
Given that, you don't need to trouble yourself over JAR's. Supposing your own project is in Eclipse, then go into your project's build path configuration editor, and find the Projects tab. Add a link to the JBox2D project there, and then your project will be able to use JBox2D by relying on the .class files in the JBox2D project.
Maybe you've figured this out already, but: The -ea option goes in a Run Configuration, in Eclipse. That's Run menu -> Run Configurations... -> Arguments tab. You can type in the option as a VM argument there, along with stuff like -Xmx512m or whatever to control memory use, etc.
I do it entirely from within Eclipse, myself. Get and install the Subclipse plugin for Eclipse, and then tell Eclipse to make a new project. When you're prompted to select a wizard, choose "Checkout Projects from SVN". Tell the wizard the SVN URL for JBox2D, and go through the rest of the steps. If all goes well you'll end up with a nice JBox2D project in Eclipse that Eclipse can build without difficulty.
Given that, you don't need to trouble yourself over JAR's. Supposing your own project is in Eclipse, then go into your project's build path configuration editor, and find the Projects tab. Add a link to the JBox2D project there, and then your project will be able to use JBox2D by relying on the .class files in the JBox2D project.
Maybe you've figured this out already, but: The -ea option goes in a Run Configuration, in Eclipse. That's Run menu -> Run Configurations... -> Arguments tab. You can type in the option as a VM argument there, along with stuff like -Xmx512m or whatever to control memory use, etc.
Addendum: Command-line things suck.
Original thread: https://box2d.org/forum/viewtopic.php?t=4660