jzy3d / jogl

Mirror of https://jogamp.org/cgit/jogl.git/
Other
6 stars 2 forks source link

EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v1.4.0, connection decon, unitID 0, handle 0x1bf7963a070, owner true, NullToolkitLock[obj 0xe8146cb]] #13

Open jzy3d opened 2 years ago

jzy3d commented 2 years ago

Only appears in Windows 10 Pro 64bit, Graphics card QUADRO P400. Using GL driver: Context GL version: 4.6 (Compat profile, arb, compat[ES2, ES3, ES31, ES32], FBO, hardware) - 4.6.0 NVIDIA 462.96

DemoAxisLabelLayout_Native
Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for EGLGraphicsDevice[type .egl, v1.4.0, connection decon, unitID 0, handle 0x1bf7963a070, owner true, NullToolkitLock[obj 0xe8146cb]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:561)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.base/java.lang.Thread.run(Thread.java:832)
Caused[0] by GLException: Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps(1-3)] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(EGLGraphicsConfigurationFactory.java:351)
    [1]: jogamp.opengl.egl.EGLDrawableFactory.evalConfig(EGLDrawableFactory.java:1121)
    [2]: jogamp.opengl.egl.EGLDrawableFactory.createSurfacelessImpl(EGLDrawableFactory.java:1166)
    [3]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.mapAvailableEGLESConfig(EGLDrawableFactory.java:753)
    [4]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:656)
    [5]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:559)
    [6]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [7]: java.base/java.lang.Thread.run(Thread.java:832)
Caught handled GLException: EGLGLXDrawableFactory - Could not initialize shared resources for WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0xe8146cb]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:561)
    [1]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [2]: java.base/java.lang.Thread.run(Thread.java:832)
Caused[0] by InternalError: XXX: defaultDevice EGLGraphicsDevice[type .egl, v1.4.0, connection decon, unitID 0, handle 0x1bf7963a070, owner true, NullToolkitLock[obj 0xe8146cb]], adevice WindowsGraphicsDevice[type .windows, connection decon, unitID 0, handle 0x0, owner false, NullToolkitLock[obj 0xe8146cb]] on thread main-SharedResourceRunner
    [0]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createEGLSharedResourceImpl(EGLDrawableFactory.java:606)
    [1]: jogamp.opengl.egl.EGLDrawableFactory$SharedResourceImplementation.createSharedResource(EGLDrawableFactory.java:559)
    [2]: jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:353)
    [3]: java.base/java.lang.Thread.run(Thread.java:832)

Let's remind the drawable factory hierarchy : image

This page is a good explanation of what EGL is w.r.t CGL (macOS) WGL (Windows) and GLX (Linux).

There are existing problems discussed in JOGL forum regarding EGL

jzy3d commented 2 years ago

The issue initially arised while running DemoTernaryChart3d_withAxisLabels_Native. This will most probably occur while running any demo such as SurfaceDemoAWT on the same Windows 10 computer.

I tend to think that the reason is that MESA appears in the Windows PATH variable, probably due to having installed MESA through MSYS2.

jzy3d commented 2 years ago

I can get rid of this exception by doing two things