From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [scratch/igc] 985247b6bee crash on Linux, KDE, Wayland Date: Thu, 05 Sep 2024 22:31:04 +0300 Message-ID: <865xr93nk7.fsf@gnu.org> References: <8734mezkgo.fsf@gmail.com> <8634me447j.fsf@gnu.org> <861q1y437s.fsf@gnu.org> <86wmjq2mr2.fsf@gnu.org> <875xrars34.fsf@protonmail.com> <87h6aunilt.fsf@gmail.com> <87zfomqbgk.fsf@protonmail.com> <875xrani8k.fsf@gmail.com> <86bk122azc.fsf@gnu.org> <87v7zagcal.fsf@gmail.com> <867cbp3nw7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10918"; mail-complaints-to="usenet@ciao.gmane.io" Cc: execvy@gmail.com, pipcet@protonmail.com, emacs-devel@gnu.org To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 05 21:31:46 2024 Return-path: Envelope-to: ged-emacs-devel@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 1smICo-0002hR-7q for ged-emacs-devel@m.gmane-mx.org; Thu, 05 Sep 2024 21:31:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smICG-00049Z-Bn; Thu, 05 Sep 2024 15:31:12 -0400 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 1smICF-00049O-8A for emacs-devel@gnu.org; Thu, 05 Sep 2024 15:31:11 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smICE-0002KS-BX; Thu, 05 Sep 2024 15:31:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Sd+mYRPBI8zmMtkcfeMlGr8ZBCHCMmssI+QaCMxenF8=; b=e5S6n+lESH3skBfzfzNB el2wMrmTzIIsQ8rnT/phv3ZWONlGMMoWK1nMjyUG486mmTVAfP/UawRwSdCnx5YYzmhWpQpLsLbDa ZvXJf+LESYdJVKzBgfJpOiAmPDLOzL3cgewixpKb6nTQ5Btluhu68xEukUUsixK4+GH0oT2qMF+n3 qJQNn7NHcP4LUDaeIT2ydOH1nc3pQwhk8fxkphReqJa+PjaR+zBewV/KerOkXEpZZKVEtF1uSKjRu IMJGN15WobPwe93mzVtlQmhBXFnSSu8wbUNTCoH84sjq1kequ7wHadkiGM3I28XDjhtnAFw1L0pLI MIq58Np9YtP67A==; In-Reply-To: <867cbp3nw7.fsf@gnu.org> (message from Eli Zaretskii on Thu, 05 Sep 2024 22:23:52 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323433 Archived-At: > Date: Thu, 05 Sep 2024 22:23:52 +0300 > From: Eli Zaretskii > Cc: pipcet@protonmail.com, gerd.moellmann@gmail.com, > emacs-devel@gnu.org > > > It's: > > (gdb) p f->terminal > > $3 = (struct terminal *) 0x0 > > Thanks, so FRAME_LIVE_P should solve the problem. I therefore changed > the test to use FRAME_LIVE_P. Come to think about it: why we need to do anything with dead (i.e. deleted) frames in fix_frame? shouldn't we simply return without doing anything? The face cache in such a frame is NULL, and likewise the image cache. As for FRAME_FONT and FRAME_DISPLAY_INFO (f)->name_list_element, we already avoid doing anything with them, because we'd segfault otherwise. So I think just returning for frames that fail the FRAME_LIVE_P test will be cleaner, and will also remove the need for several more tests in this function, which basically are all about deleted frames already. Am I missing something?