FlagStateManager is not thread synced with the main thread
LadyCailinBot opened this issue ยท 2 comments
WORLDGUARD-2289 - Reported by sk89q
I do not know if this was an intentional decision at the time (if the operations were sufficiently thread safe, it would be been appropriate), but now it is definitely not good because FlagStateManager has become a much much larger class doing many more things.
FlagStateManager is a task that runs repeatedly to enforce the heal, etc. flags.
Relevant code:
if (configuration.useRegionsScheduler) {
getServer().getScheduler().scheduleAsyncRepeatingTask(this,
flagStateManager, FlagStateManager.RUN_DELAY,
FlagStateManager.RUN_DELAY);
}```
Comment by sk89q
java.lang.ArrayIndexOutOfBoundsException: 641
at net.minecraft.server.ChunkSection.a(ChunkSection.java:37)
at net.minecraft.server.Chunk.getTypeId(Chunk.java:350)
at net.minecraft.server.World.getTypeId(World.java:181)
at net.minecraft.server.World.s(World.java:1702)
at net.minecraft.server.SpawnerCreature.spawnEntities(SpawnerCreature.java:108)
at net.minecraft.server.WorldServer.doTick(WorldServer.java:154)
at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:565)
at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:215)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:495)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:428)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:818)
How the hell did this bug pass under the radar for so long?
Comment by sk89q
Fixed in 8f409d4