ewjordan wrote:
Ah well, thanks for trying, ElkMonster - I suppose since the bug is so rare that means it's probably not a huge priority to worry about, though I'll definitely keep my eyes open for it, as it's pretty bad if something crashes unexpectedly during a long simulation...I'll probably try fuzzing an input to the query function to see if I can cause it to happen again, maybe that will turn up something that I can track down (I've got to assume this is some sort of edge case, where you're querying right up against the boundary or something odd like that).
Yeah, that's what I think, too. Considering all the testbed examples and other apps that have been run by quite a number of people without the bug occurring, it is really not that important right now.
One more hint: It
could be that the bug occurred when two bodies were overlapping. In my game, you can "glue" boxes by putting them next to each other (while touching each with two fingers). As this is done with great force (your hands
😀 ), boxes often happened to overlap for some time, i.e., more than one frame.
Here's the other exception I mentioned:
Code:
java.lang.ArrayIndexOutOfBoundsException: 15
at org.jbox2d.dynamics.Island.add(Island.java:81)
at org.jbox2d.dynamics.World.solve(World.java:598)
at org.jbox2d.dynamics.World.step(World.java:483)
This occurred when you did the "glueing" mentioned above with many boxes (more than eight, maybe; all glued to the same "complex" figure). Glueing is implemented through revolute joints. I hope you can imagine it somehow from my explanations...
The exception happened three times, but was not really reproducible. Most of the time, everything would work fine. I used to have some trouble with double-destroying joints accidentally, and as the glueing (and "unglueing", which you can also do) involves fiddling with joints a lot, I'm not sure if it could be my fault, being related to joint destroying (but note that destroying was not done during the simulation step).
I'm sorry I couldn't go deeper into it, but it happened after one of the last matches and I didn't have the time then to experiment more.
🙁Quote:
In any case, glad that the project turned out okay in the end. I'm curious, do you have any videos to show or anything like that? I've been interested in getting into the multi-touch stuff for a while, I'd love to see it in action with Box2d.
I'll show a video, but it might take some time. I've got to get a number of things done (writing the bachelor thesis being the most important one...
😉 ), so please be patient.
Anyway, my game is not the greatest example of Box2D in action... after all, it's just using Box2D to get some reasonable, somewhat realistic feeling into the game, but I had to apply a few "hacks" here and there in order to get the game play right (like modifying linear velocity in some collision cases, etc.).