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.bugs Subject: bug#60096: 29.0.60; Crash in format_mode_line_unwind_data Date: Sat, 17 Dec 2022 12:00:47 +0200 Message-ID: <838rj6ic34.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22836"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60096@debbugs.gnu.org, juri@linkov.net To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 17 11:01:17 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 1p6U0J-0005l6-QQ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Dec 2022 11:01:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6U08-0007kr-SQ; Sat, 17 Dec 2022 05:01: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 1p6U07-0007iq-6y for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 05:01:03 -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 1p6U06-00079Z-M8 for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 05:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6U06-0005rc-3e for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 05:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 10:01:02 +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.167127125922527 (code B ref 60096); Sat, 17 Dec 2022 10:01:02 +0000 Original-Received: (at 60096) by debbugs.gnu.org; 17 Dec 2022 10:00:59 +0000 Original-Received: from localhost ([127.0.0.1]:54955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6U03-0005rH-6N for submit@debbugs.gnu.org; Sat, 17 Dec 2022 05:00:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Tzz-0005r9-Iv for 60096@debbugs.gnu.org; Sat, 17 Dec 2022 05:00:57 -0500 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 1p6Tzu-00077z-4B; Sat, 17 Dec 2022 05:00:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Vcym+KB32fzazwrXGx5bbS02TqKZUjrt6jKke1yqwcU=; b=E0k2yD5gMKSx b89qJrNWPCA+B1wzWv22UxHjatnbgiKmgUDwUr9i6t5yO9lMtnGoYE+Ff0nPHOBAgJ8CkiV5xiZY8 UvIA6bFwGsGYEQpfWs8uJTtC8a4yWmQSYlmRZXRDEq45+kihoOUz8Z1AoF+xILt0gRHkc0RyeKCZi /q+VaRuwneiYKoGqRr+3jqD68aZzKmS0A6b6nzuSIS2/Xm3oD2tTWs0mDDnOsKt6VKbixBJoIddCy rISehKpBcth21fgH78dHODzdS2CNqPBOWcA+fykpcjTQ44nBcQR363BnGOxdpU3asSE9kmbVueipP VTXwvq01A+fsBcN6Agr05Q==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6Tzn-0003ym-6N; Sat, 17 Dec 2022 05:00:48 -0500 In-Reply-To: <325aaa94-74fa-cf94-b66c-b87c69ebe386@gmx.at> (message from martin rudalics on Sat, 17 Dec 2022 10:17:00 +0100) 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:251267 Archived-At: > Date: Sat, 17 Dec 2022 10:17:00 +0100 > Cc: juri@linkov.net, 60096@debbugs.gnu.org > From: martin rudalics > > > Basically, set-window-configuration was called in a situation where it > > has only one valid buffer to play with, which is tough for its logic > > and the various other functions it invokes. The result was a bunch of > > bad windows with nil as their buffer. > > If a live window has nil as its buffer, next redisplay will reliably > crash Emacs anyway. So this > > /* We may have deleted windows above. Then again, maybe we > haven't: the functions we call to maybe delete windows can > decide a window cannot be deleted. Force recalculation of > Vwindow_list next time it is needed, to make sure stale > windows with no buffers don't escape into the wild, which > will cause crashes elsewhere. */ > Vwindow_list = Qnil; > > should not be needed. It is needed in this case because it forces redisplay to recompute the window list (in propagate_buffer_redisplay, if not earlier). If the above is not done, Vwindow_list will be reused, and the problematic (bogus?) windows in it _will_ cause a crash. > The earlier call > > delete_all_child_windows (FRAME_ROOT_WINDOW (f)); > > should have reliably reset Vwindow_list to nil. AFAIR, the code which runs after that call recalculated Vwindow_list, adding to it those windows with no buffer. You should be able to see that by running the simple recipe posted by Juri at the beginning of this bug report. What about the other parts of the changeset I installed -- do they look okay to you? any comments?