Incompatible with Krypton
Justsnoopy30 opened this issue ยท 8 comments
Minecraft Version: 1.17.1
Immersive Portals Commit: b6117d4
The conflicting mod's GitHub: https://github.com/astei/krypton
Mixin conflict, log here:
[02:20:11] [Server thread/FATAL]: Mixin apply failed krypton.mixins.json:shared.network.avoidwork.ThreadedAnvilChunkStorageMixin -> net.minecraft.class_3898: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException InjectionPoint(Shift)[@At("INVOKE")] on net/minecraft/class_3898::sendChunkDataPackets$beSmart with priority 1000 cannot inject into net/minecraft/class_3898::method_18715(Lnet/minecraft/class_3222;[Lnet/minecraft/class_2596;Lnet/minecraft/class_2818;)V merged by qouteall.imm_ptl.core.mixin.common.chunk_sync.MixinThreadedAnvilChunkStorage_C with priority 1100 [PREINJECT Applicator Phase -> krypton.mixins.json:shared.network.avoidwork.ThreadedAnvilChunkStorageMixin -> Prepare Injections -> -> handler$bca000$sendChunkDataPackets$beSmart(Lnet/minecraft/class_3222;[Lnet/minecraft/class_2596;Lnet/minecraft/class_2818;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V -> Prepare] org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: InjectionPoint(Shift)[@At("INVOKE")] on net/minecraft/class_3898::sendChunkDataPackets$beSmart with priority 1000 cannot inject into net/minecraft/class_3898::method_18715(Lnet/minecraft/class_3222;[Lnet/minecraft/class_2596;Lnet/minecraft/class_2818;)V merged by qouteall.imm_ptl.core.mixin.common.chunk_sync.MixinThreadedAnvilChunkStorage_C with priority 1100 [PREINJECT Applicator Phase -> krypton.mixins.json:shared.network.avoidwork.ThreadedAnvilChunkStorageMixin -> Prepare Injections -> -> handler$bca000$sendChunkDataPackets$beSmart(Lnet/minecraft/class_3222;[Lnet/minecraft/class_2596;Lnet/minecraft/class_2818;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V -> Prepare] at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:293) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:375) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1255) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1033) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:388) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23) ~[universe-loader-0.11.6.jar:0.9.4+mixin.0.8.2] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:162) ~[universe-loader-0.11.6.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:154) ~[universe-loader-0.11.6.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?] at net.minecraft.class_3215.<init>(class_3215.java:87) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_3218.<init>(class_3218.java:200) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_3786(MinecraftServer.java:383) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_3735(MinecraftServer.java:350) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_1132.method_3823(class_1132.java:71) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:670) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at java.lang.Thread.run(Thread.java:831) [?:?] [02:20:11] [Server thread/ERROR]: Encountered an unexpected exception org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23) ~[universe-loader-0.11.6.jar:0.9.4+mixin.0.8.2] at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:162) ~[universe-loader-0.11.6.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:154) ~[universe-loader-0.11.6.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?] at net.minecraft.class_3215.<init>(class_3215.java:87) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_3218.<init>(class_3218.java:200) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_3786(MinecraftServer.java:383) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_3735(MinecraftServer.java:350) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.class_1132.method_3823(class_1132.java:71) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:670) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-universe-fabric-loader-0.11.6-1.17.1.jar:?] at java.lang.Thread.run(Thread.java:831) [?:?] Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [krypton.mixins.json:shared.network.avoidwork.ThreadedAnvilChunkStorageMixin] from phase [DEFAULT] in config [krypton.mixins.json] FAILED during APPLY at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:642) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:594) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:356) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] ... 14 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: InjectionPoint(Shift)[@At("INVOKE")] on net/minecraft/class_3898::sendChunkDataPackets$beSmart with priority 1000 cannot inject into net/minecraft/class_3898::method_18715(Lnet/minecraft/class_3222;[Lnet/minecraft/class_2596;Lnet/minecraft/class_2818;)V merged by qouteall.imm_ptl.core.mixin.common.chunk_sync.MixinThreadedAnvilChunkStorage_C with priority 1100 [PREINJECT Applicator Phase -> krypton.mixins.json:shared.network.avoidwork.ThreadedAnvilChunkStorageMixin -> Prepare Injections -> -> handler$bca000$sendChunkDataPackets$beSmart(Lnet/minecraft/class_3222;[Lnet/minecraft/class_2596;Lnet/minecraft/class_2818;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V -> Prepare] at org.spongepowered.asm.mixin.injection.code.Injector.findTargetNodes(Injector.java:293) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.injection.code.Injector.find(Injector.java:240) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.prepare(InjectionInfo.java:375) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1255) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1033) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:388) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351) ~[sponge-mixin-0.9.4+mixin.0.8.2.jar:0.9.4+mixin.0.8.2] ... 14 more
Associated issue report: astei/krypton#46
Turns out even after that mixin is disabled, there is a memory leak in direct buffers when running with Immersive Portals.
@Justsnoopy30 I roughly read through Krypton code and see that, apart from that Mixin, IP does not change anything that Krypton changes.
How did you get the conclusion that the memory leak is in direct buffers? You can use /portal debug profile gc
to enforce a GC and see the real memory usage.
Can confirm Krypton + ImmP leaks on MC 1.18.1
Which side is the conflicting side, however, I know not.
I decided to take a look for myself. Disabling the Krypton mixin me.steinborn.krypton.mixin.shared.network.avoidwork.ThreadedAnvilChunkStorageMixin
fixes the incompatibility.
I cannot reproduce @Justsnoopy30's direct buffer memory leak with Immersive Portals and Krypton alone. I ran the game for about 10 minutes with the JVM argument -Dio.netty.leakDetection.level=paranoid
, which would have immediately flagged any direct buffer memory leaks if there were any. It did not print any warnings, and given Minecraft's abuse of the JVM garbage collector, I would have easily expected a warning to pop up in the first few seconds.
astei/krypton@b251fa0 fixes the incompatibility on my end.
@astei Thanks for your effort.
@astei thanks for looking into it! ๐๐ป