Strange error in a for loop...
in
Programming Questions
•
3 years ago
Hi,
I have a nice little server app running. But from time to time, it crashes, for no visible reason.
here is the error Processing tells me (or console when I exported the app:
Ok, here is my line 108, which looks like it makes problems:Exception in thread "Animation Thread" java.lang.ArrayIndexOutOfBoundsException:1at server_app.writeToArray(server_app.java:108)at server_app.draw(server_app.java:97)at processing.core.PApplet.handleDraw(PApplet.java:1606)at processing.core.PApplet.run(PApplet.java:1503)at java.lang.Thread.run(Thread.java:637
for(int j = 0; j <signals; j++) {
setDmxChannel(3,200);
setDmxChannel(1,pos_arr);
}
}
(first line is 108)
So, anyone has an Idea what is happening, or how I could prevent that? Or someone can write me an AppleScript, that if this error is happening, it restarts the computer?
Thanks for you help!
Greetings
Nicolas
1