From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#60096: 29.0.60; Crash in format_mode_line_unwind_data Date: Sun, 18 Dec 2022 10:18:18 +0100 Message-ID: References: <86a63oen2m.fsf@mail.linkov.net> <83sfhgjqd7.fsf@gnu.org> <86cz8jls87.fsf@mail.linkov.net> <83k02rk1vk.fsf@gnu.org> <83ilibjttu.fsf@gnu.org> <83fsdfjsq9.fsf@gnu.org> <325aaa94-74fa-cf94-b66c-b87c69ebe386@gmx.at> <838rj6ic34.fsf@gnu.org> <83pmciggwn.fsf@gnu.org> <89b63947-5b2d-8bd1-4e9a-7da6cf114ffe@gmx.at> <83edsxhq9f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6779"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60096@debbugs.gnu.org, juri@linkov.net To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 18 10:19:16 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 1p6ppE-0001cM-JO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 18 Dec 2022 10:19:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6pp2-0006un-4P; Sun, 18 Dec 2022 04:19:04 -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 1p6pp0-0006uc-F1 for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 04:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6pp0-0002h0-7O for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 04:19:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6poz-0006DH-Ll for bug-gnu-emacs@gnu.org; Sun, 18 Dec 2022 04:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2022 09:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60096 X-GNU-PR-Package: emacs Original-Received: via spool by 60096-submit@debbugs.gnu.org id=B60096.167135511223870 (code B ref 60096); Sun, 18 Dec 2022 09:19:01 +0000 Original-Received: (at 60096) by debbugs.gnu.org; 18 Dec 2022 09:18:32 +0000 Original-Received: from localhost ([127.0.0.1]:32838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6poW-0006Cw-G0 for submit@debbugs.gnu.org; Sun, 18 Dec 2022 04:18:32 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:51687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6poU-0006Cq-Q6 for 60096@debbugs.gnu.org; Sun, 18 Dec 2022 04:18:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.at; s=s31663417; t=1671355102; bh=SKM9NFTqCFp5j6R4SDjlF2oFo25cIgNimMN9QpsjiTM=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=O3HXrR5s0Ez3tu4leK9ZlMNnaRWt6Aw3CTIIK8ropod6bzY8579XbwVxRr6auEJYr py9kT9fJGBScuQlT1zqfHO7kusahDS2abA7oDfYvs9p66I/QMK0LSPhDa5iwyGYLb+ RneeopwikG/Z25TBJGuysQ5qoebF/L9ExT5CskbBYqvT1Bvr94RMf41f4E2byLTn/m lI665jn3uoBZDBZUvkDtaZ+cYEmqwag3Y2Y6ylSzCqd+IjADUIc08Bbr+3Aq2ll6V/ DP4vybOZFiZuikYYeDq0M6YjfSAoItTIYLRXcUHkJQBB1Z3JYtQiU2B3GdNyHXQlsi jEONxpn5sDwaw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [192.168.1.100] ([212.95.5.117]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N6bjy-1opabo0ORK-017z7d; Sun, 18 Dec 2022 10:18:22 +0100 Content-Language: en-US In-Reply-To: <83edsxhq9f.fsf@gnu.org> X-Provags-ID: V03:K1:f6IJY5JAfVezQnfgOtQ1xfnDxXRGWpO3ugs6PrFbyGXZCK56drA sXuuxs8z2nq46RQctGP1JucUDZxc3e/n3DflFPfNGIoRoUnDaAYIeQJacwvJlBTqmhjWQbL 5cxE2sL+4m4KUuTldTVspaTXUnB9maOafye2khyVvW0mIpvptM0k1G8EyKbw2JXJMs3Q13r fbwT3Bzds5xDMmoYfmnvQ== UI-OutboundReport: notjunk:1;M01:P0:jifIwql0Pok=;HWsnPdrV1D5o7HTLxQ82XUCddp4 jRFLRh73JauF1gqzrLd6wGKwWXTXlOMyrGgSJHOb7uoXIkrtyyawZcs/Jg/Qj+LkfHyTi5l1g cGboyQWXCc4RLAF+iXzUls+QfpAJCkzWXl9rnM7MVS0/a8wPqb3NdeCbOtEFDkXfFsX43mWgc wsjUv24zQSExBP1AGcUbMK6jom7txm0eQ8qIp/K5dQd0HY0SXR191tray/2AhBXZWpLQnIYeK 4tvNtaPS1ckHPh1bFO6/ie8XDjDbEaAfZMZF4e42hSpwIC0fXFOamzg/WdekRPlts6E4sZdql XUR3mk9Yus71XKy7yN+327JtYf39vHenqz+bmV9KztrwHo/4MXSnj7Thw9jG+HX7fCtrKUPaR LaJUrEzof0C7XiL3H/XVTqkf+s82eKnuqgEGqivXVstQREvoaebDrWFgVr9hhBb76MlynAPPl E8bm2ymwR1hclEg+Dmico/7bs4DY8tK9bEOKlzzDwpgQRoXVfSbXgNOY8AdvRYQ9oxOQ+XEri jVoe6CliKol2wZN8usxCwChiRu3L/PsAnLjKLNkSWnfaw4l0TuipNJn2u/X4ojd56fXUxPc2v d3YiI6KfLNDat+PZOCYrhR7Cp1KRKcLezjSKXDrf15TS6pr5E1UZwJi1rkYqTBAlOcppjgN1t X4Cw3ZLZJ4jUE2gs3CvGyd5MJMmaTG7JfGpQR3iWfIwnA1ewIRfNMswNXExIEnANEpba2COP6 rQjNVZhNlNpMzep7w7yOivfWElSbzwriGdy4aR1xEMKoEFl55GESe/TSVCllLE16vIfB53h4 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:251344 Archived-At: >> >> Alternatively, we could exclude windows with a nil buffer in >> >> add_window_to_list (think of the case that within the blurb >> >> producing code someone wants to consult the window list). >> > >> > Maybe we should try this on master. I indeed expected >> > add_window_to_list to filter such invalid windows and was surprised >> > that it didn't. Basically, I don't understand how we never had such >> > windows in the list before, since there's no code which actively >> > removes them and thus protects the list from holding such windows. I >> > think we just have been lucky. >> >> Probably so far we never tried to call 'kill-buffer' from within >> 'set-window-configuration'. If the only "live" window shows *scratch*, >> *scratch* gets killed and we kill a temporary buffer before we were able >> to recreate *scratch*, window_list will return the empty list. > > Why the empty list? The buffer gets killed, but windows don't get > killed. We still have the frame with at least two windows (including > the mini-window). Right? Not if we exclude windows with a nil buffer as suggested above. The delete_all_child_windows call in 'set-window-configuration' sets the contents field of every live window on that frame to nil and as long as we have not been able to get a live buffer for that window, it will stay nil. That's where all those windows with a nil buffer in your investigations come from. It's simply not safe to deal with windows before 'set-window-configuration' has done its work completely. If we think of running Lisp in this time, we have to do it in a completely restricted way: Any window, including the selected one, can legitimately have a nil buffer then. martin