When attempting to exit our application, on Mac OS X 10.8, running from a JNLP file, the error listed below is produced. The application then hangs and has to be closed with Force Quit. This is only a problem when the application is run with Java Web Start; when the jar file is run from the command line, the application closes normally. The error is specific to Mac and is not produced on Windows or Linux. Apologies in advance in case turns out to be a JDK bug and not to do with JogAmp. JogAmp version: 2.0.2-rc-20130425 from the JogAmp Maven repository OS version: Mac OS X 10.8.3 Java version: 1.7.0_17 20130506_162817: Exception "java.lang.IllegalStateException: zip file closed" occurred in thread ID 65(Thread-25) java.util.zip.ZipFile.ensureOpen(ZipFile.java:632) java.util.zip.ZipFile.getEntry(ZipFile.java:303) java.util.jar.JarFile.getEntry(JarFile.java:226) com.sun.deploy.cache.CachedJarFile.getEntry(Unknown Source) java.util.jar.JarFile.getJarEntry(JarFile.java:209) com.sun.deploy.security.DeployURLClassPath$JarLoader.getResource(Unknown Source) com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source) java.net.URLClassLoader$1.run(URLClassLoader.java:358) java.net.URLClassLoader$1.run(URLClassLoader.java:355) java.security.AccessController.doPrivileged(Native Method) java.net.URLClassLoader.findClass(URLClassLoader.java:354) com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source) java.lang.ClassLoader.loadClass(ClassLoader.java:423) java.lang.ClassLoader.loadClass(ClassLoader.java:410) java.lang.ClassLoader.loadClass(ClassLoader.java:356) jogamp.opengl.egl.EGLDrawableFactory.destroy(EGLDrawableFactory.java:242) javax.media.opengl.GLDrawableFactory.shutdownImpl(GLDrawableFactory.java:214) javax.media.opengl.GLDrawableFactory.access$100(GLDrawableFactory.java:96) javax.media.opengl.GLDrawableFactory$1.run(GLDrawableFactory.java:233) java.lang.Thread.run(Thread.java:722)
Worked around the IllegalStateException by calling Thread.setDefaultUncaughtExceptionHandler(null); which stops the program hanging, although the IllegalStateException is still generated. Exception in thread "Thread-13" java.lang.IllegalStateException: zip file closed Also noted that IllegalStateException is generated on quitting the JOGL Gears Demo, run from Web Start. The following is generated in the trace file: Exception in thread "Thread-10" java.lang.IllegalStateException: zip file closed at java.util.zip.ZipFile.ensureOpen(ZipFile.java:632) at java.util.zip.ZipFile.getEntry(ZipFile.java:303) at java.util.jar.JarFile.getEntry(JarFile.java:226)
I suspect a bug in Oracle JDK under Mac too but please enable all logs. It would be fine to know which JAR fails to be opened.
Catch any occurring exception at GLDrawable shutdown, report them briefly and verbose w/ DEBUG enabled.