Crashes during very early Minecraft initialization are not properly handled
See original GitHub issueIn Main.main()
, there are a few initialization routines that are not surrounded with a try/catch block. If a crash occurs in these methods, Main.main()
throws an exception. Fabric Loader does not anticipate an exception and never catches it, so the exception makes its way all the way to the top of the stack.
As it turns out, this unhandled exception does not get printed to the log file and no crash report is generated. MultiMC displays it in the log box, at least, but I’m not sure if the vanilla launcher handles it. This results in very cryptic crashes that are nearly impossible for a 3rd party to debug without replicating the entire mods setup on their end.
At a minimum, Fabric Loader should catch any unhandled exceptions from Main.main()
, print them to the log, and bring up the error GUI.
However, if possible, it would be nice if a proper crash report was generated even for these types of crashes. In my case, an exception happened in Bootstrap.initialize()
, which happens right after the crash report infrastructure is set up.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top GitHub Comments
This has had a fix merged in with c12adfb. There is still the question of what to do when Loader itself crashes before getting to starting mods (it is launcher dependent whether those crashes are recorded/presented to the user) but that might be better in a new issue to consider whether there needs to be wider changes to things like the exception types thrown.
More that it should provide platform independent exception handling, you can’t trust that whatever launched Loader is going to do it in a useful way. I’d also say this is more of an enhancement rather than question tag wise.