Litematica

Litematica

9M Downloads

Mod incompatibility crash on world join

clarfonthey opened this issue ยท 4 comments

commented

So, when I tried testing the configuration of my mods on 1.18.2, I got this crash when loading a brand new single player world, where the crash happens at the "Joining World" screen. Here's the trace using Not Enough Crashes:

[01:43:39] [Render thread/WARN]: addIdMetaToBlockState(): Exception while adding blockstate conversion map entry for ID '2943'
java.lang.IllegalArgumentException: Data fixer not registered for: minecraft:DUMMY in block_entity
	at Not Enough Crashes deobfuscated stack trace.(1.18.2+build.2) ~[?:?]
	at com.mojang.datafixers.schemas.Schema.getChoiceType(Schema.java:109) ~[datafixerupper-4.1.27.jar:?]
	at net.minecraft.datafixer.schema.IdentifierNormalizingSchema.getChoiceType(IdentifierNormalizingSchema:52) ~[?:?]
	at net.minecraft.datafixer.fix.ChoiceFix.makeRule(ChoiceFix:24) ~[?:?]
	at com.mojang.datafixers.DataFix.getRule(DataFix.java:108) ~[datafixerupper-4.1.27.jar:?]
	at com.mojang.datafixers.DataFixerUpper.lambda$getRule$6(DataFixerUpper.java:130) ~[datafixerupper-4.1.27.jar:?]
	at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.computeIfAbsent(Long2ObjectOpenHashMap.java:499) ~[fastutil-8.5.6.jar:?]
	at it.unimi.dsi.fastutil.longs.Long2ObjectMaps$SynchronizedMap.computeIfAbsent(Long2ObjectMaps.java:455) ~[fastutil-8.5.6.jar:?]
	at com.mojang.datafixers.DataFixerUpper.getRule(DataFixerUpper.java:125) ~[datafixerupper-4.1.27.jar:?]
	at com.mojang.datafixers.DataFixerUpper.update(DataFixerUpper.java:84) ~[datafixerupper-4.1.27.jar:?]
	at fi.dy.masa.litematica.schematic.conversion.SchematicConversionMaps.updateBlockName(SchematicConversionMaps.java:281) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.litematica.schematic.conversion.SchematicConversionMaps.addIdMetaToBlockState(SchematicConversionMaps.java:192) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.litematica.schematic.conversion.SchematicConversionMaps.computeMaps(SchematicConversionMaps.java:72) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.litematica.event.WorldLoadListener.onWorldLoadPost(WorldLoadListener.java:31) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.malilib.event.WorldLoadHandler.onWorldLoadPost(WorldLoadHandler.java:89) ~[malilib-fabric-1.18.2-0.12.1.jar:?]
	at net.minecraft.client.network.ClientPlayNetworkHandler.handler$cmo000$onPostGameJoin(ClientPlayNetworkHandler:6915) ~[?:?]
	at net.minecraft.client.network.ClientPlayNetworkHandler.onGameJoin(ClientPlayNetworkHandler:395) ~[?:?]
	at net.minecraft.network.packet.s2c.play.GameJoinS2CPacket.apply(GameJoinS2CPacket:83) ~[?:?]
	at net.minecraft.network.packet.s2c.play.GameJoinS2CPacket.apply(GameJoinS2CPacket:19) ~[?:?]
	at net.minecraft.network.NetworkThreadUtils.method_11072(NetworkThreadUtils:22) ~[?:?]
	at net.minecraft.util.thread.ThreadExecutor.executeTask(ThreadExecutor:157) ~[?:?]
	at net.minecraft.util.thread.ReentrantThreadExecutor.executeTask(ReentrantThreadExecutor:23) ~[?:?]
	at net.minecraft.util.thread.ThreadExecutor.runTask(ThreadExecutor:131) ~[?:?]
	at net.minecraft.util.thread.ThreadExecutor.runTasks(ThreadExecutor:116) ~[?:?]
	at net.minecraft.client.MinecraftClient.render(MinecraftClient:1085) ~[?:?]
	at net.minecraft.client.MinecraftClient.run(MinecraftClient:737) ~[?:?]
	at net.minecraft.client.main.Main.main(Main:236) [client-intermediary.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.13.3.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]

And here's the trace without Not Enough Traces:

