Closed rafi612 closed 1 year ago
Hey @rafi612,
Could you please post the output when running with -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true
? Then do another run, but this time add GLFWNativeGLX.setPath(GL.getFunctionProvider())
before the glfwInit
call.
Hey @Spasi,
Here's first output:
[LWJGL] Version: 3.3.2+13
OS: Linux v5.4.0-147-generic
JRE: Linux amd64 17.0.6
JVM: OpenJDK 64-Bit Server VM v17.0.6+10-Ubuntu-0ubuntu120.04.1 by Private Build
[LWJGL] Loading JNI library: lwjgl
Module: org.lwjgl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
[LWJGL] Loading library: glfw
Module: org.lwjgl.glfw
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
[LWJGL] Java 9 check intrinsics enabled
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Warning: Failed to instantiate memory allocator: org.lwjgl.system.jemalloc.JEmallocAllocator. Using the system default.
[LWJGL] MemoryUtil allocator: StdlibAllocator
[LWJGL] Loading JNI library: lwjgl_opengl
Module: org.lwjgl.opengl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGL.so.1
Module: org.lwjgl.opengl
libGL.so.1 not found in org.lwjgl.librarypath=/tmp/lwjgl_rafal/3.3.2+13/x64
[LWJGL] Java 9 text decoding enabled
Loaded from system paths: /lib/x86_64-linux-gnu/libGL.so.1
Exception in thread "main" java.lang.IllegalStateException: There is no OpenGL context current in the current thread.
at org.lwjgl.opengl.GL.createCapabilities(GL.java:382)
at org.lwjgl.opengl.GL.createCapabilities(GL.java:311)
at org.lwjgl.opengl.GL.createCapabilities(GL.java:295)
at org.example.Main.main(Main.java:126)
And second output with GLFWNativeGLX.setPath(GL.getFunctionProvider())
added (window is working now):
[LWJGL] Version: 3.3.2+13
OS: Linux v5.4.0-147-generic
JRE: Linux amd64 17.0.6
JVM: OpenJDK 64-Bit Server VM v17.0.6+10-Ubuntu-0ubuntu120.04.1 by Private Build
[LWJGL] Loading JNI library: lwjgl
Module: org.lwjgl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
[LWJGL] Loading JNI library: lwjgl_opengl
Module: org.lwjgl.opengl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGL.so.1
Module: org.lwjgl.opengl
libGL.so.1 not found in org.lwjgl.librarypath=/tmp/lwjgl_rafal/3.3.2+13/x64
[LWJGL] Warning: Failed to instantiate memory allocator: org.lwjgl.system.jemalloc.JEmallocAllocator. Using the system default.
[LWJGL] MemoryUtil allocator: StdlibAllocator
[LWJGL] Java 9 text decoding enabled
Loaded from system paths: /lib/x86_64-linux-gnu/libGL.so.1
[LWJGL] Loading library: glfw
Module: org.lwjgl.glfw
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
[LWJGL] Java 9 check intrinsics enabled
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Java 10 multiplyHigh enabled
@rafi612 Thanks! What happens if you also pass -Dorg.lwjgl.opengl.libname=libGLX.so.0
? With and without the GLFWNativeGLX.setPath
call.
@Spasi Here's output with GLFWNativeGLX.setPath
call (window works):
[LWJGL] Version: 3.3.2+13
OS: Linux v5.4.0-147-generic
JRE: Linux amd64 17.0.6
JVM: OpenJDK 64-Bit Server VM v17.0.6+10-Ubuntu-0ubuntu120.04.1 by Private Build
[LWJGL] Loading JNI library: lwjgl
Module: org.lwjgl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
[LWJGL] Loading JNI library: lwjgl_opengl
Module: org.lwjgl.opengl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGLX.so.0
Module: org.lwjgl.opengl
libGLX.so.0 not found in org.lwjgl.librarypath=/tmp/lwjgl_rafal/3.3.2+13/x64
[LWJGL] Warning: Failed to instantiate memory allocator: org.lwjgl.system.jemalloc.JEmallocAllocator. Using the system default.
[LWJGL] MemoryUtil allocator: StdlibAllocator
[LWJGL] Java 9 text decoding enabled
Loaded from system paths: /lib/x86_64-linux-gnu/libGLX.so.0
[LWJGL] Loading library: glfw
Module: org.lwjgl.glfw
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
[LWJGL] Java 9 check intrinsics enabled
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Java 10 multiplyHigh enabled
And without (window also works):
[LWJGL] Version: 3.3.2+13
OS: Linux v5.4.0-147-generic
JRE: Linux amd64 17.0.6
JVM: OpenJDK 64-Bit Server VM v17.0.6+10-Ubuntu-0ubuntu120.04.1 by Private Build
[LWJGL] Loading JNI library: lwjgl
Module: org.lwjgl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl.so
[LWJGL] Loading library: glfw
Module: org.lwjgl.glfw
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/libglfw.so
[LWJGL] Java 9 check intrinsics enabled
[LWJGL] Closure Registry: ConcurrentHashMap
[LWJGL] Warning: Failed to instantiate memory allocator: org.lwjgl.system.jemalloc.JEmallocAllocator. Using the system default.
[LWJGL] MemoryUtil allocator: StdlibAllocator
[LWJGL] Loading JNI library: lwjgl_opengl
Module: org.lwjgl.opengl
Using SharedLibraryLoader...
Found at: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
Loaded from org.lwjgl.librarypath: /tmp/lwjgl_rafal/3.3.2+13/x64/liblwjgl_opengl.so
[LWJGL] Loading library: libGLX.so.0
Module: org.lwjgl.opengl
libGLX.so.0 not found in org.lwjgl.librarypath=/tmp/lwjgl_rafal/3.3.2+13/x64
[LWJGL] Java 9 text decoding enabled
Loaded from system paths: /lib/x86_64-linux-gnu/libGLX.so.0
[LWJGL] Java 10 multiplyHigh enabled
Version
3.3.2 (nightly)
Platform
Linux x64
JDK
OpenJDK 17.0.6
Module
OpenGL, GLFW
Bug description
Hi! When I tried to create window using GLFW and call
GL.createCapabilities
to create capabilities, LWJGL throw exception with messageThere is no OpenGL context current in the current thread.
This issue only occurs in LWJGL 3.3.2. When I used lwjgl3-awt library everything works. I also compiled latest GLFW and tested similar code, and it work, it can't be upstream issue.My hardware:
GPU: Nvidia Quadro FX 880m Driver: 340.108 I know this card is very old.
I also tested it on my old laptop with Intel GPU (also with Linux) and everything works.
Sample code giving me this error:
Stacktrace or crash log output