Exception in GLPbuffer.display()

Hi al,

I’m making calls to the display() method of the GLPbuffer, but after many hundreds of such calls, I see an exception thus:


     [java] Exception in thread "Thread-2" javax.media.opengl.GLException: javax.media.opengl.GLException: Error making context current: 0
     [java]     at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:271)
     [java]     at com.sun.opengl.impl.GLPbufferImpl.maybeDoSingleThreadedWorkaround(GLPbufferImpl.java:199)
     [java]     at com.sun.opengl.impl.GLPbufferImpl.display(GLPbufferImpl.java:88)
     [java]     at rob.squares.sources.CompressedMipmapSquareSource$Tracker.notifySquare(CompressedMipmapSquareSource.java:162)
     [java]     at rob.squares.AbstractSquareSource.notifyCallers(AbstractSquareSource.java:8)
     [java]     at rob.squares.sources.CombiningSquareSource.process(CombiningSquareSource.java:52)
     [java]     at rob.squares.ThreadedSquareSource.run(ThreadedSquareSource.java:66)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Caused by: javax.media.opengl.GLException: Error making context current: 0
     [java]     at com.sun.opengl.impl.windows.WindowsGLContext.makeCurrentImpl(WindowsGLContext.java:169)
     [java]     at com.sun.opengl.impl.windows.WindowsPbufferGLContext.makeCurrentImpl(WindowsPbufferGLContext.java:102)
     [java]     at com.sun.opengl.impl.GLContextImpl.makeCurrent(GLContextImpl.java:127)
     [java]     at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:182)
     [java]     at com.sun.opengl.impl.GLPbufferImpl$DisplayOnEventDispatchThreadAction.run(GLPbufferImpl.java:233)
     [java]     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
     [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
     [java]     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
     [java]     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
     [java]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
     [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
     [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
     [java]     at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


This is on WinXP, Nvidia FX5200.

Can anyone suggest what might be going wrong here please? I’ve struggled to reduce this to a simple testcase and still have the problem occur.


I should add that the same code using a GLCanvas in a JFrame has no such problem.

Sounds like either a problem with your OpenGL drivers or some OpenGL code which is triggering errors eventually leading up to the inability to make the context current. Are you running the latest drivers? Have you tried installing a DebugGL in your GLEventListener.init() to see if any OpenGL errors are being raised?

Ken,

Thanks for the reply. The problem occurs even if I stub out all the code in the display() method of the event listener to be nothing but:


System.out.println(drawable.getGL());

I guess this leaves this as being most likely a driver isssue. I’ll see if I can investigate further.

Thanks again,
Rob