• EditorBugs
  • Crash under Wayland on Fedora 40 [libnvidia-glcore.so.570.86.16+0xa58f7c]

To start, the application works under X11 in the exact same environment, so this is entirely a Wayland bug. I believe it is related to this forum post from 2020:
http://forum.lwjgl.org/index.php?topic=7086.0

Has lwgl been updated recently? Can the next release update that library?

Here is a dump of my spine log. It's crashing after the launcher, but before the actual application opens at all. Specifically it looks like it's crashing when the launcher window is being destroyed.

Related Discussions
...

The crash you are experiencing under Wayland on Fedora 40 seems to be related to the graphics driver, specifically with the libnvidia-glcore.so library. This is consistent with other issues where Spine crashes due to OpenGL or graphics driver problems, as seen in various contexts where updating graphics drivers or using different configurations has been suggested. The issue you mentioned from the LWJGL forum post might be related to how LWJGL handles certain display configurations, which can cause crashes in specific environments like Wayland.

Regarding updates to LWJGL, it is not clear from the provided contexts if there have been recent updates to this library in Spine. However, updating LWJGL could potentially address compatibility issues with Wayland. It might be worth checking if there are any updates available for your graphics drivers or trying different configurations, such as using X11, as you mentioned it works in that environment.

I removed your spine.log since it had your name and email. If you post it as a forum attachment, the forum will redact that. We have a copy of your log though.

LWJGL3 uses GLFW, but Spine uses the older LWJGL2 which doesn't use GLFW and does it's own OpenGL/window/events. LWJGL2 hasn't changed in a long time. Eventually we'll move to LWJGL3 for multiple OpenGL windows.

The crash is in libnvidia-glcore.so when the OpenGL display is destroyed because the launcher is being shut down right before starting the editor (which sets up a new OpenGL display). Any time the crash is in a graphics driver, the driver itself is suspect, though it could be something else. Do you have the latest Nvidia drivers for your graphics hardware?

Was Spine working on your setup previously?

I'll DM you a link to a slightly older launcher to see if it's caused by a recent change in the 4.3.00 launcher.

Thank you for that. I tried the old launcher and the bug is still there. I am using the latest Nvidia drivers for Fedora 40 (570.86.16), but this has been happening across versions. You can actually google around and find a bunch of Minecraft threads that reference the same issue.

If there's a significant distance between the java library versions, then I'll just have to swap to X11 when I want to use this app natively.

It runs just fine under Wine and Wayland, which is frustrating haha.

Re: Wine, that is annoying! 😆

I did a quick search and found lots of similar LWJGL (2 and 3) crashes, but very few crash in nDestroyWindow like we're seeing here.

LWJGL2 nDestroyWindow code is here:
LWJGL/lwjglblob/2df01dd762e20ca0871edb75daf670ccacc89b60/src/native/linux/opengles/org_lwjgl_opengl_Display.c#L542

destroyWindow is here:
LWJGL/lwjglblob/2df01dd762e20ca0871edb75daf670ccacc89b60/src/native/linux/opengles/org_lwjgl_opengl_Display.c#L227

static void destroyWindow(JNIEnv *env, Display *disp, Window window) {
	XDestroyWindow(disp, window);
	XFreeColormap(disp, cmap);
}

The crash is in one of those two calls, and they are both in X11 here:
mirror/libX11blob/master/include/X11/Xlib.h

Maybe Spine or LWJGL2 is doing something that causes those X11 functions to explode, but it seems more likely it's an Nvidia driver issue.

Hm... Yeah it seems like Wayland shouldn't be calling X11 functions. Maybe under Xwayland it's doing it. So maybe it's not an Nvidia driver issue but a Wayland bug that is passing a null pointer to destroywindow

UPDATE: I just tried running on Fedora 39 on my laptop with Wayland and there was no crash. Then I remembered that I have a passthrough GPU that is disabled on my desktop and it's in slot 0, so I bet the NVIDIA/Wayland driver are trying to use that one.

Long story short, this seems like a very personal bug. If someone comes across this thread in the future from googling the "nv_glcore" stuff, I will try to see what I can find to help them solve this.

Ah, interesting. Thanks for following up!

7일 후

Can you please try setting __GL_THREADED_OPTIMIZATIONS=0?

export __GL_THREADED_OPTIMIZATIONS=0
./Spine.sh

    Nate Well that's progress at least! It starts without crashing, but now throws a different error about Wayland. I'll get more details soon

    • Nate 님이 이 게시물을 좋아합니다..

    Looks like it all is working perfectly with that environment variable. Was glitchy a bit at first, but on relaunching it works great. Thanks!

    Great! We can put it in Spine.sh to reduce the pain.