Momo-Softworks / Cold-Sweat

Other
54 stars 21 forks source link

[Crash]: NoClassDefFoundError. Cannot work alone without optional dependencies. #339

Closed Viola-Siemens closed 3 months ago

Viola-Siemens commented 3 months ago

I only installed Forge and Cold Sweat, and this crash happens. I think it might cause by wrong code isolation in com.momosoftworks.coldsweat.util.compat.CompatManager$ModEvents. Version:

Logs in dev environment (with Freeze It And Heat It, a dependent I'm developing): latest.log debug.log crash-2024-08-16_15.56.36-fml.txt

Logs in production environment: latest.log crash-2024-08-16_16.10.58-fml.txt

And I highlight the key exception:

[ne.mi.fm.ja.AutomaticEventSubscriber/LOADING]: Auto-subscribing com.momosoftworks.coldsweat.util.compat.CompatManager$ModEvents to MOD
[ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to register automatic subscribers. ModID: cold_sweat, class com.momosoftworks.coldsweat.ColdSweat
java.lang.NoClassDefFoundError: com/simibubi/create/content/redstone/displayLink/DisplayBehaviour
    at java.lang.Class.forName0(Native Method) ~[?:?] {}
    at java.lang.Class.forName(Class.java:467) ~[?:?] {}
    at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.lambda$inject$6(AutomaticEventSubscriber.java:61) ~[javafmllanguage-1.18.2-40.2.0.jar%2380!/:?] {}
    at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {re:mixin,re:computing_frames}
    at net.minecraftforge.fml.javafmlmod.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:48) ~[javafmllanguage-1.18.2-40.2.0.jar%2380!/:?] {}
    at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:77) ~[javafmllanguage-1.18.2-40.2.0.jar%2380!/:?] {}
    at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:106) ~[fmlcore-1.18.2-40.2.0.jar%2383!/:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) [?:?] {}
    at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) [?:?] {}
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) [?:?] {}
    at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) [?:?] {}
    at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) [?:?] {}
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) [?:?] {}
    at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) [?:?] {}
Caused by: java.lang.ClassNotFoundException: com.simibubi.create.content.redstone.displayLink.DisplayBehaviour
    at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:134) ~[securejarhandler-1.0.3.jar:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}
    at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:134) ~[securejarhandler-1.0.3.jar:?] {}
    at java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?] {}
    ... 14 more

It still works with optional dependencies installed, but I don't think it works as intended.

MikulDev commented 3 months ago

Hello, thanks for the report. I have re-uploaded the 2.3.jar file with the fix for this issue included, so try re-downloading the mod