[compiz] gtk-window-decorator segfault
davidr at novell.com
Wed Feb 14 04:18:30 PST 2007
On Wed, 2007-02-14 at 08:30 +0100, Bellegarde Cedric wrote:
> On Tuesday 13 February 2007 19:32:20 you wrote:
> > Does it segfault or does it exit due to an XError? If it actually
> > segfaults then the backtrace is useful without making all X requests
> > synchronous. If it's an XError, then the information about the error
> > that gtk spits out is still very useful (like request code that caused
> > the error and so on).
> > - David
> gnumdk at flanders:~$ LANG=C gtk-window-decorator
> The program 'gtk-window-decorator' received an X Window System error.
> This probably reflects a bug in the program.
> The error was 'BadWindow (invalid Window parameter)'.
> (Details: serial 113716 error_code 3 request_code 18 minor_code 0)
> (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() function.)
> gtk-window-decorator: xcb_xlib.c:41: xcb_xlib_lock: Assertion `!c->xlib.lock'
If you look up request_code 18 in Xproto.h, you'll find:
#define X_ChangeProperty 18
which means that a ChangeProperty request caused this error to be
generated. ChangeProperty request are allowed to fail in gwd as a window
can always be destroyed without gwd finding out about it but later. So
all calls to XChangeProperty (except maybe those that change root window
properties) should be surrounded by calls to gdk_error_trap_push () and
gdk_error_trap_pop (). A call to XSync or gdk_display_sync should be
made before gdk_error_trap_pop unless the xlib call blocks for a reply.
I had a quick look at the gwd code and found a few cases where
gdk_display_sync was not called properly and that's now fixed. Let me
know if you still get this error.
More information about the compiz