modrinth / theseus

AKA the Modrinth App, a launcher for Minecraft: Java Edition with a clean look, easy-to-use interface, and deep integration into Modrinth services.
https://modrinth.app
GNU General Public License v3.0
744 stars 116 forks source link

[Bug] Java instance marked as invalid or non-functional incorrectly #1220

Open CuriousCodingCanadian opened 2 weeks ago

CuriousCodingCanadian commented 2 weeks ago

Describe the bug

When using an interpreter script as the path for Java in a Modrinth instance, the error "Error launching Minecraft: Java path invalid or non-functional: /path/to/script", even when the script works perfectly. This does not occur using this java path in the official Minecraft Launcher.

Steps to reproduce

  1. Create an instance in the Modrinth app
  2. Set the java path to a simple interpreter script that forwards all arguments to Java, such as the following: #!/bin/sh echo "$@" > ~/mc.log mangohud --dlsym java "$@"
  3. Run the instance

Expected behavior

The instance will launch correctly.

System information

Arch Linux latest. v0.7.1 Theseus.

Additional context

image

blryface commented 2 weeks ago

that seems to not be a java path? I don't think java paths have scripts in them, the java path should just lead to the bin folder on the java installation you want to use

CuriousCodingCanadian commented 2 weeks ago

@blryface said:

that seems to not be a java path? I don't think java paths have scripts in them, the java path should just lead to the bin folder on the java installation you want to use

Second line:

When using an interpreter script

The point of this report is that it should be able to work, as this script just passes the arguments to Java.

The only reason I'm using a script is that I use an overlay called MangoHUD that lets me see my FPS without having to render it in-game (which is known to considerably decrease FPS. Additionally, if this uses file, then that may cause weird or unexpected bugs. (see Can't print on Tuesdays). This should not be a check in place, or at least be able to be turned off in the settings. The ideal behavior is that this throws a warning but not error, as it works when this check is not in place (vanilla launcher).