SchmarrnDevs / Lighty

The Light Overlay Mod with a twist!
https://modrinth.com/mod/lighty
Apache License 2.0
10 stars 8 forks source link

Crash during startup with FrozenLib (for e.g. Wilder Wild, etc.) on 1.20.5/6 #63

Closed pnk2u closed 3 weeks ago

pnk2u commented 1 month ago

So since 1.20.5/1.20.6 (this issue did not occur in 1.20.4) the game would not start-up with both Wilder Wild and Lighty installed, displaying this crash message in the launcher:

The game crashed whilst initializing game Error: java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'lighty'!

The crash report then reads as follows:

Description: Initializing game

java.lang.RuntimeException: Could not execute entrypoint stage 'client' due to errors, provided by 'lighty'!
    at app//net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388)
    at app//net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33)
    at app//net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386)
    at app//net.fabricmc.loader.impl.game.minecraft.Hooks.startClient(Hooks.java:53)
    at fudge.notenoughcrashes.fabric.mixinhandlers.ModLoaders.fabricEntrypoints(ModLoaders.java:9)
    at MC//net.minecraft.client.MinecraftClient.redirect$eii000$notenoughcrashes$catchFabricInit(MinecraftClient.java:24236)
    at MC//net.minecraft.client.MinecraftClient.<init>(MinecraftClient.java:484)
    at net.minecraft.client.main.Main.main(Main.java:223)
    at app//net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470)
    at app//net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at app//net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
Caused by: java.lang.ExceptionInInitializerError
    at dev.schmarrn.lighty.api.ModeManager.registerMode(ModeManager.java:40)
    at dev.schmarrn.lighty.mode.CarpetMode.init(CarpetMode.java:133)
    at dev.schmarrn.lighty.Lighty.init(Lighty.java:36)
    at dev.schmarrn.lighty.fabric.LightyFabric.onInitializeClient(LightyFabric.java:36)
    at app//net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384)
    ... 8 more
Caused by: java.lang.NullPointerException: Cannot invoke "net.minecraft.resource.ResourceManager.getResource(net.minecraft.util.Identifier)" because the return value of "net.minecraft.client.MinecraftClient.getResourceManager()" is null
    at MC//net.minecraft.client.gui.screen.Screen.wrapOperation$cif000$frozenlib$multiplePanoramas(Screen.java:4250)
    at MC//net.minecraft.client.gui.screen.Screen.<clinit>(Screen.java:63)
    ... 13 more

Last time I didn't realize/check what the problem was, but after this recent update I checked again and saw that FrozenLib was involved in the problem. So I figured, why not just try not loading the relevant Mixin and that absolutely works. So I'll tell you what I did because I while I was able to fix this problem for myself I have barely any understanding of why and how: I removed the "ScreenMixin" from the file called frozenlib.menu.mixins.json(linked to the file in their repo) and replaced the updated file within the jar instead of recompiling because I'm lazy. :D

andi-makes commented 1 month ago

Thank you for reporting this issue and for narrowing the mixin down! Highly appreciated!

I've had a look at it and I think I know a way to fix it, but I still have to try it out. I'll keep you updated here.

If I am correct, I should be able to fix this issue fairly quickly, but because of university stuff it might take me a week or so to actually get around to fixing it and to release it. Hope you understand!

pnk2u commented 1 month ago

I'm glad to hear that that helped.

Ah, nice, thanks a lot.

And no worries at all, that's of course absolutely understandable, and regarding me, I already have a band-aid fix that will last me until then. ^^

andi-makes commented 3 weeks ago

Fixed in v3.0.0-beta.3+1.20.6, let me know if it also works on your side and we can close this issue :)

pnk2u commented 3 weeks ago

Just tried it and yes, it works for me, too. Thank you! (: