Hi
I have a model that extends AbstractExample from the TestBed in which I generate a number of circles. It works for a couple of thousand of circles but as I increase the number of circles beyond a certain point I get the following exception:
======
Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 2147483647
at org.jbox2d.collision.BroadPhase.createProxy(BroadPhase.java:230)
at org.jbox2d.collision.shapes.Shape.createProxy(Shape.java:337)
at org.jbox2d.dynamics.Body.createShape(Body.java:308)
at jbox2d_sample1.HourGlassTest.createCircles(HourGlassTest.java:113)
at jbox2d_sample1.HourGlassTest.create(HourGlassTest.java:41)
at jbox2d_sample1.AbstractExample.initialize(AbstractExample.java:229)
at jbox2d_sample1.TestbedMain.draw(TestbedMain.java:178)
at processing.core.PApplet.handleDraw(PApplet.java:1425)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)
======
Is there a limit to how many objects PApplet can handle?
Thanks
Graham
I have a model that extends AbstractExample from the TestBed in which I generate a number of circles. It works for a couple of thousand of circles but as I increase the number of circles beyond a certain point I get the following exception:
======
Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException: 2147483647
at org.jbox2d.collision.BroadPhase.createProxy(BroadPhase.java:230)
at org.jbox2d.collision.shapes.Shape.createProxy(Shape.java:337)
at org.jbox2d.dynamics.Body.createShape(Body.java:308)
at jbox2d_sample1.HourGlassTest.createCircles(HourGlassTest.java:113)
at jbox2d_sample1.HourGlassTest.create(HourGlassTest.java:41)
at jbox2d_sample1.AbstractExample.initialize(AbstractExample.java:229)
at jbox2d_sample1.TestbedMain.draw(TestbedMain.java:178)
at processing.core.PApplet.handleDraw(PApplet.java:1425)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)
======
Is there a limit to how many objects PApplet can handle?
Thanks
Graham