Created attachment 763 [details] Bug case The following program will trigger a NativeWindowException: Exception in thread "main" com.jogamp.opengl.GLException: Caught NativeWindowException: didn't release surface Handle: GDISurface[ displayHandle 0x0 , surfaceHandle 0x3c010834 , size 640x480 , UOB[ WINDOW_INVISIBLE ] , WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x57566b8f]], idx 0], pfdID 2, ARB-Choosen true, requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], offscr[fbo]], chosen GLCaps[wgl vid 2 arb: rgba 8/8/8/8, trans-rgba 0x0/0/0/0, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], on-scr[.]]] , surfaceLock <7a79be86, 34ce8af7>[count 1, qsz 0, owner <main>] , GDIDummyUpstreamSurfaceHook[pixel 640x480] , upstreamSurface false ] on thread main at com.jogamp.opengl.GLException.newGLException(GLException.java:76) at jogamp.opengl.GLAutoDrawableBase.destroyImplInLock(GLAutoDrawableBase.java:404) at com.jogamp.opengl.GLAutoDrawableDelegate.destroyImplInLock(GLAutoDrawableDelegate.java:185) at jogamp.opengl.GLAutoDrawableBase.defaultDestroy(GLAutoDrawableBase.java:345) at com.jogamp.opengl.GLAutoDrawableDelegate.destroy(GLAutoDrawableDelegate.java:180) at com.io7m.scontext.CreateUnsharedContext0.main(CreateUnsharedContext0.java:26) Caused by: com.jogamp.nativewindow.NativeWindowException: didn't release surface Handle: GDISurface[ displayHandle 0x0 , surfaceHandle 0x3c010834 , size 640x480 , UOB[ WINDOW_INVISIBLE ] , WindowsWGLGraphicsConfiguration[DefaultGraphicsScreen[WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0x57566b8f]], idx 0], pfdID 2, ARB-Choosen true, requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], offscr[fbo]], chosen GLCaps[wgl vid 2 arb: rgba 8/8/8/8, trans-rgba 0x0/0/0/0, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL3/GL3.hw], on-scr[.]]] , surfaceLock <7a79be86, 34ce8af7>[count 1, qsz 0, owner <main>] , GDIDummyUpstreamSurfaceHook[pixel 640x480] , upstreamSurface false ] at jogamp.nativewindow.windows.GDISurface.invalidateImpl(GDISurface.java:70) at jogamp.nativewindow.ProxySurfaceImpl.destroyNotify(ProxySurfaceImpl.java:115) at jogamp.opengl.GLDrawableImpl.setRealized(GLDrawableImpl.java:206) at jogamp.opengl.GLAutoDrawableBase.destroyImplInLock(GLAutoDrawableBase.java:385) Calling release() on the drawable's context just prior to calling destroy() will work around the issue. Platform is Windows 7 x86_64. AMD Catalyst 13.9. The drivers are the latest that are available, but could be charitably referred to as "elderly".
This was against JOGL 2.3.1.
I am prepared to believe that this is a documentation issue; I'm guessing there's behaviour that is allowed on some platforms and not others. The behaviour is consistent: It's not possible to destroy a drawable that is referenced in some manner, either by having a current context or being shared with something that has a current context.