[cairo] Cairo 1.4.8 and X11 creates X11 erros
rael at edge.ping.de
Sat Jun 23 05:32:47 PDT 2007
I have a fairly big library using cairo. The combination of my GUI
library, X11, gtk and cairo worked very well until cairo 1.4.6 (Debian
However with cairo 1.4.8 I get X11 crashes.
I can switch between 1.4.6 and 1.4.8 packages (not changing any other
packages) and the bug disappears and reappears with the version change.
The bug is strange since every thing works well up to a certain point
where even an XQueryColor or XSync seems to lead to a crash (gdk hook
itself into X111 error handling):
Gdk-ERROR **: The program '<unknown>' received an X Window System error.
This probably reflects a bug in the program.
The error was 'RenderBadPicture (invalid Picture parameter)'.
(Details: serial 3588 error_code 182 request_code 157 minor_code 7)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error()
#0 0xb76f76d9 in g_logv () from /usr/lib/libglib-2.0.so.0
#1 0xb76f7939 in g_log () from /usr/lib/libglib-2.0.so.0
#2 0xb7a4d824 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#3 0xb7a64c8b in ?? () from /usr/lib/libgdk-x11-2.0.so.0
#4 0x00000004 in ?? ()
#5 0xb77fa173 in _XError () from /usr/lib/libX11.so.6
#6 0xb780176a in ?? () from /usr/lib/libX11.so.6
#7 0x080d9b50 in ?? ()
#8 0x082bf9d0 in ?? ()
#9 0xbff90af8 in ?? ()
#10 0xbff90af4 in ?? ()
#11 0x080da090 in ?? ()
#12 0xb71548b8 in ?? () from /usr/lib/libxcb-xlib.so.0
#13 0xbff90ae8 in ?? ()
#14 0xb71536c0 in xcb_xlib_lock () from /usr/lib/libxcb-xlib.so.0
#15 0xb7801b3c in _XReply () from /usr/lib/libX11.so.6
#16 0xb77ef905 in XQueryColor () from /usr/lib/libX11.so.6
The problems seems to appear after closing sub windows of my
application, resulting a freeing and allocation of X11, and cairo resources.
I was totally unaware that one can get an X11 connection in such a bad
I know that the change might bee anywhere else in my code, however since
the bug seems to be triggere dby cairoversion it may in fact be caused
by cairo. (btw.: I'm also getting the same problem with cairo 1.4.8
under my Nokia 800 development environment)
Looking at the differences between 1.4.6 and 1.4.8 X11 related code, I
see an number of changes that seem to be related to work queuing and
(de)initialisation (however the code changes are too big, to make a
simple manuall code comparison). Is it possible that cairo in fact is
the cause of the problem? Is this problem known? If there is a possible
cause in cairo, how can I proof it or even work around it?
More information about the cairo