We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › Array OutOfBounds and OPENGL
Page Index Toggle Pages: 1
Array OutOfBounds and OPENGL (Read 647 times)
Array OutOfBounds and OPENGL
May 4th, 2005, 7:48am
 
ArrayIndexOutOfBoundsExceptions are not thrown in OPENGL.  instead, this error:
Quote:
net.java.games.jogl.GLException: java.lang.reflect.InvocationTargetException

appears, and no problem line number is identified.  makes debugging trickier...

this code will do it:
Code:

import processing.opengl.*;
int[] ints;

void setup () {
size(200, 200, OPENGL);
ints = new int[5];
for (int i=0; i<5; i++) {
ints[i] = 0;
}
}

void draw () {
for (int i=0; i<6; i++) {
ints[i] = 0;
}
}


winXP/v0087.
Re: Array OutOfBounds and OPENGL
Reply #1 - May 4th, 2005, 5:56pm
 
k, will look into it. i think it's a matter of bugs inside setup() only showing up as InvocationTargetExceptions because the code is loaded dynamically.
Re: Array OutOfBounds and OPENGL
Reply #2 - Jul 28th, 2005, 5:20am
 
i believe this was fixed in one of the recent releases, so closing thread.
Page Index Toggle Pages: 1