WorldEdit

WorldEdit

43M Downloads

ClassCastException with tile entities

LadyCailinBot opened this issue ยท 5 comments

commented

WORLDEDIT-2836 - Reported by OptimumDuck

I've recently encountered a bug that allmost crashed my server where changing a burning furnace to a sign post made a severe error in bukkit.
Log:
[INFO] JJSam54 issued server command: //set 62
2013-06-26 18:04:39 [INFO] TrollZElit314 lost connection: disconnect.quitting
2013-06-26 18:04:39 [INFO] Connection reset
2013-06-26 18:04:41 [INFO] JJSam54 issued server command: //set 63
2013-06-26 18:04:41 [SEVERE] Block at -31,3,41 is SIGN_POST but has net.minecraft.server.v1_5_R3.TileEntityFurnace@572a2d95. Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.
2013-06-26 18:04:41 [WARNING] WorldEdit: Failed to do NMS safe block set
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sk89q.worldedit.bukkit.BukkitWorld.setBlock(BukkitWorld.java:1345)
at com.sk89q.worldedit.EditSession.rawSetBlock(EditSession.java:237)
at net.coreprotect.worldedit.CoreProtectEditSession.rawSetBlock(CoreProtectEditSession.java:39)
at com.sk89q.worldedit.EditSession.flushQueue(EditSession.java:786)
at com.sk89q.worldedit.WorldEdit.handleCommand(WorldEdit.java:1413)
at com.sk89q.worldedit.bukkit.WorldEditPlugin.onCommand(WorldEditPlugin.java:247)
at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189)
at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:523)
at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:971)
at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889)
at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846)
at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44)
at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292)
at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115)
at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35)
at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581)
at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226)
at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477)
at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410)
at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
Caused by: java.lang.ClassCastException: net.minecraft.server.v1_5_R3.TileEntitySign cannot be cast to net.minecraft.server.v1_5_R3.TileEntityFurnace
at net.minecraft.server.v1_5_R3.BlockFurnace.remove(SourceFile:153)
at net.minecraft.server.v1_5_R3.Chunk.a(Chunk.java:397)
at net.minecraft.server.v1_5_R3.World.setTypeIdAndData(World.java:302)
at com.sk89q.worldedit.bukkit.DefaultNmsBlock.setSafely(DefaultNmsBlock.java:256)
... 25 more
2013-06-26 18:04:41 [SEVERE] Block at -31,3,42 is SIGN_POST but has net.minecraft.server.v1_5_R3.TileEntityFurnace@1216bde8. Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.
2013-06-26 18:04:41 [SEVERE] java.lang.ClassCastException: net.minecraft.server.v1_5_R3.TileEntitySign cannot be cast to net.minecraft.server.v1_5_R3.TileEntityFurnace
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.BlockFurnace.remove(SourceFile:153)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.Chunk.a(Chunk.java:397)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.World.setTypeIdAndData(World.java:302)
2013-06-26 18:04:41 [SEVERE] at org.bukkit.craftbukkit.v1_5_R3.block.CraftBlock.setTypeIdAndData(CraftBlock.java:121)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.bukkit.BukkitWorld.setTypeIdAndData(BukkitWorld.java:303)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.LocalWorld.setBlock(LocalWorld.java:537)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.bukkit.BukkitWorld.setBlock(BukkitWorld.java:1352)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.EditSession.rawSetBlock(EditSession.java:237)
2013-06-26 18:04:41 [SEVERE] at net.coreprotect.worldedit.CoreProtectEditSession.rawSetBlock(CoreProtectEditSession.java:39)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.EditSession.flushQueue(EditSession.java:786)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.WorldEdit.handleCommand(WorldEdit.java:1413)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.worldedit.bukkit.WorldEditPlugin.onCommand(WorldEditPlugin.java:247)
2013-06-26 18:04:41 [SEVERE] at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
2013-06-26 18:04:41 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:189)
2013-06-26 18:04:41 [SEVERE] at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(CraftServer.java:523)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:971)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410)
2013-06-26 18:04:41 [SEVERE] at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)

commented

Comment by Dark_Arc

Does this happen every time you change a burning furnace to a sign?

commented

Comment by OptimumDuck

yes it does i actually tried doing it again to see if it was a lag spike or something but the same error happened

commented

Comment by sk89q

Your WE version? {{/we version}}

commented

Comment by wizjany

this is due to tileentities not being removed from the minecraft's internal list when the block itself is removed
there's basically a weird path of invalidating and cleaning out tileentities, but since worldedit tries placing a new block (w/e a TE) before that finishes, minecraft gives this error

commented

Comment by wizjany

as of 5.x/early 6.x, this is a bukkit issue unsolvable by us. in the future we may be able to workaround it by setting TileEntities on a tick after a TileEntity was previously in the same position.