fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

Incorrect blame for PreLaunch entrypoints

Open Qendolin opened this issue 1 year ago • 6 comments

In this case it looks like better-clouds is causing a crash, when actually morenemoswoodcuttervariants is at fault by providing an invalid name/path in it's mixins.json. image

Since most users only read the first error (if at all), they would blame the wrong mod for the crash. In cases like these, where an error occurs during Mixin loading (not transformation), the error message could be improved by inspecting the exception cause chain.

Mods used in example:

  • https://modrinth.com/mod/more-nemos-woodcutter-variants/version/Iwdd4qgg
  • https://modrinth.com/mod/better-clouds/version/1.7.4+1.21-fabric-r

Qendolin avatar Nov 08 '24 13:11 Qendolin

This happens because Mixin initializes when it is asked to transform the first class.

We may be able to trigger this explicitly (by calling select directly), before running preLaunch, but I'm not sure this is safe to do.

Player3324 avatar Nov 09 '24 04:11 Player3324

The RuntimeException occured while invoking the entrypoint of better-clouds. So wyh don't you directly think about the 'deepest' exception?

burningtnt avatar Dec 08 '24 06:12 burningtnt

Is this difficult to fix?

Qendolin avatar Mar 06 '25 13:03 Qendolin

The issue is more general. It also happens when mixin transformation failed.

Qendolin avatar Apr 04 '25 15:04 Qendolin

Any chance of this being fixed?

Qendolin avatar Jun 18 '25 23:06 Qendolin

I don't think we can fix 100% of this since a failed transform will always be tied to whatever caused the class to be loaded, but the configuration phase can (and imo shoud) be separated as in PR 1064.

Player3324 avatar Jul 14 '25 00:07 Player3324