svn update and try again. I had replaced the boolean alreadyInterposed variable with an integer counter by the time I sent out that message, so I think you must have missed the latest commit somehow.
If it still doesn't work, then I don't understand why. The _glXGetConfig() wrapper will increment vglfaker::fakerLevel prior to calling the "real" glXGetConfig() function, so any XCB functions called by the "real" glXGetConfig() function should not be interposed. The reason why I replaced the boolean variable was because of this scenario (this might have been what happened in your test): glXFoo() [interposed] _glXFoo() [wrapper] { vglfaker::alreadyInterposed=true; __glXFoo() [real] { xcb_foo_1() [interposed] { _xcb_foo_1(unmodified args because alreadyInterposed==true) [wrapper] { vglfaker::alreadyInterposed=true; __xcb_foo_1(unmodified args); [real] vglfaker::alreadyInterposed=false; } } xcb_foo_2() [interposed] { _xcb_foo_2(modified args because alreadyInterposed==false) [wrapper] { vglfaker::alreadyInterposed=true; __xcb_foo_2(modified args); [real] vglfaker::alreadyInterposed=false; } } } vglfaker::alreadyInterposed=false; } } In English, if the "real" GLX function called two interposed XCB functions back-to-back, then the first interposed XCB function would leave alreadyInterposed set to false, making the second interposed XCB function think that the XCB interposer should be active (when in fact it shouldn't be.) With the new counter variable, this becomes: glXFoo() [interposed] _glXFoo() [wrapper] { vglfaker::fakerLevel++; // == 1 __glXFoo() [real] { xcb_foo_1() [interposed] { _xcb_foo_1(unmodified args because fakerLevel > 0) [wrapper] { vglfaker::fakerLevel++; // == 2 __xcb_foo_1(unmodified args); [real] vglfaker::fakerLevel--; // == 1 } } xcb_foo_2() [interposed] { _xcb_foo_2(unmodified args because fakerLevel > 0) [wrapper] { vglfaker::fakerLevel++; // == 2 __xcb_foo_2(unmodified args); [real] vglfaker::fakerLevel--; // == 1 } } } vglfaker::fakerLevel--; // == 0 } } If it still doesn't work, then I'm not sure why. On 12/2/14 10:07 PM, Nathan Kidd wrote: > On 02/12/14 08:34 PM, DRC wrote: >> Please check out the code in SVN trunk and see if it corrects this >> issue. > > While that code looks like it will help the general problem (one faked > function calls another) it doesn't fix the particular SEGV[1] I see here > because at the point the XCB code that needs to go to 2D server is > called it is still under the first level (glXChooseVisual) function and > is not in a 2nd level (_glXChooseVisual). > > I think the VGL_PROBGLX code needs to be manually wrapped in > vglfaker::alreadyInterposed=true; > vglfaker::alreadyInterposed=false; > but at this hour my brain is not certified for thinking about this any more. > > > -Nathan > > > [1] > Breakpoint 4, 0x00007ffff7afaf30 in xcb_get_extension_data () from > ./librrfaker.so > (gdb) c > Continuing. > FAKED GLX IN XCB DATA > Breakpoint 4, xcb_get_extension_data (c=0x509370, ext=0x7ffff67c3050 > <xcb_glx_id>) at xcb_ext.c:89 > 89 xcb_ext.c: No such file or directory. > (gdb) c > Continuing. > > Program received signal SIGSEGV, Segmentation fault. > xcb_glx_query_server_string_string_length (R=R@entry=0x0) at glx.c:2448 > 2448 glx.c: No such file or directory. > (gdb) bt > #0 xcb_glx_query_server_string_string_length (R=R@entry=0x0) at glx.c:2448 > #1 0x00007ffff7891595 in __glXQueryServerString > (dpy=dpy@entry=0x518b70, opcode=<optimized out>, > screen=screen@entry=0, name=name@entry=2) at glx_query.c:55 > #2 0x00007ffff7873dd6 in AllocAndFetchScreenConfigs (priv=0x579550, > dpy=0x518b70) at glxext.c:764 > #3 __glXInitialize (dpy=dpy@entry=0x518b70) at glxext.c:879 > #4 0x00007ffff787071b in GetGLXPrivScreenConfig (dpy=0x518b70, scrn=0, > ppriv=ppriv@entry=0x7fffffffdc40, > ppsc=ppsc@entry=0x7fffffffdc48) at glxcmds.c:174 > #5 0x00007ffff78707ab in GetGLXPrivScreenConfig (ppsc=0x7fffffffdc48, > ppriv=0x7fffffffdc40, > scrn=<optimized out>, dpy=<optimized out>) at glxcmds.c:170 > #6 glXGetConfig (dpy=<optimized out>, vis=0x530dc0, attribute=5, > value_return=0x539948) at glxcmds.c:880 > #7 0x00007ffff7aff4c1 in buildVisAttribTable(_XDisplay*, int) () from > ./librrfaker.so > #8 0x00007ffff7b004d9 in glxvisual::matchVisual2D(_XDisplay*, int, int, > int, int, int, int) () > from ./librrfaker.so > #9 0x00007ffff7adb5b0 in glXChooseVisual () from ./librrfaker.so > #10 0x000000000040556c in main () > > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > _______________________________________________ > VirtualGL-Devel mailing list > VirtualGL-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtualgl-devel > ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ VirtualGL-Devel mailing list VirtualGL-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtualgl-devel