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 › OPENGL hides exceptions
Page Index Toggle Pages: 1
OPENGL hides exceptions (Read 1770 times)
OPENGL hides exceptions
Apr 26th, 2005, 2:57pm
 
i have a case where out-of-bounds exceptions (maybe others too) are totally hidden by use of OPENGL. hidden means not println-ed. this was kind of confusing, because the applet froze and i was not given a response why ... (reminded me of flash, ahh!)

i was not able to make a simple sketch showing this, but here's one that gives a similar (related) behaviour. it triggers a wrong or not helpful message:

Code:

import processing.opengl.*;

// catched: 2005-04-26 - f jenett - mail a) florianjenett.de
// os-x 10.3.9 / java 1.4.2_05
// processing .85 beta

// throws:      net.java.games.jogl.GLException:  java.lang.reflect.InvocationTargetException
// instead of:  java.lang.ArrayOutOfBoundsException

/* as shown OPENGL seams to obfuscate the exceptions thrown by the applet.
* sometimes i even don't get an exception at all, just a frozen blank applet-window.
*/

void setup()
{
   size( 300,300,OPENGL );
}
int[] arr = new int[]{ 200,200 };
void draw()
{
   line( 0,0, arr[1], arr[2] );
}



just a thought, could it be that you suppress some exceptions related to OPENGL and therfore stop println-ing any exceptions triggered afterwards?

F
Re: OPENGL hides exceptions
Reply #1 - Apr 26th, 2005, 3:03pm
 
addition:

the reason why i think my example and the described no-exception-at-all behavior are related is this error, that i get every now and then:

Error: view not ready, cannot lock focus at "/Users/kbr/JavaNet/jogl/src/native/jogl/MacOSXWindowSystemInterface.m:createCon
text:51"

either it only happens or it only surfaces sometimes. so maybe that's what's hiding the other exceptions?

F
Re: OPENGL hides exceptions
Reply #2 - Apr 26th, 2005, 5:07pm
 
the second error is the third item in the opengl known bugs section of the faq:
http://processing.org/faq/bugs.html#opengl

and the other one is in the known bugs towards the middle:
http://processing.org/faq/bugs.html#known
"Errors are sometimes cryptic or don't even come through, particularly on the Mac."
Re: OPENGL hides exceptions
Reply #3 - Apr 26th, 2005, 5:56pm
 
ohmy. a blind man's apologies. sorry.
Re: OPENGL hides exceptions
Reply #4 - Apr 26th, 2005, 6:02pm
 
just to prevent from you having to re-type all the time because of people like me, maybe you could just copy-paste the faq-text into one large thread on the forum which then would be found by the search ... just a thought.

(could be titled: "RTFF" or just "It's in the FAQ!")

F
Re: OPENGL hides exceptions
Reply #5 - Apr 28th, 2005, 5:53am
 
Not an ideal solution, but sometimes works for me... when I get obscure errors, I change from OPENGL to P3D and it usually gives me a more precise error message... though sometimes only after running the program twice or thrice.
Re: OPENGL hides exceptions
Reply #6 - Apr 28th, 2005, 2:06pm
 
thanks robert,
i figured that and it's now become part of my toolbox as well ... sadly.

ben,
would it be possible to direct the openGL errors somewhere else so they won't hide the others? ...

F
Re: OPENGL hides exceptions
Reply #7 - Apr 28th, 2005, 7:24pm
 
fjen wrote on Apr 28th, 2005, 2:06pm:
ben,
would it be possible to direct the openGL errors somewhere else so they won't hide the others ...

that would be the general idea.. it's more of a time issue to figure out what's up.

for some reason macosx doesn't finish spewing out its exception stack traces before quitting a java app.. so this means that for anything run externally, we're at the mercy of how the machine is running on whether we actually get the final stack trace before the applet that's running externally is terminated. given some time futzing with it, i'm fairly certain i can get it to work, it's just a matter of when i can get to it.
Re: OPENGL hides exceptions
Reply #8 - May 11th, 2005, 9:23am
 
tracked down and fixed for 0091 while a bit insomniac...
Page Index Toggle Pages: 1