Bug 728 - Java Web Start: Exception "java.lang.IllegalStateException: zip file closed"
Summary: Java Web Start: Exception "java.lang.IllegalStateException: zip file closed"
Status: RESOLVED FIXED
Alias: None
Product: Jogl
Classification: JogAmp
Component: macosx (show other bugs)
Version: 2
Hardware: All all
: --- normal
Assignee: Sven Gothel
URL:
Depends on:
Blocks:
 
Reported: 2013-05-06 17:58 CEST by Derek Wright
Modified: 2013-06-13 21:27 CEST (History)
1 user (show)

See Also:
Type: ---
SCM Refs:
jogl 33b4f95581938ebbb5af4c37a1c5c2b5ee968f76
Workaround: TRUE


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Wright 2013-05-06 17:58:56 CEST
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)
Comment 1 Derek Wright 2013-05-09 18:19:34 CEST
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)
Comment 2 Julien Gouesse 2013-05-11 18:31:34 CEST
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.
Comment 3 Sven Gothel 2013-06-13 21:27:58 CEST
Catch any occurring exception at GLDrawable shutdown, report them briefly and verbose w/ DEBUG enabled.