Problem with fglrx (I think) while calling glXMakeCurrent()

Hi.

Sometimes my program crashes with the following message:

Code: Select all

    [xcb] Extra reply data still left in queue
    [xcb] This is most likely caused by a broken X extension library
    [xcb] Aborting, sorry about that.
    sciv: ../../src/xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed.

And this is the backtrace:

Code: Select all

    #0  0x00007ffff6d9f475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    #1  0x00007ffff6da26f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
    #2  0x00007ffff6d98621 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
    #3  0x00007ffff7ae746d in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
    #4  0x00007ffff78dd4e7 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
    #5  0x00007ffff420c8f0 in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #6  0x00007ffff420cb86 in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #7  0x00007ffff420ce4e in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #8  0x00007ffff4211faf in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #9  0x00007ffff421209f in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #10 0x00007ffff78dc79a in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
    #11 0x00007ffff78dcdd5 in glXMakeCurrent () from /usr/lib/x86_64-linux-gnu/libGL.so.1

glXMakeCurrent is the last function called directly by me. This is weird since it happens very irregularly. I’m using multithreading but I’m pretty sure I have all my mutexes in check, so I’m starting to think this is not a very obvious problem. Could the speed at which I switch the contexts between the threads have something to do with it? Or maybe the fact that I’m using immediate mode to render my things (I don’t need much power so I decided I didnt need shaders)?

Im programming this using raw xlib and opengl.

It may also be worth mentioning that this never happened before with any program or openGL based library (SDL for example), however I never tried to multithread opengl with SDL. What am I doing wrong here?

Any help would be appreciated, I’m out of ideas here.

Just wanted to give you some additional info, may not be a change you made. My ATSC video stopped working on June 15 2014 after I downloaded some minor system updates. When I start Kaffeine to watch live video I now get:
[xcb] Extra reply data still left in queue
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
kaffeine-xbu: …/…/src/xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left’ failed.

Unlikely that is a coincidence.

I am looking into exact library changes now but it is a maze. Will let you know if I have a breakthrough.

[QUOTE=ShiroAisu;1259990]Hi.

Sometimes my program crashes with the following message:

Code: Select all

    [xcb] Extra reply data still left in queue
    [xcb] This is most likely caused by a broken X extension library
    [xcb] Aborting, sorry about that.
    sciv: ../../src/xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed.

And this is the backtrace:

Code: Select all

    #0  0x00007ffff6d9f475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
    #1  0x00007ffff6da26f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
    #2  0x00007ffff6d98621 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
    #3  0x00007ffff7ae746d in _XReply () from /usr/lib/x86_64-linux-gnu/libX11.so.6
    #4  0x00007ffff78dd4e7 in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
    #5  0x00007ffff420c8f0 in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #6  0x00007ffff420cb86 in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #7  0x00007ffff420ce4e in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #8  0x00007ffff4211faf in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #9  0x00007ffff421209f in ?? () from /usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
    #10 0x00007ffff78dc79a in ?? () from /usr/lib/x86_64-linux-gnu/libGL.so.1
    #11 0x00007ffff78dcdd5 in glXMakeCurrent () from /usr/lib/x86_64-linux-gnu/libGL.so.1

glXMakeCurrent is the last function called directly by me. This is weird since it happens very irregularly. I’m using multithreading but I’m pretty sure I have all my mutexes in check, so I’m starting to think this is not a very obvious problem. Could the speed at which I switch the contexts between the threads have something to do with it? Or maybe the fact that I’m using immediate mode to render my things (I don’t need much power so I decided I didnt need shaders)?

Im programming this using raw xlib and opengl.

It may also be worth mentioning that this never happened before with any program or openGL based library (SDL for example), however I never tried to multithread opengl with SDL. What am I doing wrong here?

Any help would be appreciated, I’m out of ideas here.[/QUOTE]