Subject: bug#57364: 28.1.91; asynchronous X server error when creating a second frame on alternate DISPLAY

From: Po Lu <[email-masked]>
Date: Fri, 26 Aug 2022 11:08:58 +0800

andrés ramírez <[email-masked]> writes:

> gdb -i=mi --args ./emacs -Q -f toggle-debug-on-error --eval '(setq x-command-line-resources emacs.synchronous: true)' --fg-daemon

Ah, that explains it.  x-command-line-resources doesn't take effect if
you run with "-Q", try "-q" instead.

> And also take in account, that the error is not reproducible in this
> condition. 

I think I've seen this somewhere.  Does the error still happen if you
build "--without-cairo"?

> I have had a question on my mind?
> Inspecting the last backtrace I have published on this bug report.
>
> I see the error is recovered in a call on the function x_frame_highlight
> (within the call to x_catch_error). Why If
> I am calling close-display-connection. Some functions need to be
> called?

Functions can be called on the display being closed while handling async
input from that display, or when performing cleanup tasks.  Unless, of
course, the display is down, but that is rarely the case when you
manually call close-display-connection/delete-terminal.