Exception in thread "Timer-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 615 at java.util.Vector.get(Vector.java:694) at Main.Space.gravityAffect(Space.java:79) at Main.Launcher$3.run(Launcher.java:101) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462)
Probably multithreading issue when you remove a point during the calculation loop. Possible solution is to mark your calculation loop synchronized on the points-vector - google around on "java synchronized". EDIT: mark the calculation loop AND all other parts modifying the vector as synchronized
Anon: the calculation thread crashed. The display thread (and the thread responding to keyboard input) still works, so that's why it seems like the whole program just freezes.
|