all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: 60096@debbugs.gnu.org, juri@linkov.net
Subject: bug#60096: 29.0.60; Crash in format_mode_line_unwind_data
Date: Sun, 18 Dec 2022 13:40:43 +0200	[thread overview]
Message-ID: <83h6xtey84.fsf@gnu.org> (raw)
In-Reply-To: <c24af754-59e5-653f-5dbc-f880d4576f90@gmx.at> (message from martin rudalics on Sun, 18 Dec 2022 10:18:18 +0100)

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

Well, you forget *Messages*.  But I get your point.

> 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.

With the current code, this is what happens: the window-related
functions called from set-window-configuration either manage to get
along with such windows, or are called via safe_call, which catches
any errors.  And AFAIU the code in set-window-configuration attempts
to make sure that every window we reinstate from the saved
window-configuration will have a valid buffer when we are done looping
over all of the saved windows.





  reply	other threads:[~2022-12-18 11:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-15 17:04 bug#60096: 29.0.60; Crash in format_mode_line_unwind_data Juri Linkov
2022-12-15 21:42 ` Eli Zaretskii
2022-12-16  7:31   ` Juri Linkov
2022-12-16 11:46     ` Eli Zaretskii
2022-12-16 14:39       ` Eli Zaretskii
2022-12-16 15:03         ` Eli Zaretskii
2022-12-17  9:17           ` martin rudalics
2022-12-17 10:00             ` Eli Zaretskii
2022-12-17 10:53               ` Eli Zaretskii
2022-12-17 15:26               ` martin rudalics
2022-12-17 15:59                 ` Eli Zaretskii
2022-12-17 17:05                   ` martin rudalics
2022-12-17 17:52                     ` Eli Zaretskii
2022-12-18  9:18                       ` martin rudalics
2022-12-18 11:40                         ` Eli Zaretskii [this message]
2022-12-17 17:23           ` Juri Linkov
2022-12-17 17:59             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h6xtey84.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=60096@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.