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.19 fails to launch with crashing Java #779
Comments
While you are at it, feel free to send the |
I also suspect it's something with alpine and you should try the PolyMC flatpak |
odd, try redoing the instance but i suspect it's something with alpine |
The Flatpak launches fine indeed. Note that I was earlier just changing an existing 1.18 instance to 1.19 in which this occurred, after which I made a fresh one for 1.19 instead. "Something with Alpine" is a bit vague, it's just the good ol' openjdk, do you know a bit more? |
Can you see if it works using the official launcher (outside of Flatpak)? |
I can not. Alpine Linux uses Musl libc and the official launcher uses Electron which requires glibc... Just one of several reasons I prefer PolyMC 😅 |
I personally didn't use Alpine Linux much outside of containers or very light workloads for Raspberry Pis, so maybe this is complete bullshit. But maybe you are able to use |
i've stumbled over the same issue, from my experience it's not limited to 1.19 either; mojang distributes $ ldd /tmp/lwjglpatrycja/3.3.1-build-7/liblwjgl.so
/lib/ld-musl-x86_64.so.1 (0x7f2e3e6b9000)
libpthread.so.0 => /lib/ld-musl-x86_64.so.1 (0x7f2e3e6b9000)
libc.so.6 => /lib/ld-musl-x86_64.so.1 (0x7f2e3e6b9000)
libdl.so.2 => /lib/ld-musl-x86_64.so.1 (0x7f2e3e6b9000)
Error relocating /tmp/lwjglpatrycja/3.3.1-build-7/liblwjgl.so: __snprintf_chk: symbol not found
Error relocating /tmp/lwjglpatrycja/3.3.1-build-7/liblwjgl.so: pwritev64v2: symbol not found
Error relocating /tmp/lwjglpatrycja/3.3.1-build-7/liblwjgl.so: preadv64v2: symbol not found GDB stacktrace
one fix would be to add some kind of "use system installation of lwjgl" checkbox, so musl-based distributions could add it as a dependency of polymc; i'm not really sure if that would work though, in case mojang requires different versions of lwjgl for different versions of minecraft edit: i have noticed that from the 3 symbols reported as glibc-specific only one was actually implemented in gcompat, but even after adding them and explicitly preloading libgcompat it still segfaults in the same way |
Oof, ouch, good find! That is a painful change... I never understood why companies shipping proprietary software on Linux don't statically compile it against Musl as that actually works everywhere. If distributions can manage to ship several versions of lwjgl next to each other, then they could make the PolyMC packaging depend on all the versions Minecraft might require. This would have to be figured out first though, as just shipping one version and hoping that'll work forever won't do. If it is possible though, then a "use system installation of lwjgl" option in PolyMC would indeed help. |
I had the same issues using nix-flake. Why should this happen with an reproducible environment? |
if you literally read the comments you would know it only happens on 1.19+ |
Sorry I didn't take the time to read them all |
And I can confirm it is not limited to 1.19 as 1.18.2 crashes too |
is lwjgl 3 in the version tab set to 3.2.2? |
Yes it is |
Just because it crashes on 1.18.2, it doesn't mean it's the same problem. The issue I reported is specific to 1.19 and higher, and the LWJGL issue as mentioned before is the most likely cause. Please open a separate issue if 1.18 and/or lower versions crash for you. |
I will proceed but please do not go insulting me if my issue ends up being a duplicate |
i can reproduce it on 1.18, with lwjgl being linked against glibc being the cause of jvm segfaults
@DioEgizio "if you literally read the comments", just a few comments before yours i said "from my experience it's not limited to 1.19 either". here's a log from polymc:
the lwjgl shared libraries 3.2.1, 3.2.2 and 3.3.1 are all linked to glibc, 3.1.6 or 3.1.2 fail with mismatching function signatures:
but trying to load 3.1.6 with minecraft 1.13 also segfaults... as @Username404-59 said in their (now deleted) comment, this indeed happens on 1.13+, and for the exact same reason. |
I was trying to reproduce this issue in a VM and was not able to reproduce the issue using 1.18.2 and LWJGL 3.2.2: #1055 (comment) |
after more thorough debugging, it turns out the issue is caused by lwjgl 3.3.1 not falling back to the java implementation, but instead trying to load the native libraries regardless. this can be replicated on the older versions by... having the |
Should #1055 be considered a duplicate since the root issue is (mostly) the same? |
this doesn't seem to be too version specific. |
@ptrcnull if it is segfaulting in the same way, then it seems like did not actually build and install that PR. the symbols should be found then |
@theofficialgman it's segfaulting, if the symbols were missing, the executable would not be even launched |
I get that. So ldd is all good now then? Just show the log. It shouldn't have missing symbols anymore if you use that PR |
No, that's not what is happening. The native implementation IS the only implementation (always has been, always will be). Lwjgl is a library which functions as a bridge between native code (opengl, vulkan, jemalloc, etc) and java. You simply cannot implement these in the jvm alone |
@theofficialgman and it doesn't. just to be clear, by "it still segfaults in the same way" i meant the segfault from the original comment on this issue; as i said, missing symbols wouldn't allow the executable to be loaded, so a segmentation fault (which is a runtime error) is not possible in that case.
(the following refers to lwjgl <3.3, in my case 3.2.1)
apparently lwjgl can function without jemalloc, as the game launches just fine. the issue occurs when gcompat is present in the system, which causes the shared library to load correctly, but segfault immediately after loading. |
Running on Arch Linux, we ran into this issue when trying to run Minecraft 🎉 The solution was to change the It's important to note that the default version of Additionally, we're running Happy Crafting! |
Operating System
Linux
Version of PolyMC
1.3.1
Description of bug
When launching a clean Minecraft1.19 instance (freshly made) with either Java 1.17 or Java 1.18, Java crashes and the game never launches. The same Java versions however can be used to launchMinecraft 1.18 and lower just fine.
However I can run Minecraft 1.19 using the official Mojang launcher (in a Flatpak) perfectly fine.
Steps to reproduce
Suspected cause
No response
This issue is unique
The text was updated successfully, but these errors were encountered: