Re: Incomplete shutdown (Eclipse)

Posted by Sven Gothel on
URL: https://forum.jogamp.org/Incomplete-shutdown-Eclipse-tp4025154p4032506.html

On 06/28/2014 11:24 PM, raptor [via jogamp] wrote:

> I found the same problem here, as soon as I call JOGL it does not terminate .
>
> E.g. If I only put the below code in main it still does not close cleanly:
> /GLProfile glpMinimal = GLProfile.get(GLProfile.GL2);/
>
> I thought its my driver when C calls are made but it does not appear to be the
> case since it works with LWJGL 2.9.1
>
> Obviously when something simple is put in the main function like sys out, it
> also works.
>
This is quite interesting, i.e. especially that the simple 'sys out'
allows the background thread to end.

Yes, JOGL initialization shall bring-up a thread called 'main-SharedResourceRunner'

If a NEWT window/display is open, a thread called 'main-Display-.x11_:0-1-EDT-1'
should be alive.

etc ..

However, these threads are daemon threads _and_
shall be explicitly brought down by our JVM shutdown-hook.
Even if the latter is not working, a daemon thread
shall not hinder the JVM to shutdown.

Maybe JOGL is running in a pre-existing JVM, hence sharing such instance
and is never brought down ?

I tested running single JOGL unit test and JOGL demo applications
from within Eclipse and I could not see remaining JVM instances or threads.

~Sven

> Did anybody resolve this?


signature.asc (894 bytes) Download Attachment