How to debug "Unable to create ES OpenGL context" error?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to debug "Unable to create ES OpenGL context" error?

gohai
Hello all,

Any ideas how to proceed from here? Is the problems the capabilities not matching? (requested: dp/st/ms 24/8/2, sample-ext default; chosen: dp/st/ms 0/0/0) Or an error with the underlying driver? Curious: error 0x3000 is EGL_SUCCESS?

java.lang.RuntimeException: com.jogamp.opengl.GLException: main-Display-jogamp.newt.driver.x11_:0.0-1-EDT-1: Unable to create ES OpenGL context on eglDevice EGLGraphicsDevice[type .egl, v1.4.0, connection :0.0, unitID 0, handle 0x3bf1ac8, owner true, ResourceToolkitLock[obj 0xbc3f3a, isOwner true, <ba2d15, 47119>[count 1, qsz 0, owner ]]], eglConfig <EGLGraphicsConfiguration[DefaultGraphicsScreen[EGLGraphicsDevice[type .egl, v1.4.0, connection :0.0, unitID 0, handle 0x3bf1ac8, owner true, ResourceToolkitLock[obj 0xbc3f3a, isOwner true, <ba2d15, 47119>[count 1, qsz 0, owner ]]], idx 0],
eglConfigHandle 0x3bbe880, eglConfigID 0x2,
requested GLCaps[rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/2, sample-ext default, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], on-scr[.]],
chosen GLCaps[egl cfg 0x2, vid 0x21: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 0/0/0, dbl, mono , hw, GLProfile[GLES2/GLES2.hw], on-scr[.], [0xd: GL, GLES1, GLES2, VG]]], GLProfile[GLES2/GLES2.hw], shareWith 0x0, error 0x3000


(I am testing with the various .debug properties set to "all" next. Will update thread tomorrow.)

Thanks,
Gottfried
Reply | Threaded
Open this post in threaded view
|

Re: How to debug "Unable to create ES OpenGL context" error?

Xerxes Rånby
This post was updated on .
Please generate a runtime version check and a runtime debug log using the 7z x unpacked
http://jogamp.org/deployment/jogamp-current/archive/jogamp-all-platforms.7z

http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases#Runtime_Version_Check
sh etc/test.sh

http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases#Runtime_Debug_Logs
sh etc/test_dbg.sh

and attach the
test.log
and
test_dbg.log

It will document the system you use better and the capabilities of your OpenGL ES driver.
Reply | Threaded
Open this post in threaded view
|

Re: How to debug "Unable to create ES OpenGL context" error?

gohai
Both files attached.

I checked with ldconfig, my custom-build mesa with vc4-goodness (running) seems to be used for both libGL.so.1 and libEGL.so.1. When running the test_dbg.sh, my screen turned black because of a OOM situation with graphics memory - but this did not happen in my program, where it simply errored out at some point. Any thing you can glean from the log still?

Thanks.

test.log
test_dbg.log
Reply | Threaded
Open this post in threaded view
|

Re: How to debug "Unable to create ES OpenGL context" error?

Xerxes Rånby
This post was updated on .
gohai wrote
Both files attached.

I checked with ldconfig, my custom-build mesa with vc4-goodness (running) seems to be used for both libGL.so.1 and libEGL.so.1. When running the test_dbg.sh, my screen turned black because of a OOM situation with graphics memory - but this did not happen in my program, where it simply errored out at some point. Any thing you can glean from the log still?

Thanks.

test.log
test_dbg.log
It looks like you only have managed to build Mesa3D with only CPU rendering enabled
all profiles ends with .sw
i would have expected these to end with .hw if the Mesa3D driver was using the vc4 hardware acceleration in combination with Glamour.

GLProfile.init map GLProfile[GL4bc/GL4bc.sw] on device decon
GLProfile.init map defaultAny GLProfile[GL4bc/GL4bc.sw] on device decon
GLProfile.init map GLProfile[GL3bc/GL3bc.sw] on device decon
GLProfile.init map GLProfile[GL2/GL2.sw] on device decon
GLProfile.init map GLProfile[GL4/GL4.sw] on device decon
GLProfile.init map GLProfile[GL3/GL3.sw] on device decon
GLProfile.init map GLProfile[GLES3/GLES3.sw] on device decon
GLProfile.init map GLProfile[GL4ES3/GL4bc.sw] on device decon
GLProfile.init map GLProfile[GL2GL3/GL2.sw] on device decon
GLProfile.init map GLProfile[GLES2/GLES2.sw] on device decon
GLProfile.init map GLProfile[GL2ES2/GL2.sw] on device decon
GLProfile.init map GLProfile[GLES1/GLES1.sw] on device decon
GLProfile.init map GLProfile[GL2ES1/GL2.sw] on device decon

Can you post links and instructions to how you have setup and configured your system to use vc4?
Do simple native OpenGL applications work for you using the new vc4-driver-goodness ?

