Launching the server in dev on mojmap crashes immediately
Hubry opened this issue ยท 4 comments
Combining Fabric API 0.40.1, Minecraft 1.17.1 and mojmap results in a crash immediately on launch, courtesy of gametest api's MainMixin.
Reproduction
- Set up a workspace, I used the example mod.
- Edit
gradle.properties
to use Fabric API 0.40.0 or 0.40.1 - Run
runServer
task or the server run config, see it gets to the unaccepted EULA message and quits. - Replace mappings in build.gradle with
mappings loom.officialMojangMappings()
- Fix the import in the example mixin
- Run
runServer
task or the server run config
Result:
Exception message inside spoiler
Exception in thread "main" org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:208)
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:178)
at org.spongepowered.asm.mixin.transformer.FabricMixinTransformerProxy.transformClassBytes(FabricMixinTransformerProxy.java:23)
at net.fabricmc.loader.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:162)
at net.fabricmc.loader.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:154)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:232)
at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
at net.fabricmc.loader.launch.knot.KnotServer.main(KnotServer.java:28)
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
Caused by: org.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [fabric-gametest-api-v1.mixins.json:server.MainMixin] from phase [DEFAULT] in config [fabric-gametest-api-v1.mixins.json] FAILED during APPLY
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinError(MixinProcessor.java:642)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.handleMixinApplyError(MixinProcessor.java:594)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:356)
... 10 more
Caused by: org.spongepowered.asm.mixin.injection.throwables.InvalidInjectionException: Error whilst instancing injection point org.spongepowered.asm.mixin.injection.points.BeforeInvoke for INVOKE [PREINJECT Applicator Phase -> fabric-gametest-api-v1.mixins.json:server.MainMixin -> Prepare Injections -> -> handler$zzn000$main([Ljava/lang/String;Lorg/spongepowered/asm/mixin/injection/callback/CallbackInfo;Ljoptsimple/OptionParser;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSpec;Ljoptsimple/OptionSet;Lnet/minecraft/core/RegistryAccess$RegistryHolder;Ljava/nio/file/Path;Lnet/minecraft/server/dedicated/DedicatedServerSettings;Ljava/nio/file/Path;Lnet/minecraft/server/Eula;Ljava/io/File;Lcom/mojang/authlib/yggdrasil/YggdrasilAuthenticationService;Lcom/mojang/authlib/minecraft/MinecraftSessionService;Lcom/mojang/authlib/GameProfileRepository;Lnet/minecraft/server/players/GameProfileCache;Ljava/lang/String;Lnet/minecraft/world/level/storage/LevelStorageSource;Lnet/minecraft/world/level/storage/LevelStorageSource$LevelStorageAccess;Lnet/minecraft/world/level/storage/LevelSummary;Lnet/minecraft/world/level/DataPackConfig;ZLnet/minecraft/server/packs/repository/PackRepository;Lnet/minecraft/world/level/DataPackConfig;Ljava/util/concurrent/CompletableFuture;Lnet/minecraft/server/ServerResources;Lnet/minecraft/resources/RegistryReadOps;)V -> Parse]
at org.spongepowered.asm.mixin.injection.InjectionPoint.create(InjectionPoint.java:734)
at org.spongepowered.asm.mixin.injection.InjectionPoint.parse(InjectionPoint.java:698)
at org.spongepowered.asm.mixin.injection.InjectionPoint.parse(InjectionPoint.java:648)
at org.spongepowered.asm.mixin.injection.InjectionPoint.parse(InjectionPoint.java:569)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parseInjectionPoints(InjectionInfo.java:330)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.readAnnotation(InjectionInfo.java:289)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:275)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.<init>(InjectionInfo.java:267)
at org.spongepowered.asm.mixin.injection.struct.CallbackInjectionInfo.<init>(CallbackInjectionInfo.java:46)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo$InjectorEntry.create(InjectionInfo.java:140)
at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.parse(InjectionInfo.java:624)
at org.spongepowered.asm.mixin.transformer.MixinTargetContext.prepareInjections(MixinTargetContext.java:1247)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.prepareInjections(MixinApplicatorStandard.java:1033)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:388)
at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:320)
at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:345)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:569)
at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:351)
... 10 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
at org.spongepowered.asm.mixin.injection.InjectionPoint.create(InjectionPoint.java:732)
... 32 more
Caused by: java.lang.NullPointerException
at java.base/java.util.ArrayDeque.addLast(ArrayDeque.java:303)
at java.base/java.util.ArrayDeque.add(ArrayDeque.java:494)
at net.fabricmc.loader.util.mappings.MixinIntermediaryDevRemapper.mapMethodName(MixinIntermediaryDevRemapper.java:142)
at org.spongepowered.asm.obfuscation.RemapperChain.mapMethodName(RemapperChain.java:59)
at org.spongepowered.asm.mixin.refmap.RemappingReferenceMapper.remapWithContext(RemappingReferenceMapper.java:164)
at org.spongepowered.asm.mixin.refmap.RemappingReferenceMapper.remap(RemappingReferenceMapper.java:121)
at org.spongepowered.asm.mixin.injection.struct.MemberInfo.parse(MemberInfo.java:692)
at org.spongepowered.asm.mixin.injection.selectors.TargetSelector.parse(TargetSelector.java:154)
at org.spongepowered.asm.mixin.injection.selectors.TargetSelector.parseAndValidate(TargetSelector.java:109)
at org.spongepowered.asm.mixin.injection.struct.InjectionPointData.getTarget(InjectionPointData.java:273)
at org.spongepowered.asm.mixin.injection.points.BeforeInvoke.<init>(BeforeInvoke.java:126)
... 38 more
I seem to have duplicated your bug report #1725 :-(
But mine contains a workaround you can use.
I can reproduce this, the entry for this in the refmap semes to be missing. This is odd as when I build the jar locally it has the correct refmap entry but the version built on github actions does not.
The loom version is set so that cannot be the issue, and looking at the manifest they are identical.