CaffeineMC / sodium-fabric

A Fabric mod designed to improve frame rates and reduce micro-stutter
Other
4.58k stars 773 forks source link

Sodium should verify the LWJGL installation at startup #2561

Closed jellysquid3 closed 1 week ago

jellysquid3 commented 1 week ago

Some launchers appear to be using the incorrect version of the LWJGL libraries, which causes problems since LWJGL doesn't follow Semver and makes breaking changes to some public interfaces in point releases.

We should check at startup that Minecraft is using a compatible version of LWJGL to avoid issues like #2560. For the Minecraft versions we currently provide updates for, this is:

This will avoid problems where users are given cryptic errors caused by binary mismatches, by instead presenting the user with a clear error message explaining that their LWJGL version is out of date.

Unfortunately (or perhaps fortunately?) many piracy launchers update LWJGL by default and don't provide any option to not do that, meaning the mod will always abort with an error for those launchers. But we're already crashing there, so implementing this check won't make anything worse.

jellysquid3 commented 1 week ago

Resolved with https://github.com/CaffeineMC/sodium-fabric/commit/ebed80b157e86ee6415a65e6e5ea7ce1564ba587.

We still need to implement a front-end for showing error messages on Linux/macOS, but that's true of all the other early startup checks.

IGN-Styly commented 1 day ago

Invalid verification Procedures

IGN-Styly commented 1 day ago

Tested on Windows 11 and Arch linux with the latest version of prism launcher.

IGN-Styly commented 1 day ago

Prob due to Axiom.

jellysquid3 commented 22 hours ago

@IGN-Styly If you have Axiom installed, then yes, #2585 is relevant and the likely culprit. But you should open a new issue rather than use this one if you are erroneously receiving the error message.

IGN-Styly commented 19 hours ago

Thanks for the help, it was my mistake. Can you close it?