HorseManager removeHorse not thread-safe
3ventic opened this issue ยท 2 comments
removeHorse
in HorseManager calls bukkit APIs in a secondary thread, which is not thread-safe and should not be done.
[17:58:27] [Server thread/INFO]: 3ventic issued server command: /zh here
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:30] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:30] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:30] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:30] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
[17:58:31] [Thread-17/WARN]: java.lang.IllegalStateException: Asynchronous Async Chunk Load! Blocking thread until it returns
[17:58:31] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.MCUtil.ensureMain(MCUtil.java:40)
[17:58:31] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.chunkio.ChunkIOExecutor.syncChunkLoad(ChunkIOExecutor.java:18)
[17:58:31] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:158)
[17:58:31] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:141)
[17:58:31] [Thread-17/WARN]: at net.minecraft.server.v1_10_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:137)
[17:58:31] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:149)
[17:58:31] [Thread-17/WARN]: at org.bukkit.craftbukkit.v1_10_R1.CraftWorld.getChunkAt(CraftWorld.java:591)
[17:58:31] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.getChunksInRegion(HorseManager.java:246)
[17:58:31] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager.access$0(HorseManager.java:238)
[17:58:31] [Thread-17/WARN]: at eu.reborn_minecraft.zhorse.managers.HorseManager$1.run(HorseManager.java:180)
Done since bd5c3f