When the stencil buffer is enabled, dragging a window between screens causes the gfx viewport to freeze. Moving it back to the original screen does not restore the rendering. This can be reproduced by compiling the sample app OneTriangleAWT and enabling the stencil buffer on the GLCapabilities object before allocating the GLCanvas. Reverting the JOGL version from 2.3.2 to 2.3.1 fixes the issue. See this forum post for more details: http://forum.jogamp.org/AWT-GLCanvas-freezes-after-screen-change-with-stencil-buffer-enabled-v2-3-2-only-tt4036034.html
Created attachment 770 [details] Runtime Version Check (test.log)
Pasting Mark's whole text here: Maybe related - Bug 995 - Fix for Bug 1184, i.e. jogl commit 6ae08be1742e6d805b316c0d440364854a49e68f - <http://jogamp.org/git/?p=jogl.git;a=commitdiff;h=6ae08be1742e6d805b316c0d440364854a49e68f> ++++ I'm experimenting with the AWT sample app here: https://jogamp.org/wiki/index.php/Using_JOGL_in_AWT_SWT_and_Swing When I build OneTriangleAWT exactly as provided, I can drag the app between my two screens and it continues to resize and redraw properly. However, if I enable the stencil buffer, it freezes after dragging to another screen. I'm enabling the stencil buffer by adding this single line before creating the GLCanvas: glcapabilities.setStencilBits(8); Setting the system property "jogl.screenchange.action" to true or false doesn't change the behavior. This is only happening with v2.3.2 If I revert back to v2.3.1 the problem goes away. This bugfix looks like it might have caused this regression: http://jogamp.org/git/?p=jogl.git;a=commitdiff;h=6ae08be1742e6d805b316c0d440364854a49e68f I searched the open bugs and found this old one which looks similar, but the fact that it goes away for me by reverting the jogl version makes me think this is a different issue. Plus that bug doesn't mention AWT. https://jogamp.org/bugzilla/show_bug.cgi?id=995 NOTE: I began experimenting with this sample app because I am observing the exact issue with a very large legacy application which actually uses the stencil buffer. Reverting the library version to v2.3.1 also fixes the issue with my legacy app.
Looking at your test.log file: Your vendor is Oracle? ;-) +++ Platform: Java Version: 1.8.0-XXXX-v7 (1.8.0u0), VM: OpenJDK 64-Bit Server VM, Runtime: OpenJDK Runtime Environment Platform: Java Vendor: XXXX Inc., JavaSE: true, Java6: true, AWT enabled: true Platform: LINUX / Linux 3.13.0-67-generic (3.13.0), amd64 (X86_64, GENERIC_ABI) +++ I test now with: openjdk version "1.8.0_212" OpenJDK Runtime Environment (build 1.8.0_212-8u212-b01-1~deb9u1-b01) OpenJDK 64-Bit Server VM (build 25.212-b01, mixed mode) Debian 9, GNU/Linux x86_64. GL_VENDOR NVIDIA Corporation GL_RENDERER GeForce GTX 950/PCIe/SSE2 GL_VERSION 4.5.0 NVIDIA 418.43 +++ Testing with com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT on a two monitor setup. Test 1 cmd-line main-arguments: "-time 1000000" Test 2 cmd-line main-arguments: "-time 1000000 -stencil" Both tests open the window and I manually move over to the 2nd screen. Test 1: Issues a recreation of the native GLCanvas, due to format mismatch Test 2: No recreation necessary of the native GLCanvas, no format mismatch when using stencil 8-bit. No test caused any issues. ++++ In detail, Test 1 (mismatch->recreation) debug output: AWT-EventQueue-1: getGraphicsConfiguration() Info: Changed GC and GD Created Config (n): Old GC X11GraphicsConfig[dev=X11GraphicsDevice[screen=1],vis=0x27] Created Config (n): Old GD :0.1 Created Config (n): Parent GC X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x21] Created Config (n): Parent GD :0.0 Created Config (n): New GC X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x27] Created Config (n): New GD :0.0 Created Config (n): Old CF AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection :0.1, unitID 0, awtDevice X11GraphicsDevice[screen=1], handle 0x0], idx 1], chosen GLCaps[glx vid 0x27, fbc 0xad: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/0/0, dbl, mono , hw, GLProfile[GL4/GL4.hw], on-scr[.]], requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL4/GL4.hw], on-scr[.]], In detail, Test 2 (no mismatch->keep) debug output: AWT-EventQueue-1: getGraphicsConfiguration() Info: Changed GC and GD Created Config (n): Old GC X11GraphicsConfig[dev=X11GraphicsDevice[screen=1],vis=0x21] Created Config (n): Old GD :0.1 Created Config (n): Parent GC X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x21] Created Config (n): Parent GD :0.0 Created Config (n): New GC X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x21] Created Config (n): New GD :0.0 Created Config (n): Old CF AWTGraphicsConfiguration[AWTGraphicsScreen[AWTGraphicsDevice[type .awt, connection :0.1, unitID 0, awtDevice X11GraphicsDevice[screen=1], handle 0x0], idx 1], chosen GLCaps[glx vid 0x21, fbc 0xa5: rgba 8/8/8/0, opaque, accum-rgba 16/16/16/16, dp/st/ms 24/8/0, dbl, mono , hw, GLProfile[GL4/GL4.hw], on-scr[.]], requested GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/1/0, dbl, mono , hw, GLProfile[GL4/GL4.hw], on-scr[.]], ... +++ Closing this bug now. If persisting and reproducible (best w/ above test procedure) please reopen.