Subject: Re: bug#47244: 28.0.50; SIGSEGV in long-runnning Emacs

From: martin rudalics <[email-masked]>
Date: Tue, 6 Apr 2021 18:12:38 +0200

> Here is the state as I've been able to determine from the debugger:
 >
 > Vframe_list contains three entries: "build.ninja", "*Server*", and
 > "F1".  This matches reality.  "F1" is the invisible frame created by
 > --daemon.
 >
 > Frame "build.ninja" has a selected_window whose contents are the buffer
 > "build.ninja".
 >
 > Frame "*Server*" has a selected_window whose contents are the buffer
 > "*Server*".
 >
 > Frame "F1" has a selected_window whose contents are the buffer
 > "*scratch*".
 >
 > Vwindow_list contains two entries: A window whose contents are
 > "build.ninja", and a window whose contents are " *Minibuf-0*".
 >
 > Importantly, Vwindow_list does not contain the window whose contents are
 > "*Server*".  Since the window_list_1() call uses the value of
 > Vwindow_list to create its result, the loop in window_loop() will never
 > compare EQ in the REPLACE_BUFFER_IN_WINDOWS_SAFELY case clause.

Impressive, thanks.  This means that if earlier everything worked as
intended someone did

(1) set Vwindow_list to nil (because otherwise the *Server* window would
     still figure in it), and

(2) window_list () recreated Vwindow_list but did _not_ include the
     *Server* window.

The mysterious aspect is (2): Why did window_list skip the *Server*
window?  What is the value of FRAME_ROOT_WINDOW (f) where f is the
*Server* frame?  What is the name of that window's buffer?  IIUC the
*Server* frame does not have a minibuffer window - correct?

martin