Skip to content
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

"Extension string retrieval is broken" since 3.3.3 on Linux with intel iGPU #955

Open
krzyk opened this issue Dec 29, 2023 · 1 comment
Open
Labels
Status: Awaiting Response Issues that wait on a response from its creator to be resolved. Type: Bug

Comments

@krzyk
Copy link

krzyk commented Dec 29, 2023

Version

3.3.3, 3.3.2

Platform

Linux x64

JDK

Temurin or OpenJDK builds 11 - 21

Module

LWJGL Core

Bug description

This is unfortunately related in someway to libgdx, so I'm not sure where the issue is.
Is it a incorrect way libgdx calls lwjgl3 or something that got broken in lwjgl3.

I hava a libgdx basic demo app at https://github.com/krzyk/libgdx-test which works fine in libgdx 1.11.1 version which uses lwjgl3 3.3.1, but breaks when it upgrades to lwjgl3 3.3.2

First reported at libgdx/libgdx#7308 but the issue appeared only when changed dependency from lwjgl3 version 3.3.1 to 3.3.2.

My system is:
Linux (kernel 6.6.8)
Ubuntu 20.04 (but with custom video/mesa drivers)

libva info: VA-API version 1.21.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.6.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.4.3 (32841e3dc)

System has two GPUs (nvidia and intel one) but only intel one us used - nvidia doesn't have any drivers installed.

All OpenGL apps (like games, glxgears) work fine, the only issue is with lwjgl3 3.3.2 versions breaking on extensions string retrieval (like in the stacktrace).

Stacktrace or crash log output

[LWJGL] GLFW_PLATFORM_ERROR error
        Description : Extension string retrieval is broken
        Stacktrace  :
                org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2058)
                org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2229)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:527)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:463)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:449)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:163)
                com.mygdx.game.DesktopLauncher.main(DesktopLauncher.java:13)
[LWJGL] GLFW_PLATFORM_ERROR error
        Description : Extension string retrieval is broken
        Stacktrace  :
                org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2058)
                org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2229)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:527)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:463)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:449)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:163)
                com.mygdx.game.DesktopLauncher.main(DesktopLauncher.java:13)
[LWJGL] GLFW_PLATFORM_ERROR error
        Description : Extension string retrieval is broken
        Stacktrace  :
                org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:2058)
                org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:2229)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:527)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:463)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:449)
                com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:163)
                com.mygdx.game.DesktopLauncher.main(DesktopLauncher.java:13)
Exception in thread "main" java.lang.NullPointerException
        at org.lwjgl.system.Checks.check(Checks.java:188)
        at org.lwjgl.system.MemoryUtil.memLengthNT1(MemoryUtil.java:2406)
        at org.lwjgl.system.MemoryUtil.memASCII(MemoryUtil.java:2673)
        at org.lwjgl.opengl.GL.createCapabilities(GL.java:442)
        at org.lwjgl.opengl.GL.createCapabilities(GL.java:311)
        at org.lwjgl.opengl.GL.createCapabilities(GL.java:295)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createGlfwWindow(Lwjgl3Application.java:572)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:463)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:449)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.createWindow(Lwjgl3Application.java:449)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:163)
        at com.mygdx.game.DesktopLauncher.main(DesktopLauncher.java:13)
@Spasi
Copy link
Member

Spasi commented Dec 29, 2023

Hey @krzyk,

Please check if Nvidia's libglvnd is present (and possibly broken/misconfigured) in your system. The issue might be related to #880. To verify, try running the application with -Dorg.lwjgl.opengl.libname=libGL.so.1 and calling GLFWNativeGLX.setPath(GL.getFunctionProvider()) before initializing GLFW.

@TheMrMilchmann TheMrMilchmann added Type: Bug Status: Awaiting Response Issues that wait on a response from its creator to be resolved. labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Response Issues that wait on a response from its creator to be resolved. Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants