glfw/glfw

GLFW error 65544

furretgd1 opened this issue · 6 comments

ISSUE

I am currently receiving the error provided in the image below, it is reproducible consistently for me although oddly enough other people haven't run into this same issue as it's non existent on the internet it could be the fact I am running this on Nvidia, although that is a guess.

HOW TO REPRODUCE IT

Basically I've compiled GLFW on Gentoo release 3.3.9 with the local use flag wayland-only which is allowing me when running Minecraft with Multi-MC to direct it to use my systems GLFW you don't need to use Multi-MC that's just the easiest way to direct it to the systems GLFW you can pass flags in Minecraft Java Arguments -Dorg.lwjgl.glfw.libname=<path to libglfw.so>

IMAGE

Screenshot_20240310_153700

OUTPUT FROM MINECRAFT

[19:52:29] [Render thread/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[19:52:30] [Render thread/INFO]: Setting user: Jordan_Coolest
[19:52:30] [Render thread/INFO]: Backend library: LWJGL version 3.2.2 build 10
Warning: Missing charsets in String to FontSet conversion
[20:06:59] [Render thread/WARN]: Failed to create window: 
dsr$a: GLFW error 65544: EGL: Failed to clear current context: An EGLDisplay argument does not name a valid EGL display connection
	at dsr.b(SourceFile:218) ~[minecraft-1.18.2-client.jar:?]
	at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:36) ~[lwjgl-glfw-3.2.2.jar:build 10]
	at org.lwjgl.system.JNI.invokePPPP(Native Method) ~[lwjgl-3.2.2.jar:build 10]
	at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1714) ~[lwjgl-glfw-3.2.2.jar:build 10]
	at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1897) ~[lwjgl-glfw-3.2.2.jar:build 10]
	at dsr.<init>(SourceFile:92) ~[minecraft-1.18.2-client.jar:?]
	at erh.a(SourceFile:21) ~[minecraft-1.18.2-client.jar:?]
	at dyr.<init>(SourceFile:476) ~[minecraft-1.18.2-client.jar:?]
	at net.minecraft.client.main.Main.main(SourceFile:197) [minecraft-1.18.2-client.jar:?]
	at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:243) [NewLaunch.jar:?]
	at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:278) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.listen(EntryPoint.java:143) [NewLaunch.jar:?]
	at org.multimc.EntryPoint.main(EntryPoint.java:34) [NewLaunch.jar:?]

I also am having this issue and I am also running an Nvidia card. I'm on Arch, running the glfw-wayland package.

That looks like memory corruption. It shouldn't be possible to get to that point in GLFW without a valid EGL display.

This doesn't indicate memory corruption.

To address this, set the environment variable __GL_THREADED_OPTIMIZATIONS=0.

Subsequently, you may encounter cursor position issues within the game. To resolve this, install the patched version of GLFW from AUR glfw-wayland-minecraft-cursorfix. If you're playing from multimc/prismlauncher, ensure you configure the settings to utilize the system GLFW library.

This doesn't indicate memory corruption.

To address this, set the environment variable __GL_THREADED_OPTIMIZATIONS=0.

Subsequently, you may encounter cursor position issues within the game. To resolve this, install the patched version of GLFW from AUR glfw-wayland-minecraft-cursorfix. If you're playing from multimc/prismlauncher, ensure you configure the settings to utilize the system GLFW library.

Yep you're absolutely right! This was a Nvidia driver related issue which was causing this (it hasn't been patched yet even on the latest version of the driver) so using this Environment Variable seems to be a temporary solution to that problem, I'll report it to Nvidia see if they respond back. But in the mean time there is also additionally a line of GLFW which further prevents Minecraft from starting.

Line 2230/2231 wl_window.c

 _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
                    "Wayland: The platform does not support setting the window icon");

FIX

fprintf(stderr, "!!! Ignoring Error: Wayland: The platform does not support setting the window icon\n");

The fix being making this a warning rather than a hard failure for a presumed unimplemented function.

Certainly, the glfw-wayland-minecraft-cursorfix already includes the necessary patch to address the setting window icon issue, as well as another patch aimed at resolving duplicate pointer scroll events. In addition, there are other patches that you may find useful. If you are using Gentoo, you can still apply all patches from the AUR and compile GLFW with them to fix Minecraft-related issues on Wayland.

Apologies for going off-topic, but I believe this information will be very useful, especially after resolving the GLFW error 65544 in Minecraft.

I've been experiencing this issue too. I have a laptop with a Nvidia card running Manjaro. A way to reproduce is running the GLFW+OpenGL3 example from the Dear ImGui repository:

git clone --depth=1 https://github.com/ocornut/imgui
cd imgui/examples/example_glfw_opengl3
make
prime-run ./example_glfw_opengl3

The example works with the integrated Intel UHD Graphics. In order to run with the dedicated Nvidia GPU, I use the tool "prime-run".