The debug logfile ends with
Nativewindow X11 IOError: Display 0x64a2c250 (:0.0): Resource temporarily unavailable
Nativewindow X11 IOError: Display 0x64a2c250 (:0.0): Resource temporarily unavailable
FATAL ERROR in native method: Nativewindow X11 IOError: Display 0x64a2c250 (:0.0): Resource temporarily unavailable
        at sun.awt.X11.XlibWrapper.XEventsQueued(Native Method)
        at sun.awt.X11.XToolkit.run(XToolkit.java:575)
        at sun.awt.X11.XToolkit.run(XToolkit.java:542)
        at java.lang.Thread.run(Thread.java:744)

not sure about why this happens, do normal Swing applications run on your X11 driver?
Reply | Threaded
Open this post in threaded view
|

Re: How to debug "Unable to create ES OpenGL context" error?

gohai
Hi Xerxes,

I ran it today again, and got much further without OOMing. This time it does include references to .hw devices. Any idea from the log what might be wrong, or which call in particular fails?

Thanks
Gottfried
test_dbg-new
Reply | Threaded
Open this post in threaded view
|

Re: How to debug "Unable to create ES OpenGL context" error?

Xerxes Rånby
gohai wrote
Hi Xerxes,<br>
<br>
I ran it today again, and got much further without OOMing. This time it does include references to <tt>.hw</tt> devices. Any idea from the log what might be wrong, or which call in particular fails?<br>
<br>
Thanks<br>
Gottfried<br>
test_dbg-new
EGL Capabilities looks good!
        GLCaps[egl cfg 0x2, vid 0x21: rgba 8/8/8/8, opaque, accum-rgba 0/0/0/0, dp/st/ms 0/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.hw], on-scr[fbo, pbuffer, bitmap], [0xd: GL, GLES1, GLES2, VG]]
...
        GLCaps[egl cfg 0xa9, vid 0x22: rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 24/8/0, dbl, mono  , hw, GLProfile[GL2/GL2.hw], on-scr[fbo, pbuffer, bitmap], [0xd: GL, GLES1, GLES2, VG]]

With the above EGL capabilities i would have expected JOGL to map the GL2, GLES2, GLES1, GL2ES2 and GL2ES1 to true, but in the debug log they all map to false.
I cant see why JOGL fails to map these profiles, surely a bug. Sven can you see by looking at the debug log why the mapping fail?

GLProfiles on device X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x1ccaa, isOwner false, <1c7db30, 1bb089b>[count 0, qsz 0, owner <NULL>]]]
        Natives
                GL4bc false
                GL4 false
                GLES3 false
                GL3bc false
                GL3 false
                GL2 false
                GLES2 false
                GLES1 false
                Count 0 / 8
        Common
                GL4ES3 false
                GL2GL3 false
                GL2ES2 false
                GL2ES1 false
        Mappings
                default n/a
                Count 0 / 12

without any mapped profiles makes JOGL abort that no default profile is available.

Exception in thread "main" com.jogamp.opengl.GLException: Profile GL_DEFAULT is not available on X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x1ccaa, isOwner false, <1c7db30, 1bb089b>[count 0, qsz 0, owner <NULL>]]], but: []
        at com.jogamp.opengl.GLProfile.get(GLProfile.java:990)
        at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:721)
        at com.jogamp.opengl.GLProfile.getDefault(GLProfile.java:732)
        at com.jogamp.newt.opengl.GLWindow.main(GLWindow.java:996)
Reply | Threaded
Open this post in threaded view
|

Re: How to debug "Unable to create ES OpenGL context" error?

Xerxes Rånby
scrolled up the log a bit and found this

X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: Failed glXChooseFBConfig (X11GraphicsScreen[X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x129bba8, owner true, ResourceToolkitLock[obj 0x7a6d7c, isOwner true, <13cf087, 1fb1290>[count 2, qsz 0, owner <main-SharedResourceRunner>]]], idx 0],GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono  , hw, GLProfile[GL2/GL2.sw], on-scr[.]]): PointerBuffer:AbstractBuffer[direct true, hasArray false, capacity 0, position 0, elementSize 4, buffer[capacity 0, lim 0, pos 0]], 108
glXChooseVisual recommended com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0.0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x1ccaa, isOwner false, <1c7db30, 1bb089b>[count 0, qsz 0, owner <NULL>]]]
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326)
        at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297)
        at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IndexOutOfBoundsException
        at java.nio.Buffer.checkIndex(Buffer.java:546)
        at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:681)
        at com.jogamp.common.nio.StructAccessor.getLongAt(StructAccessor.java:191)
        at jogamp.nativewindow.x11.XVisualInfo.getVisualid(XVisualInfo.java:87)
        at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationXVisual(X11GLXGraphicsConfigurationFactory.java:419)
        at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(X11GLXGraphicsConfigurationFactory.java:240)
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createMutableSurfaceImpl(X11GLXDrawableFactory.java:524)
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createDummySurfaceImpl(X11GLXDrawableFactory.java:535)
        at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:283)
        ... 2 more