bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60096: 29.0.60; Crash in format_mode_line_unwind_data


From: Eli Zaretskii
Subject: bug#60096: 29.0.60; Crash in format_mode_line_unwind_data
Date: Sat, 17 Dec 2022 12:00:47 +0200

> Date: Sat, 17 Dec 2022 10:17:00 +0100
> Cc: juri@linkov.net, 60096@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 
>  > 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]