bug spoted in pre1.1.1

hi,

i am actually not sure if it is an bug in JOGL or a not set flag in Beans.isDesignTime() but if I run a NetBeans Module (with jogl 1.1.1) i get this Exception if the Animator starts the rendering process:


java.lang.NullPointerException
	at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
	at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:341)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:217)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:610)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
Caused: javax.media.opengl.GLException
	at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
	at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:299)
	at javax.media.opengl.GLCanvas.display(GLCanvas.java:133)
	at com.sun.opengl.util.Animator.display(Animator.java:144)
	at com.sun.opengl.util.Animator$MainLoop.run(Animator.java:181)
[catch] at java.lang.Thread.run(Thread.java:637)

Note: if the exception accrues the canvas is painted black with the string “canvas0” => it seems to be still in design mode
JOGL 1.1.0 runs without problems.

The strange thing is that i can’t reproduce this outside an module (eg. standard se project)

ok, its probably an NetBeans bug…

Beans.isDesignTime() returns true at runtime (or at least if NetBeans is startet inside NetBeans), so not JOGLs fault :wink:

If you have any suggestions in this area, or a test case, please post or file a bug. JOGL’s support for Beans.isDesignTime() is based on my very limited understanding of how it works and I’m sure improvements could be made.

well, my workaround is currently a call to Beans.setDesighTime(false) before initComponents().

I am also not 100% sure what the intended purpose of the Beans class actually is, because it seems to be very hacky (everyone can actually set the designtime flag…) I will build an testcase soon…