[02:17:15] [Render thread/WARN]: addIdMetaToBlockState(): Exception while adding blockstate conversion map entry for ID '691'
java.lang.IllegalArgumentException: Data fixer not registered for: minecraft:DUMMY in block_entity
	at com.mojang.datafixers.schemas.Schema.getChoiceType(Schema.java:109) ~[datafixerupper-4.1.27.jar:?]
	at net.minecraft.class_1220.getChoiceType(class_1220.java:52) ~[client-intermediary.jar:?]
	at net.minecraft.class_1197.makeRule(class_1197.java:24) ~[client-intermediary.jar:?]
	at com.mojang.datafixers.DataFix.getRule(DataFix.java:108) ~[datafixerupper-4.1.27.jar:?]
	at com.mojang.datafixers.DataFixerUpper.lambda$getRule$6(DataFixerUpper.java:130) ~[datafixerupper-4.1.27.jar:?]
	at it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap.computeIfAbsent(Long2ObjectOpenHashMap.java:499) ~[fastutil-8.5.6.jar:?]
	at it.unimi.dsi.fastutil.longs.Long2ObjectMaps$SynchronizedMap.computeIfAbsent(Long2ObjectMaps.java:455) ~[fastutil-8.5.6.jar:?]
	at com.mojang.datafixers.DataFixerUpper.getRule(DataFixerUpper.java:125) ~[datafixerupper-4.1.27.jar:?]
	at com.mojang.datafixers.DataFixerUpper.update(DataFixerUpper.java:84) ~[datafixerupper-4.1.27.jar:?]
	at fi.dy.masa.litematica.schematic.conversion.SchematicConversionMaps.updateBlockName(SchematicConversionMaps.java:281) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.litematica.schematic.conversion.SchematicConversionMaps.addIdMetaToBlockState(SchematicConversionMaps.java:192) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.litematica.schematic.conversion.SchematicConversionMaps.computeMaps(SchematicConversionMaps.java:72) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.litematica.event.WorldLoadListener.onWorldLoadPost(WorldLoadListener.java:31) ~[litematica-fabric-1.18.2-0.11.1.jar:?]
	at fi.dy.masa.malilib.event.WorldLoadHandler.onWorldLoadPost(WorldLoadHandler.java:89) ~[malilib-fabric-1.18.2-0.12.1.jar:?]
	at net.minecraft.class_634.handler$zcm000$onPostGameJoin(class_634.java:2915) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_11120(class_634.java:395) ~[client-intermediary.jar:?]
	at net.minecraft.class_2678.method_11567(class_2678.java:83) ~[client-intermediary.jar:?]
	at net.minecraft.class_2678.method_11054(class_2678.java:19) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:157) [client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:131) [client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:116) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1085) [client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:737) [client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:236) [client-intermediary.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:416) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77) [fabric-loader-0.13.3.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.13.3.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]

Disabling Litematica fixed the crash, but what's weird is that running with just Litematica and MaLiLib does not have the crash. So, clearly, it's an incompatibility of some sort.

After much pain, I finally determined the combination of mods that made this happen. Removing any of the bolded mods fixes the crash:

  • Minecraft 1.18.2
  • MaLiLib 0.12.1
  • Litematica 0.11.1
  • LazyDFU 0.1.2
  • Entity Texture Features 2.6.RC2

Removing Not Enough Crashes (4.1.4+1.18.2) does not actually stop the crash, but I did check for completeness. I'm also running on the Fabric Loader 0.13.3, but that shouldn't affect this.

If at first glance it seems to be the fault of either LazyDFU or ETF that this is crashing, I will forward this issue to them instead. I decided to start here since Litematica appears directly in the stack trace. Note that I do not have this crash on 1.18.1 where I also have these mods installed, in case that helps narrow down the issue:

  • Minecraft 1.18.1
  • MaLiLib 0.11.8
  • Litematica 0.10.4
  • LazyDFU 0.1.2
  • Entity Texture Features 2.4.1

I strongly suspect that this isn't LazyDFU's fault since it hasn't had any changes since then, although ETF may be at fault instead. I find it very strange that a texture mod would cause a crash on world join, though, especially during the DFU stage. My guess is that there's a case not being handled in the litematica code that was dredged up during the latest updates of all these mods.

commented

Unless I'm using the DFU wrong there somehow, the only thing I can do is just put that schematic conversion data initialization inside a try-catch block.

The funny thing is that I believe this exact crash used to occur before with some other mods (well, I can't remember which other mod it was, but I think LazyDFU again was the second mod required for the crash). But then I moved the initialization call from game launch to world join, and that seemed to fix the crash in that case. No idea what the deal is with those minecraft:DUMMY entries...

commented

Yeah, this is an extremely weird bug, which is why I tried my best to provide as many details as I could to help reproduce. Not sure who in the Minecraft dev space is most familiar with DFU and could potentially help out with this, since I also have no idea how to even begin to debug this.

commented

The other mod where it happened was CIT Resewn SHsuperCM/CITResewn#58

The fix proposed here Traben-0/Entity_Texture_Features#34 (comment) actually works.

In both cases, it appears to be linked to resource name checking, and requires LazyDFU to also be present.

commented

Closing since the fix in Traben-0/Entity_Texture_Features#35 was merged there.