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

Fix LoaderUtil saying there are duplicate classpath entries if there are in fact none. #979

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

Gamebuster19901
Copy link
Contributor

@Gamebuster19901 Gamebuster19901 commented Sep 19, 2024

Also futureproofs the checks just in case the class names are changed.

I was encountering issues with org.objectweb.asm.Type being loaded by both the knot classloader, and the app class loader. I removed ASM entirely and was thoroughly confused that the error message stated that were duplicate ASM classes.

Related to #965

Previous output if no ASM is on the classpath:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.IllegalStateException: duplicate ASM classes found on classpath: 
	at net.fabricmc.loader.impl.util.LoaderUtil.verifyClasspath(LoaderUtil.java:71)
	at net.fabricmc.loader.impl.launch.knot.Knot.<clinit>(Knot.java:345)
	... 1 more

New output if no ASM is on the classpath:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.IllegalStateException: ASM not detected on the classpath (or perhaps org/objectweb/asm/ClassReader.class was renamed?)
	at net.fabricmc.loader.impl.util.LoaderUtil.verifyClasspath(LoaderUtil.java:89)
	at net.fabricmc.loader.impl.launch.knot.Knot.<clinit>(Knot.java:345)
	... 1 more

…are none.

Also futureproofs the checks just in case the class names are changed.
@modmuss50 modmuss50 merged commit 38aa840 into FabricMC:master Oct 9, 2024
3 checks passed
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 this pull request may close these issues.

3 participants