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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

michael.mcdougall
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.
Reply | Threaded
Open this post in threaded view
|

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

Sven Gothel
Administrator
On Thursday, December 15, 2011 05:27:26 PM michael.mcdougall [via jogamp] wrote:

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

It's solved in the current branch, which will be released as RC5 probably this Sunday.
In RC4, make sure you call the GLProfile.shutdown(GLProfile.ShutdownType.SHARED_ONLY) method,
but neither this nor initSingleton(boolean) is required for RC5 anymore.

~Sven
Reply | Threaded
Open this post in threaded view
|

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

michael.mcdougall
Thanks.
Reply | Threaded
Open this post in threaded view
|

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

Sven Gothel
Administrator
On Friday, December 16, 2011 04:23:20 PM michael.mcdougall [via jogamp] wrote:
>
> Thanks.
>

Should work fine in RC5 now.