Subject: Re: bug#56792: 29.0.50; Emacs crashes when selecting text if xfreerdp is also running

From: Po Lu <[email-masked]>
Date: Thu, 28 Jul 2022 18:14:52 +0800

Lars Ingebrigtsen <[email-masked]> writes:

> Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
> editors" <[email-masked]> writes:
>
>> The PGTK build does not support X11, so you should build without PGTK
>> enabled.  This crash is known to happen there, and will not be fixed,
>> since adding 300-400 lines of X specific selection code to the PGTK port
>> seems very irrational for a platform that it is not intended to support.
>
> Emacs shouldn't segfault, though.  It's fine to signal an error in this
> situation, but segfaulting is not.

The segfault (which is really not a segfault, just GDK displaying a
window system error and aborting in an unusual manner) is hard to avoid
without adding X specific error handling code
(gdk_x11_display_error_trap_push).  Which will then add a dependency on
the X11-specific parts of GDK, and won't work if Emacs did not see them
at build-time.