FabricMC / fabric-loader

Fabric's mostly-version-independent mod loader.
Apache License 2.0
632 stars 269 forks source link

Cryptic crash when including Jar-in-Jar mods that have missing dependencies #201

Closed coderbot16 closed 3 years ago

coderbot16 commented 4 years ago

Scenario

[12:44:01] [main/INFO]: Loading for game Minecraft 1.15.2
[12:44:01] [main/FATAL]: A critical error occurred
net.fabricmc.loader.discovery.ModResolutionException: Errors were found!
 - Mod missing-dependencies depends on mod {doesntexist @ [*]}, which is missing!
    at net.fabricmc.loader.discovery.ModResolver.findCompatibleSet(ModResolver.java:309) ~[fabric-loader-0.7.6+build.179.jar:?]
    at net.fabricmc.loader.discovery.ModResolver.resolve(ModResolver.java:603) ~[fabric-loader-0.7.6+build.179.jar:?]
    at net.fabricmc.loader.FabricLoader.setup(FabricLoader.java:176) ~[fabric-loader-0.7.6+build.179.jar:?]
    at net.fabricmc.loader.FabricLoader.load(FabricLoader.java:166) [fabric-loader-0.7.6+build.179.jar:?]
    at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:127) [fabric-loader-0.7.6+build.179.jar:?]
    at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26) [fabric-loader-0.7.6+build.179.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196) [NewLaunch.jar:?]
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
    at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]
[12:41:52] [main/INFO]: Loading for game Minecraft 1.15.2
Failed to start Minecraft:
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
    at org.multimc.EntryPoint.listen(EntryPoint.java:143)
    at org.multimc.EntryPoint.main(EntryPoint.java:34)
Caused by: java.lang.UnsupportedOperationException: Call the solve method first!!!
    at net.fabricmc.loader.util.sat4j.minisat.core.Solver.model(Solver.java:498)
    at net.fabricmc.loader.discovery.ModResolver.findCompatibleSet(ModResolver.java:224)
    at net.fabricmc.loader.discovery.ModResolver.resolve(ModResolver.java:603)
    at net.fabricmc.loader.FabricLoader.setup(FabricLoader.java:176)
    at net.fabricmc.loader.FabricLoader.load(FabricLoader.java:166)
    at net.fabricmc.loader.launch.knot.Knot.init(Knot.java:127)
    at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:26)
    ... 8 more
Exiting with -1

Steps to Reproduce

  1. Download and extract test mods.zip
  2. Place the missing-dependencies.jar file in your mods folder, get the first crash
  3. Place the embeds-the-jar.jar file into your mods folder, get the second crash
LemmaEOF commented 4 years ago

Looks like we're assuming a sat4j IProblem is solved when it's not. I'll take a look into what can be done here.

comp500 commented 4 years ago

This also manifests in a slightly different way when the nested mod id is greater than the parent mod id, see #267 (which I believe is a duplicate of this issue).