LWJGL/lwjgl3

Crash on glfwCreateWindow

AceKiron opened this issue · 5 comments

Version

3.3.3

Platform

Windows x64

JDK

I think it's Oracle's JDK 18.0.2.1, not 100% about the name though.

Module

GLFW

Bug description

Everything compiles normally, but when I run GLFW.glfwCreateWindow(size.getX(), size.getY(), title, MemoryUtil.NULL, MemoryUtil.NULL); it crashes. size.getX() and size.getY() both return ints and title is a String.

Stacktrace or crash log output

Uploaded it to https://hastebin.com/share/utapihasoy.yaml as pasting it here wouldn't let me submit the issue.

Figured out the JDK, it is indeed Oracle's JDK 18.0.2.1. As for reproduction, even the example provided in https://www.lwjgl.org/guide doesn't seem to work.

The same problem persists on other JDKs, such as Azul Zulu Community(TM) versions 21.0.2 and 11.0.20 or Oracle OpenJDK version 21.0.2.

Are you sure your title is non-null?

Otherwise, it looks like a graphics card driver bug, similar to e.g. https://forums.minecraftforge.net/topic/123610-119-forge-crashes-when-opened-with-exit-code-1/.

Are you sure your title is non-null?

Otherwise, it looks like a graphics card driver bug, similar to e.g. https://forums.minecraftforge.net/topic/123610-119-forge-crashes-when-opened-with-exit-code-1/.

I am sure, and my graphics drivers are up to date. However, it seems downgrading LWJGL to 3.1.1 fixed it for now.

The crash is inside AMDs graphics driver, similar to #953. A faulty installation or a buggy driver usually causes this.
However, I am a bit surprised to hear that this can be fixed by switching to an older LWJGL version. Since Minecraft uses 3.3.2 and the issue trackers have not been flooded with users facing the same issue, this might be a fix in GLFW triggering an odd driver bug.

Anyway, I suggest performing a clean install of your graphics driver to see if this changes anything. The go-to approach for this for AMD seems to be using the AMD Cleanup Utility tool. Unfortunately, I cannot assist you with that as I do not own relevant AMD hardware.