betacraftuk / betacraft-launcher

A launcher for Minecraft focused on legacy versions of the game
https://betacraft.uk
GNU General Public License v3.0
317 stars 40 forks source link

Crash when trying to load game on Linux #89

Closed simply-silver closed 1 year ago

simply-silver commented 2 years ago

Every time I attempt to load the game on launcher version 1.09_15-pre3, it will crash with this message:

[2021-10-14 14:52:30] Inconsistency detected by ld.so: dl-lookup.c: 105: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

I've tried multiple versions through every era of the game, so it isn't an incompatibility with the game itself.

OS: Arch Linux (Kernel 5.14.11) Java: OpenJDK 17.u35-1

juozaspo commented 2 years ago

Try earlier Java version such as Java 8 or different build such as ~AdoptOpenJDK~Adoptium/Temurin Java. It might work better than a newer and/or different Java build that might not have some features that old minecraft versions might need. I also had problems similar to this when using stock OpenJDK 11 and I found that AdoptOpenJDK Java 11 build would work fine for me. Then migrated it to Adoptium later. If launcher would not work for you when using an earlier Java version I'd recommend using a different Java build such as Temurin by Adoptium team instead as on some systems such as mine the launcher wouldn't show the window unless such build was used. I haven't tested the Oracle Java, you might also try it too. I'm running on Ubuntu Linux 20.04 LTS btw. If you have multiple Java versions installed you should call the executable directly, also a desktop file for the launcher that has correct java executable used to execute it as shown in the example below would be a great addition to this.

[Desktop Entry]
Type=Application
Version=1.0
Name=BetaCraft Launcher
#Comment=
Exec=/usr/lib/jvm/temurin-8-jdk-amd64/bin/java -jar /path/to/launcher.jar
Icon=/path/to/betacraft.png
Terminal=false
Categories=Game;Application;

Edit 2020-12-31: Consider migrating to Adoptium/Temurin if still using old AdoptOpenJDK build as the new updates will come from the new source since the project has been rebranded when it was moved to Eclipse Foundation. For linux installation instructions check https://blog.adoptium.net/2021/12/eclipse-temurin-linux-installers-available/ and later adoptium site when it becomes available, change executable to /usr/lib/jvm/temurin-8-jdk-amd64/bin/java where applicable

Calinou commented 1 year ago

I've tried an x86_64 JRE 8 from https://adoptium.net/temurin/releases/?version=8. I'm running both the launcher and the game itself with it (specified with instance options). Unlike system OpenJDK 17 from Fedora 37 repositories, this allows b1.7.3 to start, but I get a black screen (I've waited several minutes).

Launcher log:

❯ $HOME/.local/opt/jre8/bin/java -jar launcher-1.09_16.jar
Java version: Temurin, OpenJDK Runtime Environment, 1.8.0_362-b09
System: linux, 6.2.8-200.fc37.x86_64, amd64
[2023-04-18 04:16:06] OUT BetaCraft Launcher JE v1.09_16 loading...
[2023-04-18 04:16:06] OUT Java version: Temurin, OpenJDK Runtime Environment, 1.8.0_362-b09
[2023-04-18 04:16:06] OUT Portable: false
[2023-04-18 04:16:06] OUT EXE: false
[2023-04-18 04:16:06] OUT Prerelease: false
[2023-04-18 04:16:06] OUT Nightly: false
[2023-04-18 04:16:06] OUT Loaded in: 349394701 ns
[2023-04-18 04:16:06] OUT Download started from: http://files.betacraft.uk/launcher/assets/lang/1.09_16/English.txt
[2023-04-18 04:16:07] OUT Download started from: http://files.betacraft.uk/launcher/assets/jsons/b1.7.3.info
[2023-04-18 04:16:07] OUT [/home/hugo/.local/opt/jre8/bin/java, -Djava.util.Arrays.useLegacyMergeSort=true, -Dhttp.nonProxyHosts=api.betacraft.uk|files.betacraft.uk|checkip.amazonaws.com, -Xmx1G, -Dhttp.proxyHost=betacraft.uk, -Dhttp.proxyPort=11705, -cp, /home/hugo/.betacraft/launcher/betacraft_wrapper.jar, org.betacraft.launcher.Launcher, wrap, Calinou, [censored sessionid], -, -, 2becd36a52f44e67b5d38343a6a596c5, default instance]
[2023-04-18 04:16:08] OUT USERNAME: Calinou
[2023-04-18 04:16:08] OUT ACC_UUID: [redacted]

Game console log:

(04:18:20) Java version: Temurin, OpenJDK Runtime Environment, 1.8.0_362-b09
(04:18:20) System: linux, 6.2.8-200.fc37.x86_64, amd64
(04:18:20) Loaded in: 341615003 ns
(04:18:22) [Beta Evolutions] Authenticated with 2 nodes
(04:18:22) 
(04:18:22) Classpath:
(04:18:22) /home/hugo/.betacraft/versions/b1.7.3.jar
(04:18:22) /home/hugo/.betacraft/bin/jinput.jar
(04:18:22) /home/hugo/.betacraft/bin/lwjgl.jar
(04:18:22) /home/hugo/.betacraft/bin/lwjgl_util.jar
(04:18:22) 
(04:18:22) 
(04:18:22) Loading addons:
(04:18:22) 
(04:18:22) Client asked for parameter: fullscreen
(04:18:22) 16 achievements
(04:18:22) 151 recipes
(04:18:22) Client asked for parameter: stand-alone
(04:18:22) Client asked for parameter: username
(04:18:22) Client asked for parameter: sessionid
(04:18:22) Client asked for parameter: username
(04:18:22) Client asked for parameter: sessionid
(04:18:22) Setting user: Calinou, [censored sessionid]
(04:18:22) Client asked for parameter: mppass
(04:18:22) Client asked for parameter: server
(04:18:22) java.lang.ExceptionInInitializerError
(04:18:22)  at net.minecraft.client.Minecraft.a(SourceFile:244)
(04:18:22)  at net.minecraft.client.Minecraft.run(SourceFile:716)
(04:18:22)  at java.lang.Thread.run(Thread.java:750)
(04:18:22) Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
(04:18:22)  at org.lwjgl.opengl.LinuxDisplay.getAvailableDisplayModes(LinuxDisplay.java:951)
(04:18:22)  at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:738)
(04:18:22)  at org.lwjgl.opengl.Display.<clinit>(Display.java:140)
(04:18:22)  ... 3 more

I'm using an X11 session on NVIDIA 530.41.03, with a single 4K display. (I've tried reducing resolution to 1920×1080 just in case, but that didn't resolve the issue.)

Edit: I've resolved this issue by installing xrandr from the repositories, following the instructions from https://stackoverflow.com/questions/58939641/lwjgl-crashing-at-startup.