owmii / Powah

Discord:
https://discord.gg/A8TP9JY
GNU Lesser General Public License v3.0
27 stars 23 forks source link

Mod loading error has occurred message on game launch #150

Closed kristopherpie-code closed 3 years ago

kristopherpie-code commented 3 years ago

Version: (make sure you are on the latest version before reporting): Powah-1.16.4-2.3.11.jar

Issue description:

Failure message: Powah (powah) encountered an error during the sided_setup event phase

Steps to reproduce:

This is a weird crash, for reference I use Multi MC to run Minecraft and install the mods, This startup error randomly appears after many normal launches of the game without an error. It will then always crash with this message until I use MultiMC's "Download All" on the version page, the button that pre downloads all the files needed to launch the game before launching the game. Essentially doing a fresh install of the Minecraft and forge files.

I understand that I should probably try to get this to happen with only Powah installed but because the crash is so sporadic with when it triggers I wanted to at least post this bug report about it with the log I have until I can come up with a better one.

I also want to point out that i am using Java Version: 14.0.2 for its performance improvements now that the game supports a version newer than java 8. I'm not sure if it affects this but wanted to mention it anyway in case it may also factor in.

Is this a crash?, please include it here: (Recommended to use Gist)

Crash Report: https://paste.ee/p/n8yeY Or Gist like you recommend: https://gist.github.com/kristopherpie-code/80d1ba21169a54519a7fa9da3c294dfc

BlueAgent commented 3 years ago

~~I can't seem to get this to happen with just Powah and it's dependency Lollipop lib. Typically for CMEs (Concurrent Modification Exception) the cause happens before it is raised. (since it detects concurrent modification when the access is done after the modification). You'll need to identify which mod when installed with Powah causes the crash then we can potentially look into it more but even then it might be challenging. You mention it being sporadic though. How often does it happen? Also maybe the full debug.log when it happens would be useful.~~

Tested with: Minecraft 1.16.5 Forge 36.0.42 Lollipop 1.16.4-3.2.5 Powah 1.16.4-2.3.11

Logs for me booting up the game and creating a world with the above mods, and the second debug log is of me loading up the game for a second run and joining that world again.

Edit: Okay from just looking at the code it seems the reason why it's happening is the register method is not thread safe so can't be called in FMLClientSetupEvent which runs in parallel. So using enqueueWork to run on the main thread should fix this. PR coming soon.