I managed to trigger the assertion here on my own machine with a parallel install of XCB and the Xlib wrapper. However, it seems that the bug is really caused by the Xrandr library or a library Xrandr depends on. Here's a simple C program that also fails using XCB:
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xrandr.h>
int main() {
Display *disp = XOpenDisplay(NULL);
int num_sizes;
XRRSizes(disp, 0, &num_sizes);
}
gdb gives me this:
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb7d40770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7d41ef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7d39dbb in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7d15834 in xcb_xlib_lock (c=0x804a7f8) at xcb_xlib.c:41
#5 0xb7e99a8c in _XCBLockDisplay (dpy=0x804a008) at xcb_lock.c:20
#6 0xb7e886b6 in XQueryExtension (dpy=0x804a008, name=0xb7e59188 "RANDR", major_opcode=0xbfbfb2c0, first_event=0xbfbfb2c4, first_error=0xbfbfb2c8)
at QuExt.c:46
#7 0xb7e7d49b in XInitExtension (dpy=0x804a008, name=0xb7e59188 "RANDR") at InitExt.c:49
#8 0xb7cf8073 in XextAddDisplay (extinfo=0xb7e591d0, dpy=0x804a008, ext_name=0xb7e59188 "RANDR", hooks=0xb7e591a0, nevents=1, data=0x0) at extutil.c:108
#9 0xb7e57f3a in XRRFindDisplay (dpy=0x804a008) at Xrandr.c:139
#10 0xb7e58a87 in _XRRValidateCache (dpy=0x0, screen=6) at Xrandr.c:242
#11 0xb7e58bf7 in XRRSizes (dpy=0x804a008, screen=0, nsizes=0xbfbfb39c) at Xrandr.c:284
#12 0x080484ae in main ()
(
- elias