gdx-liftoff icon indicating copy to clipboard operation
gdx-liftoff copied to clipboard

(GDX-Liftoff crashing FIXED) Missing custom rocket logo on KDE 6 Wayland

Open akkanben opened this issue 1 year ago • 9 comments

There appears to be an issue with configuration or implementation of GLFW in GDX-Liftoff 1.13 with regards to Wayland. I am able to launch the configuration tool if I login to my system with X11. I can also successfully launch the tool's previous version 1.12.1.17.

06:01:18 ben@zopilote-machine gdx-liftoff-1.13.0.0-linuxX64 → java -jar gdx-liftoff-1.13.0.0.jar 
[LWJGL] GLFW_PLATFORM_ERROR error
	Description : EGL: Failed to clear current context: An EGLDisplay argument does not name a valid EGL display connection
	Stacktrace  :
		org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2093)
		org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2258)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:521)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:451)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:437)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:149)
		gdx.liftoff.Main.main(Main.java:205)
[LWJGL] GLFW_FEATURE_UNAVAILABLE error
	Description : Wayland: The platform does not support setting the window position
	Stacktrace  :
		org.lwjgl.glfw.GLFW.glfwSetWindowPos(GLFW.java:2536)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:542)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:451)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:437)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:149)
		gdx.liftoff.Main.main(Main.java:205)
[LWJGL] GLFW_FEATURE_UNAVAILABLE error
	Description : Wayland: The platform does not support setting the window icon
	Stacktrace  :
		org.lwjgl.glfw.GLFW.nglfwSetWindowIcon(GLFW.java:2435)
		org.lwjgl.glfw.GLFW.glfwSetWindowIcon(GLFW.java:2467)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.setIcon(Lwjgl3Window.java:351)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.setIcon(Lwjgl3Window.java:319)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:552)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:451)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:437)
		com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:149)
		gdx.liftoff.Main.main(Main.java:205)

My system details:

Operating System: EndeavourOS 
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.4-arch2-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: Z170MX-Gaming 5

Edit to add Java details:

06:23:00 ben@zopilote-machine gdx-liftoff-1.13.0.0-linuxX64 → java --version
openjdk 17.0.12 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)

akkanben avatar Oct 23 '24 01:10 akkanben

Interesting. For me it loads and seems to work properly, though I get all those errors in the terminal except the first one.

My system info:

Operating System: openSUSE Tumbleweed 20241018
KDE Plasma Version: 6.2.1
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.3-1-default (64-bit)
Graphics Platform: Wayland

SonicGDX avatar Oct 23 '24 20:10 SonicGDX

Seems the EGLDisplay error may be an NVIDIA specific issue (my system uses an AMD GPU)? Try setting the environment variable detailed here when running the jar: see https://github.com/wired-tomato/WayGL/issues/1#issuecomment-1888282021 and https://github.com/glfw/glfw/issues/2510

As for why the previous version works, it may be due to LWJGL3 being updated from 3.3.3 to 3.3.4 since 1.21.1.17 https://github.com/libgdx/gdx-liftoff/commit/c11f7afd620531d7d2c43656db3103deb8327ad0

SonicGDX avatar Oct 23 '24 20:10 SonicGDX

Thank you for the tip! Setting __GL_THREADED_OPTIMIZATIONS=0 avoids the crash for me during launch. Like you mentioned I also still see the GLFW feature unavailable errors but the EGLDisplay error is gone.

A couple minor issues I still see (that are not present when I use 13.0 under X11 or 1.12 under Wayland) are:

  1. The custom gdx-liftoff icon is not visible
  2. Resizing the window is very laggy.

That said, I'm going to presume the root cause here will get ironed out with future Nvidia driver updates. Closing the issue, just let me know if there is any other reason to reopen.

akkanben avatar Oct 23 '24 21:10 akkanben

Hmm, resizing the window seems to have higher latency but is smoother on 13 for me, but like you the custom icon is not visible on 13 for me while it is on 12. I think the issue might be worth reopening for that (though maybe with a changed title), as that seem to be a regression for Wayland in general rather than an NVIDIA specific issue

SonicGDX avatar Oct 23 '24 21:10 SonicGDX

Also @tommyettinger it might be worth mentioning the NVIDIA issue and associated fix somewhere in the documentation, as it may take some time for NVIDIA to fix the driver issue

SonicGDX avatar Oct 23 '24 21:10 SonicGDX

Reopening this to address the remaining issue related to the missing GDX-Liftoff logo. Like previously stated the logo is visible under X11 with release 13.0 or under Wayland with earlier releases like 1.12.1.17.

akkanben avatar Oct 23 '24 21:10 akkanben

So I don't think I even know what Wayland actually is; I have only seen compatibility issues with it. I didn't really follow what the steps are to resolve an unclear bug with some kind of system I'm not familiar with. If I edit the README.md myself to mention this, expect it to be horrifically mangled and loaded with inaccuracies. PRs welcome!

I don't really think the logo (did you mean icon?) missing from a setup tool affects generated projects, unless I'm understanding this wrong. If you're using Linux you have to be used to some apps looking wrong... Or not looking at all, if they're purely CLI. The logo or icon missing may simply be part of LWJGL 3.3.4's various changes, which I can't do much about. I might have removed the icon setting code in some launchers because there were issues with loading assets from the folder they are normally in. I don't really remember. That may have been in my own projects.

tommyettinger avatar Oct 25 '24 04:10 tommyettinger

Can anyone verify if this is an issue with 1.13.0.1 ? It downgrades the version of libGDX that Liftoff uses to 1.12.1, which seems to work better on Wayland.

tommyettinger avatar Dec 06 '24 07:12 tommyettinger

Can anyone verify if this is an issue with 1.13.0.1 ? It downgrades the version of libGDX that Liftoff uses to 1.12.1, which seems to work better on Wayland.

It's not an issue with 1.13.0.1 yeah. It behaves the same way as Liftoff 1.12.1.17

SonicGDX avatar Dec 06 '24 20:12 SonicGDX