Bug 22

Summary: GLException hides user exception
Product: [JogAmp] Jogl Reporter: Sven Gothel <sgothel>
Component: coreAssignee: Sven Gothel <sgothel>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 1   
Hardware: All   
OS: windows   
URL: http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jogl;action=display;num=1057096404
Type: DEFECT SCM Refs:
Workaround: ---

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
exception.




--- 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