Skip to content

compositor: Wrap XDamageCreate call with error trap

I hit this rare error running the "x11" test from the suite locally:

(mutter:194027): Gdk-ERROR **: 18:21:52.525: The program 'mutter' received an X Window System error. This probably reflects a bug in the program. The error was 'BadDrawable (invalid Pixmap or Window parameter)'. (Details: serial 663 error_code 9 request_code 143 (DAMAGE) minor_code 1) (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 GDK_SYNCHRONIZE environment variable to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)

The only call from the Damage extension in use by Mutter that could return BadDrawable is XDamageCreate(), and it's likely to be this call. Wrap this X11 in an error trap, in order to catch possible failures.

Merge request reports