Failed to launch after updated my OS to 23.05.20221205.6e51c97
YisuiDenghua opened this issue ยท 4 comments
The modpack I downloaded is https://www.curseforge.com/minecraft/modpacks/infinity-fabric/download/3785369
system: "x86_64-linux"
host os: Linux 6.0.10, NixOS, 23.05 (Stoat), 23.05.20221205.6e51c97
desktop environment: GNOME 43, Xorg
launcher: HMCL, PrismLauncher
java version: openjdk 19.0.1
Uncaught exception in thread "main"
java.lang.RuntimeException: Mixin transformation of net.minecraft.client.main.Main failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:252)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:150)
at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:155)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:414)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:77)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
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)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:247)
... 6 more
Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinPreProcessorException: Attach error for smoothboot.mixins.json:client.MainMixin during activity: [Transform -> Method onMain(Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;)V -> INVOKESTATIC -> java/lang/Thread::currentThread:()Ljava/lang/Thread;]
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:313)
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.createContextFor(MixinPreProcessorStandard.java:277)
at org.spongepowered.asm.mixin.transformer.MixinInfo.createContextFor(MixinInfo.java:1289)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:292)
at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421)
at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
... 9 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: java.lang.Thread
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMemberReference(MixinPreProcessorStandard.java:783)
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transformMethod(MixinPreProcessorStandard.java:769)
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.transform(MixinPreProcessorStandard.java:735)
at org.spongepowered.asm.mixin.transformer.MixinPreProcessorStandard.attach(MixinPreProcessorStandard.java:307)
... 15 more
Caused by: java.lang.ClassNotFoundException: java.lang.Thread
... 19 more
I failed to launch it after I update my OS to 23.05.20221205.6e51c97, before that I was using 23.05.20221127.a115bb9 and it works fine. I'm not familiar with Fabric loader, could you please tell me how to solve the problem?
Finally I figured it out. The latest NixOS uses OpenJDK 19, which couldn't launch Infinity. I solved the problem by installing an OpenJDK 17. Hope you can adapt to OpenJDK 19 as soon as possible, regards!
Next time a NixOS upgrade breaks something, create an issue in Nixpkgs first. We should abstain from bugging upstream maintainers with things that they have little to no control over when possible.
Generally with Java, you will want to be on the latest LTS release at the latest. It's not a field that moves particularly fast when it comes to adopting new things ;)
FYI next time you encounter an issue like this, you can get a git checkout of Nixpkgs and do a first-parent git bisect of your whole OS between i.e. NixOS/nixpkgs@6e51c97 and NixOS/nixpkgs@a115bb9 using nixos-rebuild test -I nixpkgs=/path/to/nixpkgs/checkout
.