I have an application with a JOGL component. When it shuts down using System.exit(0), I frequently get the exception:
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at sun.java2d.Disposer.run(Disposer.java:125)
at java.lang.Thread.run(Thread.java:619)
I have seen this question http://stackoverflow.com/questions/2873449/occasional-interruptedexception-when-quitting-a-swing-application but I don't have any non-daemon threads running. I'm wondering if the underlying JOGL code is continuously putting events in the swing event queue which could cause this error since the swing app will only shutdown properly when the event queue is empty.
Is there a way to shutdown more cleanly? Maybe somehow stop the JOGL main loop (I'm using a 3rd party tool, nasa worldwind, so I don't necessarily have access to the main Animator running the app).
EDIT: It turns out this was not an openGL problem at all. OpenGL was being properly shutdown and there was just a race in a shutdown hook I had running. Thanks.