Help with NPE (Processing & Netbeans)
in
Programming Questions
•
7 months ago
Can someone help me with this NPE?
I am trying to move my sketch (which runs perfectly in processing IDE) in netbeans and when I run it I get this NPE.
In my sketch I create in the main class an object from the second one and call the .display function.
Exception in thread "Animation Thread" javax.media.opengl.GLException: java.lang.NullPointerException
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:98)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:196)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:164)
at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:831)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:419)
at processing.opengl.PGL.requestDraw(Unknown Source)
at processing.opengl.PGraphicsOpenGL.requestDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at processing.core.PApplet.lights(Unknown Source)
at org.me.ClearDay.display(ClearDay.java:18)
at org.me.WeatherApplet.draw(WeatherApplet.java:76)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.opengl.PGL$PGLListener.display(Unknown Source)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:189)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:177)
at javax.media.opengl.awt.GLCanvas$DisplayAction.run(GLCanvas.java:934)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:425)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:364)
at javax.media.opengl.awt.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:951)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:646)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:616)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Thanks in advance!
1