Login  Register

javax.media.opengl.GLException: Shared Surface not ready

Posted by michael.mcdougall on Dec 15, 2011; 4:27pm
URL: https://forum.jogamp.org/javax-media-opengl-GLException-Shared-Surface-not-ready-tp3589129.html

I've got an applet that uses JOGL. It works fine the first time you load the page. But if you click the browser's "back" button and then press "forward" soon after, I get the following exception:

javax.media.opengl.GLException: Shared Surface not ready (lockSurface):
WindowsGraphicsDevice[type Windows, connection decon, unitID 0, handle 0x0] ->
WindowsDummyWGLDrawable[Realized true,
    Factory   jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory@bd5df,
    handle    0x0,
    Window    GDISurface[config
WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type
Windows, connection decon, unitID 0, handle 0x0], idx 0], pfdID 7, ARB-Choosen
false,
    requested GLCaps[on-scr, rgba 0x8/8/8/0, opaque, accum-rgba 0/0/0/0,
dp/st/ms: 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]],
    chosen    GLCaps[7 gdi: on-scr, rgba 0x8/8/8/0, opaque, accum-rgba
16/16/16/16, dp/st/ms: 24/0/0, dbl, mono  , hw, GLProfile[GL2/GL2]]],
displayHandle 0x0, windowHandle 0x308fe, surfaceHandle 0x0, size 64x64]]
    at
jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfigurationFactory.preselectGraphicsConfiguration(WindowsWGLGraphicsConfigurationFactory.java:241)
    at
jogamp.opengl.windows.wgl.WindowsWGLGraphicsConfiguration.preselectGraphicsConfiguration(WindowsWGLGraphicsConfiguration.java:153)
    at
jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:128)
    at
javax.media.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:239)
    at
javax.media.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1010)
    at javax.media.opengl.awt.GLCanvas.addNotify(GLCanvas.java:530)
    at java.awt.Container.addImpl(Unknown Source)
    at java.awt.Container.add(Unknown Source)
   ..

I've only seen this since upgrading to JOGL 2.0.

Has anyone seen and solved this? I don't know if this is a bug in my code -- i.e., I'm not calling a proper shutdown method -- or a JOGL bug.