Bug 22 - GLException hides user exception
Summary: GLException hides user exception
Alias: None
Product: Jogl
Classification: JogAmp
Component: core (show other bugs)
Version: 1
Hardware: All windows
: P3 normal
Assignee: Sven Gothel
URL: http://www.javagaming.org/cgi-bin/JGN...
Depends on:
Reported: 2003-07-03 01:43 CEST by Sven Gothel
Modified: 2010-03-24 07:45 CET (History)
0 users

See Also:
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Sven Gothel 2010-03-24 07:45:33 CET

---- Reported by orangytang 2003-07-03 01:43:18 ----

Please see the referenced url for a more complete description.

In short, user code that throws a NullPointerException within a .display (fired via 
the Animator class), will be caught by something higher up in Jogl and rethrown as 
a totally unrelated exception.

---- Additional Comments From kbr 2003-07-14 22:40:44 ----

Need to add more logic to the main try/finally block in GLContext so that
exceptions thrown during free() don't hide exceptions thrown during the listener
body. Need a test case for this.

---- Additional Comments From kbr 2004-11-18 15:07:20 ----

(Finally reproduced this with a buggy version of the ProceduralTexturePhysics demo.)

The central try/finally cause in GLException.invokeGL() called GLContext.free()
after catching and rethrowing the end user's exception from the
GLEventListenerdisplay() routine, which caused the end user's exception to be
overwritten with the internal GLException. Fixed this by initializing the cause
of the internal exception, and also continuing to propagate out the end user's

--- Bug imported by sgothel@jausoft.com 2010-03-24 07:45 EDT  ---

This bug was previously known as _bug_ 22 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=22