Re: Right method to exit/dispose on linux
Posted by
elect on
Feb 09, 2014; 7:46am
URL: https://forum.jogamp.org/Right-method-to-exit-dispose-on-linux-tp4031504p4031513.html
gouessej wrote
Instead of using an AWT Frame, a NewtCanvasAWT and a GLWindow, I suggest you to use correctly a single GLWindow, set its size, call setVisible(true), etc... I try to know whether your bug comes from NEWT, from AWT or from the NEWT AWT "bridge".
Ah, I got it :)
So:
final Tutorial04 tutorial04 = new Tutorial04();
GLWindow window = tutorial04.getGlWindow();
window.setSize(window.getWidth(), window.getHeight());
window.setVisible(true);Running fine for one second, then I get:
init
reshape (0, 0) (1024, 768)
display
display
display
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 2/2, reusable (open, marked uncloseable): 0, pending (open in creation order): 2)
X11Util: Open X11 Display Connections: 2
X11Util: Open[0]: NamedX11Display[:0.0, 0x7ffc3c09dd70, refCount 1, unCloseable false]
X11Util: Open[1]: NamedX11Display[:0.0, 0x7ffc3c0d65a0, refCount 1, unCloseable false]As you can see, display is called 3 times and then crash. In that 3 calls, it actually draws properly (a red triangle)