Login  Register

Re: Cannot initialize JOGL on Mesa swrast after upgrade

Posted by Dolda2000 on Feb 06, 2014; 11:42am
URL: https://forum.jogamp.org/Cannot-initialize-JOGL-on-Mesa-swrast-after-upgrade-tp4031458p4031476.html

Actually, I'm now inclined to ascribe this problem to some kind of bug in Mesa. I traced it back to glXChooseFBConfig, and Mesa actually seems to return a list with NULLs in it:

Breakpoint 1, glXChooseFBConfig (dpy=0x92a590, screen=0, attribList=0x0, nitems=0x93d000) at glxapi.c:440
440     in glxapi.c
(gdb) fin
Run till exit from #0  glXChooseFBConfig (dpy=0x92a590, screen=0, attribList=0x0, nitems=0x93d000) at glxapi.c:440
0x00007fffe6b121e9 in Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseFBConfig () from /tmp/jogamp_0001/file_cache/jln276503119532837898/jln5814539244293834592/libjogl_desktop.so
Value returned is $3 = (GLXFBConfig *) 0x9368e0
(gdb) p *(int *)0x93d000
$4 = 6
(gdb) p $3[0]
$5 = (GLXFBConfig) 0x0
(gdb) p $3[1]
$6 = (GLXFBConfig) 0x93d380
(gdb) p $3[2]
$7 = (GLXFBConfig) 0x0
(gdb) p $3[3]
$8 = (GLXFBConfig) 0x9407a0
(gdb) p $3[4]
$9 = (GLXFBConfig) 0x943bc0
(gdb) p $3[5]
$10 = (GLXFBConfig) 0x946fe0

Sorry for wasting your time with something that doesn't seem to have with JOGL to do at all. I just assumed JOGL did something weird, since glxinfo worked properly, but looking at it, those NULLs correspond to lines from glxinfo where all attributes are zeroes, so glxinfo probably just doesn't check the return code from glXGetFBConfigAttrib.

If anything, you guys may want to check for this condition and signal it specifically, but if you decide not to, I understand entirely, since it's clearly pathological. :)