IllegalStateException: zip file closed
mibby opened this issue · 7 comments
I've been testing out a bunch of plugins in a new 1.13 environment to see what breaks. Just thought I'd let you know about this error I came across. :)
Magic v7.6.8
Paper-1.13 dev 152 (Spigot 1.13)
[13:08:02] [Craft Scheduler Thread - 32/WARN]: [Magic] Plugin Magic v7.6.8-d58a548 generated an exception while executing task 152
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:686) ~[?:1.8.0_181]
at java.util.zip.ZipFile.getEntry(ZipFile.java:315) ~[?:1.8.0_181]
at java.util.jar.JarFile.getEntry(JarFile.java:240) ~[?:1.8.0_181]
at java.util.jar.JarFile.getJarEntry(JarFile.java:223) ~[?:1.8.0_181]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:120) ~[patched_1.13.jar:git-Paper-152]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:104) ~[patched_1.13.jar:git-Paper-152]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_181]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_181]
at com.elmakers.mine.bukkit.utility.SkinUtils.synchronizeCallback(SkinUtils.java:255) ~[?:?]
at com.elmakers.mine.bukkit.utility.SkinUtils.access$800(SkinUtils.java:30) ~[?:?]
at com.elmakers.mine.bukkit.utility.SkinUtils$4.run(SkinUtils.java:387) ~[?:?]
at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.jar:git-Paper-152]
at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.jar:git-Paper-152]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.jar:git-Paper-152]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
That’s a pretty weird one. Did you use /reload or swap out the jar while the server was running? Did this happen on shutdown?
I did not reload or swap out the jar. It's possible I may have hit the shutdown button (which runs stop command) a bit too quickly before it just finished starting up though!
I received this same error after updating from v7.6.6 to v7.6.8 on 1.13.
[Magic] Plugin Magic v7.6.8-cf0cf81 generated an exception while executing task 16
java.lang.IllegalStateException: zip file closed
at java.util.zip.ZipFile.ensureOpen(ZipFile.java:686) ~[?:1.8.0_181]
at java.util.zip.ZipFile.getEntry(ZipFile.java:315) ~[?:1.8.0_181]
at java.util.jar.JarFile.getEntry(JarFile.java:240) ~[?:1.8.0_181]
at java.util.jar.JarFile.getJarEntry(JarFile.java:223) ~[?:1.8.0_181]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:120) ~[patched_1.13.jar:git-Paper-154]
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:104) ~[patched_1.13.jar:git-Paper-154]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_181]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_181]
at com.elmakers.mine.bukkit.utility.SkinUtils.synchronizeCallback(SkinUtils.java:255) ~[?:?]
at com.elmakers.mine.bukkit.utility.SkinUtils.access$800(SkinUtils.java:30) ~[?:?]
at com.elmakers.mine.bukkit.utility.SkinUtils$4.run(SkinUtils.java:387) ~[?:?]
at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftTask.run(CraftTask.java:63) ~[patched_1.13.jar:git-Paper-154]
at org.bukkit.craftbukkit.v1_13_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:52) ~[patched_1.13.jar:git-Paper-154]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.13.jar:git-Paper-154]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
Downgrading to v7.6.6 resolved the issue.
@NathanWolf No, the plugin was disabled after loading, I assume because of the error.
Oh, I think I know why. I had the 1.13 LibsDisguises on the server, but I didn't have the premium JAR required for it to work, so it disabled itself. Magic was erroring because it couldn't find the class me/libraryaddict/disguise/disguisetypes/Disguise
after detecting LibsDisguises.
After removing LibsDisguises, v7.6.8 worked like a charm. I assume the error here is not checking if the plugin is enabled, only if it loaded, before attempting to use its classes. At least in my case.
I think OP here needs to include the error that occurred before the one reported.
Well I tested the latest release from spigotmc and it seems ok on its own.
I've added isEnabled() checks to all plugins I integrate with (in latest dev build) so hopefully, if this was just an issue with LibsDisguises, it won't happen in the future.
@mibby do you think you had the same issue, with LibsDisguises not being updated- or was it maybe something different? If it was possibly the same thing then I'll go ahead and close this issue.
It's possible it could have been LibsDisguise not enabled in my 1.13 test environment, but I tend to keep everything up to date. I'll update Magic and give 1.13 another test. :)
Might have been due to LibsDisguise keeping 1.13 builds disabled unless you have the premium version installed in the plugin folder.