Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with forge 49.0.38 due to invalid module-info.class #22

Closed
Kotori316 opened this issue Mar 20, 2024 · 0 comments · Fixed by #23
Closed

Crash with forge 49.0.38 due to invalid module-info.class #22

Kotori316 opened this issue Mar 20, 2024 · 0 comments · Fixed by #23

Comments

@Kotori316
Copy link
Contributor

With forge 1.20.4-49.0.38, I got this error when launching client.

Crash log
Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at net.minecraftforge.bootstrap.Bootstrap.bootstrapMain(Bootstrap.java:133)
	at net.minecraftforge.bootstrap.Bootstrap.start(Bootstrap.java:53)
	at net.minecraftforge.bootstrap.ForgeBootstrap.main(ForgeBootstrap.java:19)
	at juuxel.unionrelauncher.UnionRelauncher.main(UnionRelauncher.java:92)
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86)
	at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:219)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/commons/ClassRemapper
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at cpw.mods.securejarhandler/net.minecraftforge.securemodules.SecureModuleClassLoader.readerToClass(SecureModuleClassLoader.java:482)
	at cpw.mods.securejarhandler/net.minecraftforge.securemodules.SecureModuleClassLoader.findClass(SecureModuleClassLoader.java:399)
	at cpw.mods.securejarhandler/net.minecraftforge.securemodules.SecureModuleClassLoader.loadClass(SecureModuleClassLoader.java:415)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at SECURE-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.DefaultExtensions.create(DefaultExtensions.java:54)
	at SECURE-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTransformer.<init>(MixinTransformer.java:116)
	at SECURE-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinTransformer$Factory.createTransformer(MixinTransformer.java:58)
	at SECURE-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:113)
	at SECURE-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:142)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:91)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:107)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:44)
	at cpw.mods.securejarhandler/net.minecraftforge.securemodules.SecureModuleClassLoader.readerToClass(SecureModuleClassLoader.java:473)
	at cpw.mods.securejarhandler/net.minecraftforge.securemodules.SecureModuleClassLoader.findClass(SecureModuleClassLoader.java:399)
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/commons/ClassRemapper

	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:632)
	at java.base/java.lang.Class.forName(Class.java:545)
	at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.ImmediateWindowHandler$DummyProvider.lambda$updateModuleReads$1(ImmediateWindowHandler.java:146)
	at java.base/java.util.Optional.map(Optional.java:260)
	at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.ImmediateWindowHandler$DummyProvider.updateModuleReads(ImmediateWindowHandler.java:146)
	at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.ImmediateWindowHandler.acceptGameLayer(ImmediateWindowHandler.java:72)
	at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.FMLLoader.beforeStart(FMLLoader.java:193)
	at SECURE-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.launchService(CommonLaunchHandler.java:70)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:74)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:114)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:73)
	at SECURE-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapEntry.main(BootstrapEntry.java:17)
	at [email protected]/net.minecraftforge.bootstrap.Bootstrap.moduleMain(Bootstrap.java:188)
	... 10 more
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.commons.ClassRemapper
	at cpw.mods.securejarhandler/net.minecraftforge.securemodules.SecureModuleClassLoader.loadClass(SecureModuleClassLoader.java:447)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	... 42 more
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.commons.ClassRemapper

The report says it can't find org.objectweb.asm.commons.ClassRemapper. This crash doesn't happen without architectury.
I saw the log file, and I found the same 2 module was loaded as org.objectweb.asm.commons.

Module:    org.objectweb.asm.commons ~/.gradle/caches/modules-2/files-2.1/dev.architectury/architectury-transformer/5.2.81/487c78f18d1f67926ea5b14e2d23f7de7501ec58/architectury-transformer-5.2.81-runtime.jar
Module:    org.objectweb.asm.commons ~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/9.6/f1a9e5508eff490744144565c47326c8648be309/asm-commons-9.6.jar

(omitted)

Ignoring duplicate module on SecureModuleFinder: org.objectweb.asm.commons: Jar[jar:file://~/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/9.6/f1a9e5508eff490744144565c47326c8648be309/asm-commons-9.6.jar!/]

(To get this log, set property("bsl.debug", "true") in your runs configuration)

The second one is the expected jar including org.objectweb.asm.commons. The first one is architectury file with invalid module-info.class. The module-info.class seems to have copied from shadowed jar when it was published to maven.
It also shows forge removed asm-commons-9.6.jar from classpath due to duplicated module name.

I manually remove the architectury file from classpath in forge, then I succeeded to launch Minecraft instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant