ewjordan wrote:
Notice that i is being decremented and is relying on s to hit zero before i goes below, so it's definitely possible for i to hit -1
Oh, I missed that --i at the end.
Quote:
Is this consistently reproducible, or is it just something that happens once in a long while?
Like I said, it happened twice in two days during which the programme has run for many hours. It's a kind of Pong that is played on a multi-touch table. Instead of a paddle, there are a number of small boxes that are used to hit the ball. Therefore, it is a very repetitive game. Each time a player touches the table, the game calls query to check if a box is touched. So, I'd rather call it the opposite of "reproducible".
😉Quote:
I'm curious, any chance you can try running your program with assertions enabled? (add -ea to the VM arguments) Unfortunately, Java disables assertions by default, which means a lot of the fail-fast checking gets skipped over...
Well... there's a conflict then. The game will be running a few more times as it is part of a study for my bachelor thesis. I have to recruit a lot of people and ask them to play for the study, so I don't want the game to break anytime during the matches. So, enabling assertions isn't a good option for me (and I'll also have to prevent the OutOfBoundsException from breaking the game). However, I could just change the code to some simple if-statements and then log any bad values.
Quote:
Also, have you altered Settings.java at all? Changed the maxProxies or anything like that?
Nothing like it. The most "special" thing I do is to create and destroy a lot of joints (mouse and revolute joints) nearly every frame, and the mouse joints have an unusual high value for frequencyHz.