Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What the heck is this? #9

Open
ttk2 opened this issue Jan 2, 2013 · 1 comment
Open

What the heck is this? #9

ttk2 opened this issue Jan 2, 2013 · 1 comment

Comments

@ttk2
Copy link

ttk2 commented Jan 2, 2013

2013-01-02 13:49:15 [WARNING] [PrisonPearl] Task #23 for PrisonPearl v1.5.1 generated an exception
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:894)
at java.util.HashMap$EntryIterator.next(HashMap.java:934)
at java.util.HashMap$EntryIterator.next(HashMap.java:932)
at com.untamedears.PrisonPearl.SummonManager.inflictSummonDamage(SummonManager.java:94)
at com.untamedears.PrisonPearl.SummonManager.access$0(SummonManager.java:91)
at com.untamedears.PrisonPearl.SummonManager$1.run(SummonManager.java:40)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:53)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:345)
at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:514)
at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:222)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:478)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:413)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:856)

@WildWeazel
Copy link

Shouldn't that map (SummonManager.summons) be a ConcurrentHashMap? It's being accessed, in inflictSummonDamage from a task scheduler outside of the main thread. Not sure if that will completely resolve the problem (multithreading, yay!), but it's what sticks out to me.

http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants