Solution for X11Util.Display: Shutdown warning?

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

Solution for X11Util.Display: Shutdown warning?

Andrew2563
I'm getting a X11Util.Display: Shutdown message on Ubuntu 20.04, running llvmpipe (LLVM 12.0.0, 256 bits; Mesa 21.0.3), when my Java 3D code exits:

X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 2, pending (open in creation order): 3)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[localhost:10.0, 0x7fe1a4006500, refCount 1, unCloseable true]

I  had a look at the 2013 thread about this, and the JOGL 705 bug, for ideas, but I wasn't able to get the message to go away.

I'm placing my Canvas3D object inside a GLJPanel that's inside a JFrame. At initialization time, I call
X11Util.markAllDisplaysUnclosable(); and at termination time I have the following windowClosing() method

       public void windowClosing(WindowEvent e)
       {
         // System.out.println("Closing");
         frame.setVisible(false);
/*
         GraphicsDevice gDevice = GraphicsEnvironment.
             getLocalGraphicsEnvironment().getDefaultScreenDevice();
         // System.out.println("GraphicsDevice: " + gDevice);
         if (gDevice.toString().contains("X11")) {
           // long displayHandle = panel.getHandle();
           NativeSurface surface = panel.getNativeSurface();
           long displayHandle = surface.getDisplayHandle();
           X11GraphicsDevice x11Device = new X11GraphicsDevice(
                                    displayHandle,
                                    AbstractGraphicsDevice.DEFAULT_UNIT, true);
           // x11Device.close();  // this causes a thread-related crash
         }
*/
         frame.getContentPane().remove(panel);
         panel.setEnabled(false);
         panel.destroy();
         frame.dispose();
       }

The commented out stuff is a reflection of various things I've tried :)
frame is my JFrame object; panel is the GLJPanel.
Reply | Threaded
Open this post in threaded view
|

Re: Solution for X11Util.Display: Shutdown warning?

gouessej
Administrator
Hello

If it's uncloseable, we can't close it. Maybe you'll have to live with that.
Julien Gouesse | Personal blog | Website