Subject: Re: bug#63589: 29.0.91; crash after creating graphical frames via emacsclient when compiled with cairo-xcb

From: Thiago Melo <[email-masked]>
Date: Mon, 29 May 2023 16:10:54 +0000

On Mon, May 29, 2023 at 3:38 PM andrés ramírez <[email-masked]> wrote:
> --8<---------------cut here---------------start------------->8---
> Press C-c to exit.
> Iteration: 2/100000X Error of failed request:  143
>   Major opcode of failed request:  139 ()
>   Minor opcode of failed request:  10
>   Serial number of failed request:  13
>   Current serial number in output stream:  23
> --8<---------------cut here---------------end--------------->8---

Now, if you uncomment this line of the code:

//#define USE_CAIRO_DEVICE

Then compile and run it again, you shouldn't get the error anymore. It
enables the cairo device destruction and proper invalidation of the
cairo xcb connection cache at the end, as per what I explained in
previous messages.

The bottom line is, if you're getting these errors in this toy
example, this bug might bite you on Emacs with Cairo XCB at some
point. When, who knows, we're on undefined behavior land here.