From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#56967: 29.0.50; Frequent crashes under Wayland Date: Fri, 05 Aug 2022 15:34:38 +0800 Message-ID: <87v8r76t4h.fsf@yahoo.com> References: <83y1w3277l.fsf@gnu.org> Reply-To: Po Lu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10865"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: 56967@debbugs.gnu.org, "Bennet Yee \(=?UTF-8?Q?=E4=BD=99=E4=BB=95=E6=96=8C\?=)" To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 05 09:43:54 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oJrzs-0002ct-Gs for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 09:43:52 +0200 Original-Received: from localhost ([::1]:43624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJrzr-0007S2-0b for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Aug 2022 03:43:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57668) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJrrK-0002Gl-49 for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 03:35:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38023) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJrrJ-0006Zd-Qz for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 03:35:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJrrJ-0004YY-Mc for bug-gnu-emacs@gnu.org; Fri, 05 Aug 2022 03:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Po Lu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Aug 2022 07:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56967 X-GNU-PR-Package: emacs Original-Received: via spool by 56967-submit@debbugs.gnu.org id=B56967.165968490017503 (code B ref 56967); Fri, 05 Aug 2022 07:35:01 +0000 Original-Received: (at 56967) by debbugs.gnu.org; 5 Aug 2022 07:35:00 +0000 Original-Received: from localhost ([127.0.0.1]:56005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJrrH-0004YF-Ol for submit@debbugs.gnu.org; Fri, 05 Aug 2022 03:35:00 -0400 Original-Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:46437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJrrF-0004Y1-0E for 56967@debbugs.gnu.org; Fri, 05 Aug 2022 03:34:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1659684889; bh=JQhWFJcIk/Vuqa4ssSoOx52nlVmmcdr52iVeW1IT3I0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=fZi5eICBY67zUq8tY5LsjjQ+4jpFgq/qcWwUNF0BO6xvF3UDZiKGDkAHb7fL9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2ibmjzpCCuX0uw A0ElyLbi_BbGANCwOLEs4XZEOQ.wc1kfihxbgZaY_aNUSq1d.ygXWIy.fC_uDJMOiQHQhr9B_Ke. Xuz9mgw0E.rYwH854fr0BZsKIFUFH9wXra.D6yta89CuZAzoA9Mi4wDrNTV5A2OUg7rqpGy.K0Yn 0UVnSiqBusviQQC6MHcTy00CmjK.ZnzX2kKpQF8.Ksg3jJKgfZgU2I91FZYGVdIC5YfokyIa_abV 8f0rH00kI0S02_UzrLD84QHYuIbegz0kg38xKirOrybh3bnguvAZqepy5tM.LmEC.4LZ6t0wxWdJ _ofSMiuWHy.G8TWpGml6J4F1rNe7khPth8DpX65XOwnYjTi2hBXzu3SHjp3SnGl_hPLw_kyEXWW8 UfiCtwJ2ypvhczayqKdW_BC69Xuq2aG5UnoJulywNXbZlPVcoZ1kSisq0ivtVaLwCbFyfWvQ8CJK q2Oaq1RrCQc47ze9wh60AEFacoC4TuiZGDGugjdl18xAWoj1JeMmbgHXOYkhh2U_nGZPJnXu8kRJ DhlhaZsJ8QIoIMznPR4t_1UpwNz1ZuunF9kCDjOrww X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Fri, 5 Aug 2022 07:34:49 +0000 Original-Received: by hermes--canary-production-sg3-6f58cd9b5-q5dg5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 22a3ec0b97880bca396401ffb623e1a3; Fri, 05 Aug 2022 07:34:43 +0000 (UTC) In-Reply-To: <83y1w3277l.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 04 Aug 2022 21:29:18 +0300") X-Mailer: WebService/1.1.20491 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238833 Archived-At: Eli Zaretskii writes: >> From: Bennet Yee (=E4=BD=99=E4=BB=95=E6=96=8C) >> Date: Thu, 4 Aug 2022 11:12:44 -0700 >>=20 >> FWIW I appeared to have just ran into this. With emacs-gtk whenever I s= et mark and move down a line >> (which would highlight the region) emacs would crash: >>=20 >> 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)[0x7f068e1f5f2= 4] >> /lib/x86_64-linux-gnu/libgdk-3.so.0(gdk_x11_window_foreign_new_for_displ= ay+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)[0x7f068e= 92fa99] >> /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)[0x= 7f068e37ed1b] >> /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)[0x= 7f068e37c3c3] >> /lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_main_iteration+0x19)[0x7f068ec48= d99] >> 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 =3D=3D dpyinfo->Xatom_XmTRANSFER_FAILURE) x_dnd_action =3D None; } + + /* Selection requests for the widget should never reach + GDK. */ +#ifdef USE_GTK + *finish =3D X_EVENT_DROP; +#endif } break; =20