[jme3] exit application gracefully

Hi,

how can I exit the application gracefully? I followed the AWT test code in the source, but there is the LWGL Renderer Thread that is still holding the app.



I do a JFrame with JFrame.DO_NOTHING_ON_CLOSE. In the WindowAdapter#windowClosing() I do:



frame.setVisible(false);

frame.dispose();

app.stop();

The thread is locked in reinitAuthLock.wait(); on LwjglCanvas.runLoop() line 155.

Thank you.

Seems like app.stop() works in windowClosed but not in windowClosing…

I’ll try to see if maybe I can unlock the thread so it can check if its due to stopping of the context.

It’s the same if I set JFrame.DISPOSE_ON_CLOSE and put the same code inside the windowClosed() method.



For now I put a System.exit(0); on the end of my program, so it’s not critical.

Thank you for fixing it.

Should be fixed in SVN now.