Fabric API

Fabric API

106M Downloads

AnvilScreenHandler crash?

BrekiTomasson opened this issue ยท 4 comments

commented

Just discovered a crash on my 1.16.4 server that is 100% reproducible in my dev environment. When renaming an item in an Anvil, the server process crashes immediately once you begin changing the name of the item. This does not happen when I'm running the game in client mode.

It's clearly one of my installed mods causing this issue, but the crash log doesn't give me any indications as to which one it might be. Is anybody familiar with this and/or has any ideas as to what might be causing it? Here's the crash log with mappings etc:

 java.lang.NoSuchMethodError: 'net.minecraft.text.Text net.minecraft.item.Item.getName()'
        at net.minecraft.screen.AnvilScreenHandler.handler$bae000$updateColor(AnvilScreenHandler.java:1072) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.screen.AnvilScreenHandler.updateResult(AnvilScreenHandler.java) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.screen.AnvilScreenHandler.setNewItemName(AnvilScreenHandler.java:278) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.network.ServerPlayNetworkHandler.onRenameItem(ServerPlayNetworkHandler.java:569) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.network.packet.c2s.play.RenameItemC2SPacket.apply(RenameItemC2SPacket.java:27) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.network.packet.c2s.play.RenameItemC2SPacket.apply(RenameItemC2SPacket.java:12) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils.java:20) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.ServerTask.run(ServerTask.java:17) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor.java:136) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor.java:22) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:752) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.executeTask(MinecraftServer.java:1776) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor.java:109) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:732) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.runTask(MinecraftServer.java:726) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor.java:119) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:712) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.handler$beg000$modifiedRunLoop(MinecraftServer.java:5458) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:646) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:227) ~[minecraft-1.16.4-mapped-net.fabricmc.yarn-1.16.4+build.6-v2.jar:?]
        at java.lang.Thread.run(Thread.java:832) [?:?]
commented

I think you should probably run mod jar inspector on it with mixin listing and then see if any of the mods have a mixin similar to AnvilScreenHandlerMixin or MixinAnvilScreenHandler, specifically with a mixin method called updateColor, and then exclude those mods one by one until you get the mod that produced the crash

Either that or binary search for it

commented

Thanks, I'll give that a try!

commented

Mod JAR Inspector is now my favorite new tool. Managed to isolate the bug in just a few minutes. Turns out it was the "Mini Extras" mod, more specifically its ItemNameColoring module. Once I disabled it in the configuration file, it was smooth sailing from there. Thank you for your help!

commented

Closing since issue seems to have been resolved.