someaddons / connectivity

Minecraft mod connectivity which fixes connection issues
9 stars 1 forks source link

[Bug]: 4.0+ ClientboundCustomPayloadPacketMixin injection failure with Create + MineCells #69

Closed No3371 closed 1 year ago

No3371 commented 1 year ago

Describe the bug you're experiencing

This happens after upgrading Connectivity from 3.8.

I took some time to isolate out the conflicting mods, it turned out to be an interesting 3 mods compatibility issue.

Removing either Create, MineCells, or Connectivity can prevent the failure from happening.

The provided link to the crash report shows more relevant info, but these lines from the server log could be worth taking a look:

``` [14:42:46] [Server thread/WARN]: [org.spongepowered.asm.mixin.injection.invoke.RedirectInjector#preInject] @ModifyConstant conflict. Skipping connectivity.mixins.json:ClientboundCustomPayloadPacketMixin from mod connectivity->@ModifyConstant::modifyLimit(I)I with priority 1000, already redirected by minecells.mixins.json:network.CustomPayloadS2CPacketMixin from mod minecells->@ModifyConstant::minecells$initModifyMaxSize(I)I with priority 2275 [14:42:46] [Server thread/WARN]: [org.spongepowered.asm.mixin.injection.invoke.RedirectInjector#preInject] @ModifyConstant conflict. Skipping connectivity.mixins.json:ClientboundCustomPayloadPacketMixin from mod connectivity->@ModifyConstant::modifyLimit(I)I with priority 1000, already redirected by minecells.mixins.json:network.CustomPayloadS2CPacketMixin from mod minecells->@ModifyConstant::minecells$init2ModifyMaxSize(I)I with priority 2275 [14:42:46] [Server thread/ERROR]: Encountered an unexpected exception net.minecraft.class_148: Exception ticking world at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:879) ~[server-intermediary.jar:?] at net.minecraft.class_3176.method_3813(class_3176.java:289) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257) ~[server-intermediary.jar:?] at java.lang.Thread.run(Thread.java:833) [?:?] Caused by: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_2658 failed at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112) ~[fabric-loader-0.14.19.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.fabricmc.fabric.impl.networking.server.ServerNetworkingImpl.createPlayC2SPacket(ServerNetworkingImpl.java:45) ~[fabric-networking-api-v1-1.2.11+10eb22f490-f06f04cf50fd31dd.jar:?] at net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking.createS2CPacket(ServerPlayNetworking.java:211) ~[fabric-networking-api-v1-1.2.11+10eb22f490-f06f04cf50fd31dd.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.createVanillaPacket(SimpleChannel.java:153) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.sendToClients(SimpleChannel.java:182) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.sendToClientsTracking(SimpleChannel.java:210) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController.sendData(MinecartController.java:296) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController.tick(CapabilityMinecartController.java:114) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at com.simibubi.create.events.CommonEvents.onServerWorldTick(CommonEvents.java:118) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) ~[fabric-lifecycle-events-v1-2.2.4+1b46dc7890-db0fd3f5dc0d6099.jar:?] at net.minecraft.class_3218.handler$zio000$fabric-lifecycle-events-v1$endWorldTick(class_3218.java:2729) ~[server-intermediary.jar:?] at net.minecraft.class_3218.method_18765(class_3218.java:384) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:875) ~[server-intermediary.jar:?] ... 5 more Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112) ~[fabric-loader-0.14.19.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.fabricmc.fabric.impl.networking.server.ServerNetworkingImpl.createPlayC2SPacket(ServerNetworkingImpl.java:45) ~[fabric-networking-api-v1-1.2.11+10eb22f490-f06f04cf50fd31dd.jar:?] at net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking.createS2CPacket(ServerPlayNetworking.java:211) ~[fabric-networking-api-v1-1.2.11+10eb22f490-f06f04cf50fd31dd.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.createVanillaPacket(SimpleChannel.java:153) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.sendToClients(SimpleChannel.java:182) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.sendToClientsTracking(SimpleChannel.java:210) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController.sendData(MinecartController.java:296) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController.tick(CapabilityMinecartController.java:114) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at com.simibubi.create.events.CommonEvents.onServerWorldTick(CommonEvents.java:118) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) ~[fabric-lifecycle-events-v1-2.2.4+1b46dc7890-db0fd3f5dc0d6099.jar:?] at net.minecraft.class_3218.handler$zio000$fabric-lifecycle-events-v1$endWorldTick(class_3218.java:2729) ~[server-intermediary.jar:?] at net.minecraft.class_3218.method_18765(class_3218.java:384) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:875) ~[server-intermediary.jar:?] ... 5 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Constant modifier method modifyLimit(I)I in connectivity.mixins.json:ClientboundCustomPayloadPacketMixin from mod connectivity failed injection check, (0/1) succeeded. Scanned 2 target(s). Using refmap connectivity-fabric-refmap.json at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:468) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1385) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1062) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:402) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:327) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) ~[sponge-mixin-0.12.4+mixin.0.8.5.jar:0.12.4+mixin.0.8.5] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:422) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) ~[fabric-loader-0.14.19.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:112) ~[fabric-loader-0.14.19.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.fabricmc.fabric.impl.networking.server.ServerNetworkingImpl.createPlayC2SPacket(ServerNetworkingImpl.java:45) ~[fabric-networking-api-v1-1.2.11+10eb22f490-f06f04cf50fd31dd.jar:?] at net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking.createS2CPacket(ServerPlayNetworking.java:211) ~[fabric-networking-api-v1-1.2.11+10eb22f490-f06f04cf50fd31dd.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.createVanillaPacket(SimpleChannel.java:153) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.sendToClients(SimpleChannel.java:182) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at me.pepperbell.simplenetworking.SimpleChannel.sendToClientsTracking(SimpleChannel.java:210) ~[porting_lib_networking-2.1.926+1.19.2-57924065650eb0b6.jar:?] at com.simibubi.create.content.contraptions.components.structureMovement.train.capability.MinecartController.sendData(MinecartController.java:296) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at com.simibubi.create.content.contraptions.components.structureMovement.train.capability.CapabilityMinecartController.tick(CapabilityMinecartController.java:114) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at com.simibubi.create.events.CommonEvents.onServerWorldTick(CommonEvents.java:118) ~[create-fabric-0.5.0.i-1003+1.19.2.jar:?] at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$6(ServerTickEvents.java:108) ~[fabric-lifecycle-events-v1-2.2.4+1b46dc7890-db0fd3f5dc0d6099.jar:?] at net.minecraft.class_3218.handler$zio000$fabric-lifecycle-events-v1$endWorldTick(class_3218.java:2729) ~[server-intermediary.jar:?] at net.minecraft.class_3218.method_18765(class_3218.java:384) ~[server-intermediary.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:875) ~[server-intermediary.jar:?] ... 5 more ```

Reproducability

  1. Install these mods:
    • connectivity-fabric-1.19.2-4.1.jar
    • create-fabric-0.5.0.i-1003+1.19.2.jar
    • fabric-api-0.76.0+1.19.2.jar
    • minecells-1.4.3.jar
  2. Launch the server.

Mod up to date

Minecraft version

1.19

Modloader version

Fabric

Logs

https://gist.github.com/No3371/deda4d076aceba9fffa13c4c1bf8e407

someaddons commented 1 year ago

ye thats an incompat with minecells, for some reason they are adding packet limit breaking as a "fix", instead of not sending too much data in the first place...

No3371 commented 1 year ago

It intrigues me why Create is required for this to happen though.

someaddons commented 1 year ago

I've been able to reproduce it without create, it probably just caused the class to be loaded in the first place or so. Fixed it in 4.2 to no longer crash on connectivity's side

No3371 commented 1 year ago

Thanks!