all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 56967@debbugs.gnu.org, "Bennet Yee (余仕斌)" <bennet.yee@gmail.com>
Subject: bug#56967: 29.0.50; Frequent crashes under Wayland
Date: Fri, 05 Aug 2022 15:34:38 +0800	[thread overview]
Message-ID: <87v8r76t4h.fsf@yahoo.com> (raw)
In-Reply-To: <83y1w3277l.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Aug 2022 21:29:18 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Bennet Yee (余仕斌) <bennet.yee@gmail.com>
>> Date: Thu, 4 Aug 2022 11:12:44 -0700
>> 
>> FWIW I appeared to have just ran into this.  With emacs-gtk whenever I set mark and move down a line
>> (which would highlight the region) emacs would crash:
>> 
>> Backtrace:
>> emacs(+0x150ed5)[0x55cb9e339ed5]
>> emacs(+0x4aa38)[0x55cb9e233a38]
>> emacs(+0x4af22)[0x55cb9e233f22]
>> emacs(+0x14eefd)[0x55cb9e337efd]
>> emacs(+0x14ef7d)[0x55cb9e337f7d]
>> /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f068ca42520]
>> /lib/x86_64-linux-gnu/libX11.so.6(XVisualIDFromVisual+0x4)[0x7f068e1f5f24]
>> /lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_x11_window_foreign_new_for_display+0x18e)[0x7f068e979a2e]
>> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6b9f8)[0x7f068e9649f8]
>> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6d191)[0x7f068e966191]
>> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x70d28)[0x7f068e969d28]
>> /lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_display_get_event+0x89)[0x7f068e92fa99]
>> /lib/x86_64-linux-gnu/libgdk-3.so.0(+0x70f46)[0x7f068e969f46]
>> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x26b)[0x7f068e37ed1b]
>> /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xaa6f8)[0x7f068e3d36f8]
>> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33)[0x7f068e37c3c3]
>> /lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_iteration+0x19)[0x7f068ec48d99]
>> emacs(+0x105073)[0x55cb9e2ee073]
>> emacs(+0x13d482)[0x55cb9e326482]
>> emacs(+0x13da75)[0x55cb9e326a75]
>> emacs(+0x1ba1b5)[0x55cb9e3a31b5]
>> emacs(+0xb55ec)[0x55cb9e29e5ec]
>> emacs(+0x7bac4)[0x55cb9e264ac4]
>> emacs(+0x8b9e8)[0x55cb9e2749e8]
>> emacs(+0x90783)[0x55cb9e279783]
>> emacs(+0xa5611)[0x55cb9e28e611]
>> emacs(+0xa8096)[0x55cb9e291096]
>> emacs(+0x1b30dc)[0x55cb9e39c0dc]
>> emacs(+0x94363)[0x55cb9e27d363]
>> emacs(+0x140ef3)[0x55cb9e329ef3]
>> emacs(+0x143bea)[0x55cb9e32cbea]
>> emacs(+0x14538c)[0x55cb9e32e38c]
>> emacs(+0x1b3047)[0x55cb9e39c047]
>> emacs(+0x136190)[0x55cb9e31f190]
>> emacs(+0x1b2f89)[0x55cb9e39bf89]
>> emacs(+0x13611e)[0x55cb9e31f11e]
>> emacs(+0x13b72a)[0x55cb9e32472a]
>> emacs(+0x13ba69)[0x55cb9e324a69]
>> emacs(+0x52aca)[0x55cb9e23baca]
>> /lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7f068ca29d90]
>> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7f068ca29e40]
>> ...

Bennet Lee, do you have a clipboard manager installed on your system?
I'm going to guess changing the region caused ownership to be asserted
over the primary selection, in turn causing the clipboard manager to
send Emacs a selection request from an InputOnly window.  GDK then tried
to create a wrapper around that window, but crashed because the visual
of the InputOnly window could not be found in its own client-side record
of GDK visual objects.

This chain of events should only be possible on PGTK builds running on
X.  In that case, you should simply refrain from using PGTK on X.  This
problem and many others cause us to not support running such builds on
X.

If not, please see if the following change is sufficient to fix the
problem:

diff --git a/src/xterm.c b/src/xterm.c
index 4bbcfb0e59..5bc755b41f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -17613,6 +17613,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 	    if (eventp->target == dpyinfo->Xatom_XmTRANSFER_FAILURE)
 	      x_dnd_action = None;
 	  }
+
+	/* Selection requests for the widget should never reach
+	   GDK.  */
+#ifdef USE_GTK
+	*finish = X_EVENT_DROP;
+#endif
       }
       break;
 





  reply	other threads:[~2022-08-05  7:34 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAH3b6=SPM_Pys81fi-_Eu=VXO8mETqV+s0YFC+8c1huv4dmh9Q@mail.gmail.com>
2022-08-04 18:29 ` bug#56967: 29.0.50; Frequent crashes under Wayland Eli Zaretskii
2022-08-05  7:34   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-08-04  7:36 Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-04  8:01 ` Eli Zaretskii
     [not found]   ` <3230275.qDoO4GC8Cx@odin>
2022-08-04  8:21     ` Eli Zaretskii
2022-08-04 11:49       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  0:18         ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  0:50           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  6:25             ` Eli Zaretskii
2022-08-05  6:28               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  6:43                 ` Eli Zaretskii
2022-08-05  6:53                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  7:46                     ` Eli Zaretskii
2022-08-05  8:26                       ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  8:38                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  6:56                 ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  6:59                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05 11:40               ` Gregory Heytings
2022-08-05 11:50                 ` Eli Zaretskii
     [not found]             ` <2972937.jrzt3BHeHG@odin>
2022-08-05  6:29               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-07 14:51                 ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-07 15:07                   ` Eli Zaretskii
2022-08-07 15:14                     ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-07 15:44                       ` Eli Zaretskii
2022-08-08  2:42                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-08  2:40                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-08  6:07                     ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-08  8:56                     ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-08 10:10                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 12:10                       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 12:10                       ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 13:11                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-13 17:06                           ` Björn Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  6:31             ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]             ` <2189728.upBv5HjrgE@odin>
2022-08-05  6:31               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
     [not found]             ` <1917872.q2Y8mqo1ke@odin>
2022-08-05  6:35               ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  6:55                 ` Bjoern Bidar via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-05  7:01                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-17 16:02 ` Gavin Massingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v8r76t4h.fsf@yahoo.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=56967@debbugs.gnu.org \
    --cc=bennet.yee@gmail.com \
    --cc=eliz@gnu.org \
    --cc=luangruo@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.