PwnFilter

PwnFilter

57.1k Downloads

PwnFilter 3.3.1 explodes on /pfreload on Spigot 1.9.x with a java.util.ConcurrentModificationException

bigpresh opened this issue ยท 4 comments

commented

I use PwnFilter 3.3.1, I used SpecialSauce to get it to run under 1.9, and it mostly seems to work, until I attempt to reload the config/rules with /pfreload which causes a Java exception:

[16:58:24] [Server thread/WARN]: Unexpected exception while parsing console command "pfreload"
org.bukkit.command.CommandException: Unhandled exception executing command 'pfreload' in plugin PwnFilter v3.3.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.dispatchCommand(CraftServer.java:645) ~[2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at org.bukkit.craftbukkit.v1_9_R1.CraftServer.dispatchServerCommand(CraftServer.java:631) [2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at net.minecraft.server.v1_9_R1.DedicatedServer.aL(DedicatedServer.java:438) [2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at net.minecraft.server.v1_9_R1.DedicatedServer.D(DedicatedServer.java:401) [2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at net.minecraft.server.v1_9_R1.MinecraftServer.C(MinecraftServer.java:660) [2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at net.minecraft.server.v1_9_R1.MinecraftServer.run(MinecraftServer.java:559) [2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_74]
Caused by: java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) ~[?:1.8.0_74]
    at java.util.HashMap$KeyIterator.next(HashMap.java:1453) ~[?:1.8.0_74]
    at com.pwn9.PwnFilter.DataCache.stop(DataCache.java:106) ~[?:?]
    at com.pwn9.PwnFilter.command.pfreload.onCommand(pfreload.java:46) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[2016-04-02-22-38-43-spigot-1.9-jenkins-780.jar:git-Spigot-d20369f-7fc5cd8]
    ... 8 more

Looks to be related to https://hub.spigotmc.org/jira/browse/SPIGOT-461 possibly.

Is there an easy workaround? I realise proper 1.9 compatibility is "coming soon", and I'm jumping the gun somewhat, but wanted to report this as it's something that will presumably need to be addressed before a 1.9 compatible version could be released, and might be useful for others also having this problem to find the bug report.

commented

FYI, I have heavily refactored PwnFilter over the past few weeks, and will be publishing a 3.9.0 release (that supports 1.9) as soon as I have ensured that all the features are working correctly.

After this, I will be working on a 4.x release which will support Spigot 1.9 as well as Sponge.

commented

Ah, awesome. I'd be happy to help test if required - I'd be testing it out on my test server when it was released anyway, so if there's anything I can do to help before that, I'd be happy to.

I'm not a proficient Java coder, but I've been hacking on some custom plugin stuff recently to learn more.

commented

Please try the latest 3.9.0 development build: https://ci.sagely.ca/job/PwnFilterDevelopment/

commented

Happy to say that build does indeed solve this problem - thanks!