Stargate Rewritten

Stargate Rewritten

241 Downloads

Weird iterator error

Thorinwasher opened this issue ยท 1 comments

commented

Scrolling through a networked gate too fast can throw this error in a constant loop:

[18:08:48] [Server thread/WARN]: [Stargate] Task #2 for Stargate v0.11.0.3 generated an exception
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013) ~[?:?]
at java.util.ArrayList$Itr.remove(ArrayList.java:981) ~[?:?]
at net.TheDgtl.Stargate.SyncronousPopulator.run(SyncronousPopulator.java:22) ~[?:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:400) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1252) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:436) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1200) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1027) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:307) ~[spigot-1.17.jar:3162-Spigot-f773da8-b121d3b]
at java.lang.Thread.run(Thread.java:831) [?:?]

commented

This is often thrown when a list is modified while something is accessing it. It might just be a better idea to use queues instead?