-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.17] Minecraft exits without a crash report when mod dependencies are missing #7993
Comments
I've confirmed that this issue happens, and found the root cause for the issue. What's All This AboutThe problem is what happens when For this situation, it stores a small list internally in a field called This list is passed on as the "full mods list" in three situations:
So theoretically, if any of the above were to happen, this would be fine: Forge and Minecraft are the only 'mods' in the mod list (from that UH OHNow, did you notice how I emphasized "this list should contain two mod files" above? You may be able to surmise what I'm getting at here: the problem here is that that MinecraftForge/fmlloader/src/main/java/net/minecraftforge/fml/loading/ModSorter.java Lines 156 to 164 in a96d078
Do you see the problem? That's right: only It All Comes Crashing DownThe problem with that mod list only containing the The access transformer configuration files are stored in the mod file (in this case, the JAR file). When progressing through mod loading, it comes to a stage where it takes the list of mod files as dictated above, and loads the access transformer configuration files to the AccessTransformers subsystem. However, if the situations above occur, then the only mod in that list is That leads to none of the expected access transformations expected by Forge to actually happen, which then causes a crash as soon as the first Forge class tries to access an AT'd field or method. In production, the first thing that does that is Why Aren't Developers AffectedThe root issue as described, namely the absence of the However, the key difference that's significant between the production and the development environments is when access transformers are applied. In the production environment, it's done at runtime by the AccessTransformers service. Meanwhile, in the developement environment, it's done at setup time by ForgeGradle. This means that even if the runtime AT service doesn't do anything in the development environment, it has no need to: the access transformers are pre-applied before runtime, which means that the AT'd fields and methods are as expected, and no How To Fix?I can think of two solutions for this problem:
My preference is to go with option 1 first to quickly solve the problem at hand, while waiting for cpw to crop up again to truly tackle the issue and find a long-term solution. I'll probably make a PR to that effect very soon, so the option is on the table and ready to merge. |
Minecraft Version: 1.17.1
Forge Version: 1.17.1-37.0.27
Logs:
Latest.log: https://gist.github.com/SuperMartijn642/71f4e0a7c69b58831723deb6ff58de0c
Steps to Reproduce:
mods.toml
:build
taskDescription of issue:
Outside of the dev environment, when a mod dependency is not installed the game exits without showing the mod loading error screen or generating a crash report.
Inside the dev environment the game shows the mod loading error screen as expected.
The text was updated successfully, but these errors were encountered: