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

From: Eli Zaretskii <[email-masked]>
Date: Wed, 24 May 2023 14:01:56 +0300

> From: Po Lu <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 24 May 2023 11:13:04 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Which is why I asked whether x-delete-terminal etc. could call a
> > function that is different from what we call when we exit.
> 
> Why is what Emacs does upon exiting relevant here?
> The problem occurs when a display connection is closed while Emacs
> wants to stay running.  Cairo keeps a pointer to the xcb connection,
> and if by some chance a pointer with the same value is returned the
> next time a display connection is opened, it loses.

Maybe I'm jumping to conclusions, sorry.

So let's back up a notch.  There was a suggestion to avoid the call to
XCloseDisplay when the last frame on display is deleted, like we do
for some other toolkits already.  Would that avoid the crashes due to
this issue?  If yes, why did you reject the suggestion?