Re: JVM Crash with SIGSEGV
Posted by
huy1912 on
Aug 01, 2016; 3:53am
URL: https://forum.jogamp.org/JVM-Crash-with-SIGSEGV-tp4036967p4037010.html
jmaasing wrote
That means if you have a shutdown hook that calls setVisible(false) or similiar you are breaking the threading contract of AWT/Swing and 'unexpected' behaviour is actually to be expected.
The shutdown hook in my system is only used to close the connection to the server as well as clean up resources. It doesn't invoke any methods related to the AWT/Swing.
What I am going to avoid the crash is to invoke GLCanvas.destroy() in the Shutdown hook thread. As checked the GLCanvas.destroy implemention, I think it's safe to invoke this method from non-EDT which disposes the GL and makes GLDrawable become invalid by setting the GLCanvas.drawable to null.
In your opinion, do you think that there is any issue invoking GLCanvas.destroy() which may result in JVM crash?