From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Steven Allen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74902: 31.0.50; Segfault when deleting frames Date: Tue, 31 Dec 2024 08:31:04 -0800 Message-ID: <877c7fg6gn.fsf@stebalien.com> References: <87frmoy5aq.fsf@stebalien.com> <861py7r5jq.fsf@gnu.org> <87v7vjk3nl.fsf@stebalien.com> <87frmn5yu5.fsf@gmail.com> <865xn4t4z6.fsf@gnu.org> <87v7v3bden.fsf@stebalien.com> <86ldvzq8xa.fsf@gnu.org> Reply-To: Steven Allen Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37410"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rpluim@gmail.com, 74902@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 31 17:32:27 2024 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 1tSfAP-0009aN-LX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Dec 2024 17:32:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSfAA-0006ll-1P; Tue, 31 Dec 2024 11:32:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSfA2-0006lG-Sa for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 11:32:05 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSfA2-00028h-DF for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 11:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Jkc0CJYZcsgvlk67d+42QfR3ligIFavfPAcrvjwHS30=; b=dHfSVI7+izQeKTCwBWAi8rJY8i0uU6bdFzqhxtqd/FWmb9jaeZUw6N0fOuQZLngQ3i9CxK92013s3P89kaaKGH1KoVTAiLFRI4jEBaT2K2D4s7MxpDs0n/Ag5SvlYzIsPf46qn6b8P7ex5UnBiV5ICkhSXfEtdMpoX1pI0QtAosg3Da41BT2tauIWzCcXMEwdWFMRA2PhHvAJR0ftBUHfxbYB791uCS300er9WAo13VK1ZfDhCHeaB01UZNohWZmssy4kEiS3Z0MJyTJBB36TUvg+JwWDUF2RvZIB8Zc6sTrE/vhrUBslaue0FsrCKdWkyCYVA+I8zGtBDuzy3lmGQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tSfA2-0004Fq-0L for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 11:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Steven Allen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Dec 2024 16:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74902 X-GNU-PR-Package: emacs Original-Received: via spool by 74902-submit@debbugs.gnu.org id=B74902.173566267516277 (code B ref 74902); Tue, 31 Dec 2024 16:32:01 +0000 Original-Received: (at 74902) by debbugs.gnu.org; 31 Dec 2024 16:31:15 +0000 Original-Received: from localhost ([127.0.0.1]:36598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSf9H-0004ET-6Y for submit@debbugs.gnu.org; Tue, 31 Dec 2024 11:31:15 -0500 Original-Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]:42607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSf9E-0004EE-38 for 74902@debbugs.gnu.org; Tue, 31 Dec 2024 11:31:13 -0500 Original-Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id EB29E138020B; Tue, 31 Dec 2024 11:31:06 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 31 Dec 2024 11:31:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stebalien.com; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1735662666; x= 1735749066; bh=Jkc0CJYZcsgvlk67d+42QfR3ligIFavfPAcrvjwHS30=; b=P Lo1l/KiqHTuFK1OsC9EkwYYSD31mgDxf6OUzyrUQevVMA6sMW4n+aQnbeLrOwdHs aixnOayjwkmHtDr8ZttX6XyvIGCHTD6DZ1DOpPUF/kl2WpDKDbnYUseUxs3W3B3f WV8UeiNwY9h9A5jurTRTibDJ6HS0/F/h2m8f6zshTAlqOvCmtecvWQipFm0geG1B T3xfNDm05EbCMDudmX/BhSbrCnscloCGsYi4a2j/3df6RGb24gPc/IV1+walYY3l gZsIOQ+CgV1BNbkubiBWIsKl2cVUzHwje3PL/x1nAjKuOvxo942Z1dHxYRRgWYvp A5TCa5Ivm6eEGEMb4D92w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1735662666; x=1735749066; bh=Jkc0CJYZcsgvlk67d+42QfR3ligIFavfPAc rvjwHS30=; b=lGCIvBttgdk8X4emDAvEk1kK2ZBrBHMyujDR6rtckyrU9LNV4BC 8zCj1v8np0SWfwW8gIsO0vRJYuIK2CjMY2ehq6AElAiSFrY3FhBbOP3nxREXUsJc Wpsz9bp0otYvw6Z+cR6egJ4MrXhcklEtS5PBwy6X9Gvi3sWdeD1jDbmS3Z/FpHME 1vXDhOD/8rF6YOcFxHE1orXO23et/cLpReawDsutFdyxTl+j0/J6kxeKuZhbEMvu inZIws5cZAc5CZDmLSpa9EbwhkdmZAM9UMfxcTX2cWiND0e9v5S5qrL3aAaWK/pE otSbJcZ4VirGK70hFz2/THCOkW2rxeJABfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvkedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffffkgggtsehmtderredttddtnecu hfhrohhmpefuthgvvhgvnhcutehllhgvnhcuoehsthgvvhgvnhesshhtvggsrghlihgvnh drtghomheqnecuggftrfgrthhtvghrnhepieetvdfhffeuhfdtuedtgeefgeeiieetveev gfeufeeivedvheefjefffffgveejnecuffhomhgrihhnpehgnhhurdhorhhgnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhtvghvvghnsehs thgvsggrlhhivghnrdgtohhmpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopehrphhluhhi mhesghhmrghilhdrtghomhdprhgtphhtthhopeejgeeltddvseguvggssghughhsrdhgnh hurdhorhhg X-ME-Proxy: Feedback-ID: ie8a146a7:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Dec 2024 11:31:06 -0500 (EST) In-Reply-To: <86ldvzq8xa.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298047 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Thanks. I guess we also need a FRAME_LIVE_P test in > gui_consider_frame_title? I've attached a patch for that but note that it doesn't actually help in this situation because the frame isn't deleted until: https://git.savannah.gnu.org/cgit/emacs.git/tree/src/frame.c?h=2f1052d9b0de551dc3a463ed54e21c63517497ab#n2536 Whereas the crash happens here, 36 lines above: https://git.savannah.gnu.org/cgit/emacs.git/tree/src/frame.c?h=2f1052d9b0de551dc3a463ed54e21c63517497ab#n2500 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Avoid-operating-on-dead-frames-when-updating-titles.patch >From 4f4907bf1657b5128dc045161272c360029c6f6a Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 31 Dec 2024 07:48:47 -0800 Subject: [PATCH] Avoid operating on dead frames when updating titles * src/xdisp.c (gui_consider_frame_title): Skip over dead/dying frames when updating frame title. (Bug#74902) --- src/xdisp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index ceb727d1135..d2ba8b10c80 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13858,9 +13858,10 @@ gui_consider_frame_title (Lisp_Object frame) struct frame *f = XFRAME (frame); Lisp_Object format_data; - if ((FRAME_WINDOW_P (f) - || FRAME_MINIBUF_ONLY_P (f) - || f->explicit_name) + if (FRAME_LIVE_P (f) + && (FRAME_WINDOW_P (f) + || FRAME_MINIBUF_ONLY_P (f) + || f->explicit_name) && !FRAME_TOOLTIP_P (f)) { /* Do we have more than one visible frame on this X display? */ @@ -13875,6 +13876,9 @@ gui_consider_frame_title (Lisp_Object frame) { struct frame *tf = XFRAME (other_frame); + if (!FRAME_LIVE_P (tf)) + continue; + if (tf != f && FRAME_KBOARD (tf) == FRAME_KBOARD (f) && !FRAME_MINIBUF_ONLY_P (tf) -- 2.47.1 --=-=-=--