question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes during very early Minecraft initialization are not properly handled

See original GitHub issue

In 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:open
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Chocoheadcommented, Sep 25, 2021

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.

1reaction
Chocoheadcommented, Feb 15, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Minecraft sometimes crashes when trying to start 21w20a for ...
I tried so many times to run 21w20a in the launcher; but exactly when the game window opens, it instantly crashes and the...
Read more >
Loading - Completing Minecraft Initialization crash
When i launch the Minecraft forge without any mods it works perfectly, but when i put mods, or even Optifine in the mods...
Read more >
Java Edition Game Crashes and Performance Issues FAQ
If the Minecraft launcher won't start or you receive an error message saying, 'Pixel format not accelerated,' you may have outdated video card...
Read more >
How to fix various crashes!(Modded or vanilla) - Minecraft Forum
I can help solve your problem by looking at the first few lines. NOTE: This thread is not for screens where Forge finds...
Read more >
Minecraft keeps crashing please help :c : r/ModdedMinecraft
I cant find anything online and I am not well versed in this kind of ... Indeed, ears mod seems to be crashing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found