GNU bug report logs - #39977
28.0.50; Unhelpful stack trace

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Madhu <enometh@HIDDEN>; dated Sat, 7 Mar 2020 18:09:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 30 Mar 2020 02:35:32 +0000
From rudalics@HIDDEN Sat Mar 28 14:38:36 2020
Received: from mout.gmx.net ([212.227.15.15]:51649)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jIGLr-0004VW-Nk
 for 39977 <at> debbugs.gnu.org; Sat, 28 Mar 2020 14:38:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1585420705;
 bh=AcqcI4pJH+Z8Crkm7e4c0LQdre6RZUCEdjskHTlNoag=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=KjxL0GoPaIrhb6leuwFX15u8QaNsVnn92x78Yxn3D3eaBMB14HxyckXCKgDC5Y0N9
 OvopEnVkofu0i9FIDb+xJRzxs02Tm/ZGMiWDMU85tBmO1HPselst7trNMd3oDiEX/h
 1nAsS2RZxjAbLAYsqcf5HQJ6NEAFTHSPBtbbK5wY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.102] ([212.95.5.169]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MN5eR-1izMSC21UD-00J0xh; Sat, 28
 Mar 2020 19:38:25 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
References: <m3k13woybv.fsf@HIDDEN>
 <83blozckn2.fsf@HIDDEN> <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
 <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN> <838sjtetmp.fsf@HIDDEN>
 <88e06868-cfc2-7109-b5ea-71fea3aa897e@HIDDEN> <83mu87b004.fsf@HIDDEN>
 <c8db7b61-71f8-3f96-2f62-497720431d09@HIDDEN> <83y2rk7uri.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <8f21c5ce-49a1-1865-6ea3-fe5120c1cfc5@HIDDEN>
Date: Sat, 28 Mar 2020 19:38:24 +0100
MIME-Version: 1.0
In-Reply-To: <83y2rk7uri.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------A3F4A933B0CBF1134683D960"
Content-Language: en-US
X-Provags-ID: V03:K1:SyOd37vHpe/YansDudWUB6/M56pce2DJ6e+9SrQ0lmsOI1+IVoY
 z/eO0UN+3is0iCyQmnptNU1wDQXmgGCr8gaENzx1fKDS0ytbRK4zVSysUZtW2Rp1742x4Cz
 38ez6fiBW0W45jL2EeAXA+iXPEcifJDXC4V7p+X4UR4gRMhUONwIhf5Eyq3Kd+Dj4tnIco6
 yEYFb5m/LgToQMJN/lakg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:JzjWQYTbmps=:YFbOafrDrcIaS4EQFa5MIn
 QUhIaOtW2SsOQLqSROALBDt2Sh8U+WE3BLi6uF7KDEcMRD0i/+GZM8GyvR11ayicSmEO3E8QY
 pyu3TZglqJWt6PhPyNUBjqcr85sdclsivN79zQJ9TwEp6jGeHJo+l54pbVLMZCYGXYtaLakF2
 fSz8TbCGHO9j9t1HRawMoAh6p+7qAVS7y7PWMr25YPj4ODMl26rtuJnKBLih5+boQwB8voqWB
 0pDsAmRtnL79QyPGDS3Qxk3oUcBFicTqI6V51ZfbiProBFK4ohJKllorviZ0RaGkSNXN/4IOf
 tGljjTkXHG3S+UW1z9uo6n2IEBNjYU9UuDpGQiLx+RAMs1o/JK51z2Yyj85ADEQcsLJI6CFB1
 SpU3/xmXzZkrSWkYfLjhCYW2+8m1bMoit8jhKOIJHoxUCrGs3dEENOiWOpqIJfGd98cCEJTil
 K6B0vqVD/RjpWqEVp9YfjZFVPs9vbwRq3tUUy+zjP5obRWktSOTDbdr8FF1sgBqrcl2lwLJZQ
 qpwqqQrqy29IVtQB0XkxYQf5itUFIjSpfKbc3IQ1k3Pkw3B4CiUpM4B6Q7/BgO3ceb7BvJB3v
 fHZpVRsFhL8GgqtAGxIVhGsClpmbejmByiRlN3Tko0VC12hoFW0+3OBzTMd6UAynfJ+HW3AVE
 6aArPRaVOLBL4V8Gjxvz6E+J745tnpd0kNCSZClypMSYEhN22Xq8SMuIfqT6J+SOlXMF3fxxN
 xcrb7ths9/pjkdj+m05U8ozvBlF7R5i0CojMsz41+fcndBcsR/a6HrAtvturhgu/jV2L/f8Ve
 Hdl8Sef/rY4qJmCVtFQwz1ysai3VxdFzMNMuh04+gNhDVuNMCIv5Oy17EAcnmZLIWEjIJzS7c
 uvUsvtUoA0IlERjzZF9+HWczVJG6GwBz5JAXp04sWAHzIQ5iMFE2kYHePOODFkVgIEe26SgVX
 JM1GUR4sTbT7Dea+9I4d0ztYilnwbIBWr83XnKyOVZQ3hl5JuqBF3YL6+NpH9YMcE+lxFrv1s
 9142Q/wG6rEnae2YM/sPko1FQhgqCgq8HrFd8TffgNb+21rSSxxfVkCSVR2N1SoLWmIx9hzlR
 vr8pD0oRbss8woF3oUShAHfedB2MT4mU1PeWs1sKz18AgdNVQd7hwgT/DhdaKHMIdtc7Qp7MV
 vwvjZ6vTNZuM3lkxLgg+95EaNqOijxw9Gs9V9WSZsNMN2yngthy0W1H8FhwtTh5kJDgaeD38E
 ysVyPEubpm7OCioIo
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 28 Mar 2020 18:38:36 -0000

This is a multi-part message in MIME format.
--------------A3F4A933B0CBF1134683D960
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 >>   >> (and (frame-live-p (selected-frame))
 >>   >>        (window-live-p (selected-window))
 >>   >>        (eq (frame-selected-window (selected-frame))
 >>   >> 	 (selected-window)))
 >>   >
 >>   > I agree.  But note that selected-frame could switch frames internally,
 >>   > if the last selected frame is dead; as long as selected-frame also
 >>   > adjusts the selected window, the above will still hold.
 >>
 >> Do you mean 'select-frame' instead of 'selected-frame'?
 >
 > No, I meant selected-frame.

So you meant a 'selected-frame' based on the SELECTED_FRAME I proposed.
The problem is that that macro won't protect the invariant if it was
broken before, for example, by setting the selected window to a dead
window as in Madhu's scenario.

 > Perhaps we should make unwind_format_mode_line less fragile, then.

The problematic step happens already at the time we set it up.  In a
nutshell, Madhu's scenario goes as follows: In display_mode_lines we do

   Lisp_Object old_selected_window = selected_window;
   Lisp_Object old_selected_frame = selected_frame;
...
       display_mode_line (w, CURRENT_MODE_LINE_FACE_ID_3 (sel_w, sel_w, w),
			 NILP (window_mode_line_format)
			 ? BVAR (current_buffer, mode_line_format)
			 : window_mode_line_format);
...
   XFRAME (new_frame)->selected_window = old_frame_selected_window;
   selected_frame = old_selected_frame;
   selected_window = old_selected_window;

where display_mode_line deletes both, old_selected_frame and
old_selected_window.  So we end up with selected_frame and
selected_window both referencing dead objects.  The subsequent call of
gui_consider_frame_title now does

       record_unwind_protect (unwind_format_mode_line,
			     format_mode_line_unwind_data
			       (f, current_buffer, selected_window, false));

where selected_window is already a dead window.  Since in
unwind_format_mode_line old_window is non-nil, it will call

       Fselect_window (old_window, Qt);

which first chokes on

    CHECK_LIVE_WINDOW (window);

which is the error reported when emacs does not crash and finally on

   sf = SELECTED_FRAME ();

which crashes emacs due to the fact that selected_frame is dead.  In
either case, making the unwind_format_mode_line less fragile won't avoid
any crash, it might just postpone it.

 >> And I have no idea yet why we need an extra unwind for restoring
 >> selected_frame and selected_window.  Shouldn't these go hand in hand
 >> with what unwind_format_mode_line does?  Does the one even know
 >> about the other?
 >
 > I don't think I understand what extra unwind are you talking about
 > here.  Can you provide a more specific pointer to the relevant code?

I meant the fact that we already do unwind_format_mode_line when
formatting the mode line and that function could restore the selected
window in a safe way.  I'm far from proposing to use that approach when
drawing the mode lines, though.

Attached find a patch which should solve the more grave problems caused
by a function deleting the previously selected frame or window.  It
intentionally does not change SELECTED_FRAME.  Any abort there should be
reserved to obscure bugs we have not been able to trace yet.  Please
read it with your usual care, it took me some time to convince myself
that it selects its frame in a reasonable way.

On master, I would then like to use restore_selected_window also for
gui_consider_frame_title.  The overhead caused by that is a great
annoyance (especially when debugging frame switching code) and we could
then hopefully get rid of the old_window stuff and the Bug#32777 fix as
well.

What any patch I provide here cannot do is to fix problems when the mode
line code deletes the selected window right away.  Code like


(defvar window (split-window))

(defvar foo
   '(:eval
     (if (or (not (window-live-p window))
	    (eq window (frame-first-window)))
	(setq window (split-window))
       (delete-window window))))

(setq-default mode-line-format foo)


will continue to segfault unless you can cure that.  I tried to fix it
in the spirit of

		if (!FRAME_LIVE_P (it->f))
		  signal_error (":eval deleted the frame being displayed", elt);

but that just caused emacs to hang.

martin

--------------A3F4A933B0CBF1134683D960
Content-Type: text/x-patch;
 name="restore_selected_window.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="restore_selected_window.diff"

diff --git a/src/xdisp.c b/src/xdisp.c
index a4de2698ca..e0273aba3f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12149,12 +12149,12 @@ unwind_format_mode_line (Lisp_Object vector)
   mode_line_string_face_prop = AREF (vector, 5);

   /* Select window before buffer, since it may change the buffer.  */
-  if (!NILP (old_window))
+  if (WINDOW_LIVE_P (old_window))
     {
       /* If the operation that we are unwinding had selected a window
 	 on a different frame, reset its frame-selected-window.  For a
 	 text terminal, reset its top-frame if necessary.  */
-      if (!NILP (target_frame_window))
+      if (WINDOW_LIVE_P (target_frame_window))
 	{
 	  Lisp_Object frame
 	    = WINDOW_FRAME (XWINDOW (target_frame_window));
@@ -12171,7 +12171,7 @@ unwind_format_mode_line (Lisp_Object vector)
       /* Restore point of target_frame_window's buffer (Bug#32777).
 	 But do this only after old_window has been reselected to
 	 avoid that the window point of target_frame_window moves.  */
-      if (!NILP (target_frame_window))
+      if (WINDOW_LIVE_P (target_frame_window))
 	{
 	  Lisp_Object buffer = AREF (vector, 10);

@@ -12594,18 +12598,58 @@ update_menu_bar (struct frame *f, bool save_match_data, bool hooks_run)

 #ifdef HAVE_WINDOW_SYSTEM

-/* Select `frame' temporarily without running all the code in
-   do_switch_frame.
-   FIXME: Maybe do_switch_frame should be trimmed down similarly
-   when `norecord' is set.  */
+/* Restore WINDOW as the selected window and its frame as the selected
+   frame.  If WINDOW is dead but the selected frame is live, make the
+   latter's selected window the selected window.  If both, WINDOW and
+   the selected frame, are dead, assign selected frame and window from
+   some arbitrary live frame.  Abort if no such frame can be found.  */
 static void
-fast_set_selected_frame (Lisp_Object frame)
+restore_selected_window (Lisp_Object window)
 {
-  if (!EQ (selected_frame, frame))
+  if (WINDOW_LIVE_P (window))
+    /* If WINDOW is live, make it the selected window and set the
+       selected frame to its frame.  */
     {
-      selected_frame = frame;
-      selected_window = XFRAME (frame)->selected_window;
+      selected_window = window;
+      selected_frame = XWINDOW (window)->frame;
     }
+  else if (FRAMEP (selected_frame) && FRAME_LIVE_P (XFRAME (selected_frame)))
+    /* If WINDOW is dead but the selected frame is still live, make the
+       latter's selected window the selected one.  */
+    selected_window = FRAME_SELECTED_WINDOW (XFRAME (selected_frame));
+  else
+    /* If WINDOW and the selected frame are dead, choose some live,
+       non-child and non-tooltip frame as the new selected frame and
+       make its selected window the selected window.  */
+    {
+      Lisp_Object tail;
+      Lisp_Object frame UNINIT;
+
+      FOR_EACH_FRAME (tail, frame)
+	{
+	  struct frame *f = XFRAME (frame);
+
+	  if (!FRAME_PARENT_FRAME (f) && !FRAME_TOOLTIP_P (f))
+	    {
+	      selected_frame = frame;
+	      selected_window = FRAME_SELECTED_WINDOW (f);
+
+	      return;
+	    }
+	}
+
+      /* Abort if we cannot find a live frame.  */
+      emacs_abort ();
+    }
+}
+
+/* Restore WINDOW, if live, as its frame's selected window.  */
+static void
+restore_frame_selected_window (Lisp_Object window)
+{
+  if (WINDOW_LIVE_P (window))
+    /* If WINDOW is live, make it its frame's selected window.  */
+    FRAME_SELECTED_WINDOW (XFRAME (XWINDOW (window)->frame)) = window;
 }

 #endif /* HAVE_WINDOW_SYSTEM */
@@ -12681,9 +12725,10 @@ update_tab_bar (struct frame *f, bool save_match_data)
 		       XFRAME (selected_frame)->selected_window));
 #ifdef HAVE_WINDOW_SYSTEM
 	  Lisp_Object frame;
-	  record_unwind_protect (fast_set_selected_frame, selected_frame);
+	  record_unwind_protect (restore_selected_window, selected_window);
 	  XSETFRAME (frame, f);
-	  fast_set_selected_frame (frame);
+	  selected_frame = frame;
+	  selected_window = FRAME_SELECTED_WINDOW (f);
 #endif

 	  /* Build desired tab-bar items from keymaps.  */
@@ -13625,9 +13670,10 @@ update_tool_bar (struct frame *f, bool save_match_data)
 		       /* Since we only explicitly preserve selected_frame,
 			  check that selected_window would be redundant.  */
 		       XFRAME (selected_frame)->selected_window));
-	  record_unwind_protect (fast_set_selected_frame, selected_frame);
+	  record_unwind_protect (restore_selected_window, selected_window);
 	  XSETFRAME (frame, f);
-	  fast_set_selected_frame (frame);
+	  selected_frame = frame;
+	  selected_window = FRAME_SELECTED_WINDOW (f);

 	  /* Build desired tool-bar items from keymaps.  */
           new_tool_bar
@@ -24939,11 +24985,14 @@ redisplay_mode_lines (Lisp_Object window, bool force)
 display_mode_lines (struct window *w)
 {
   Lisp_Object old_selected_window = selected_window;
-  Lisp_Object old_selected_frame = selected_frame;
   Lisp_Object new_frame = w->frame;
-  Lisp_Object old_frame_selected_window = XFRAME (new_frame)->selected_window;
+  ptrdiff_t count = SPECPDL_INDEX ();
   int n = 0;

+  record_unwind_protect (restore_selected_window, selected_window);
+  record_unwind_protect
+    (restore_frame_selected_window, XFRAME (new_frame)->selected_window);
+
   if (window_wants_mode_line (w))
     {
       Lisp_Object window;
@@ -25009,9 +25058,8 @@ display_mode_lines (struct window *w)
       ++n;
     }

-  XFRAME (new_frame)->selected_window = old_frame_selected_window;
-  selected_frame = old_selected_frame;
-  selected_window = old_selected_window;
+  unbind_to (count, Qnil);
+
   if (n > 0)
     w->must_be_updated_p = true;
   return n;

--------------A3F4A933B0CBF1134683D960--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 28 Mar 2020 08:23:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 28 04:23:34 2020
Received: from localhost ([127.0.0.1]:33634 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jI6kg-0007Xs-BO
	for submit <at> debbugs.gnu.org; Sat, 28 Mar 2020 04:23:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41731)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jI6ke-0007Xg-9y
 for 39977 <at> debbugs.gnu.org; Sat, 28 Mar 2020 04:23:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59036)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jI6kY-0002rA-IW; Sat, 28 Mar 2020 04:23:26 -0400
Received: from [176.228.60.248] (port=1175 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jI6kX-0001KO-Sj; Sat, 28 Mar 2020 04:23:26 -0400
Date: Sat, 28 Mar 2020 11:23:29 +0300
Message-Id: <83y2rk7uri.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <c8db7b61-71f8-3f96-2f62-497720431d09@HIDDEN> (message from
 martin rudalics on Tue, 24 Mar 2020 10:45:16 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83wo7o6nxs.fsf@HIDDEN> <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN>
 <83blozckn2.fsf@HIDDEN> <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
 <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN> <838sjtetmp.fsf@HIDDEN>
 <88e06868-cfc2-7109-b5ea-71fea3aa897e@HIDDEN> <83mu87b004.fsf@HIDDEN>
 <c8db7b61-71f8-3f96-2f62-497720431d09@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Tue, 24 Mar 2020 10:45:16 +0100
> 
>  >> (and (frame-live-p (selected-frame))
>  >>        (window-live-p (selected-window))
>  >>        (eq (frame-selected-window (selected-frame))
>  >> 	 (selected-window)))
>  >
>  > I agree.  But note that selected-frame could switch frames internally,
>  > if the last selected frame is dead; as long as selected-frame also
>  > adjusts the selected window, the above will still hold.
> 
> Do you mean 'select-frame' instead of 'selected-frame'?

No, I meant selected-frame.

>  > I'm okay with having non-deterministic behavior triggered by code that
>  > violates that invariant.  We will tell people who write such Lisp code
>  > "if it hurts, don't do that".
> 
> But till then we may have to handle reports of bugs that are very hard
> to reproduce.

Bugs that are caused by such invalid Lisp, and that manifest
themselves by unexpected or unpredictable behavior, are fine with me.
Of course, it would be good to find the causes of such bugs and point
them out to the responsible Lisp programmer, but as long as we don't
crash or lock up, we are in a relatively good shape.

>  >> Wrong type argument: window-live-p, #<window 3>
>  >>
>  >> error in redisplay.
>  >
>  > That might not be the best solution, but it's "good enough" in my
>  > book.  The programmer who writes such code deserves punishment, and an
>  > error in redisplay that doesn't lock up Emacs (or does it?) is ample
>  > punishment, IMO.
> 
> This error might be due to the fact that _any_ of old_top_frame,
> old_window and target_frame_window in unwind_format_mode_line can be
> dead at the time of unwinding.  unwind_format_mode_line is much to
> fragile in this regard.

Perhaps we should make unwind_format_mode_line less fragile, then.

> And I have no idea yet why we need an extra unwind for restoring
> selected_frame and selected_window.  Shouldn't these go hand in hand
> with what unwind_format_mode_line does?  Does the one even know
> about the other?

I don't think I understand what extra unwind are you talking about
here.  Can you provide a more specific pointer to the relevant code?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 24 Mar 2020 09:45:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 24 05:45:33 2020
Received: from localhost ([127.0.0.1]:53899 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jGg7p-0001sY-Ik
	for submit <at> debbugs.gnu.org; Tue, 24 Mar 2020 05:45:33 -0400
Received: from mout.gmx.net ([212.227.15.15]:42507)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jGg7n-0001sG-Dd
 for 39977 <at> debbugs.gnu.org; Tue, 24 Mar 2020 05:45:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1585043120;
 bh=SiaakUDld1SncLTs8RBievHngDRyy7gzIjnKAgigZtk=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=HgJP9erbhLLSMDGd+RXx9rT4FHzx/9qW4XciSMMbW6th8yCvmd5lvYVB+GBq/0CpT
 cDIJMbx7Zy8oIYBN/9T1pWFttVEXkMTm2MJ7gLqQyCy+G7PIHT7AXyqp9zsOphyDo3
 8IfxFvGJSHXGb/flqYnxqYtHpOsYgtf1CwxcTdkk=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.83]) by mail.gmx.com (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mo6v3-1jadev1e8p-00pd7R; Tue, 24
 Mar 2020 10:45:18 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83wo7o6nxs.fsf@HIDDEN> <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN>
 <83blozckn2.fsf@HIDDEN> <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
 <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN> <838sjtetmp.fsf@HIDDEN>
 <88e06868-cfc2-7109-b5ea-71fea3aa897e@HIDDEN> <83mu87b004.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <c8db7b61-71f8-3f96-2f62-497720431d09@HIDDEN>
Date: Tue, 24 Mar 2020 10:45:16 +0100
MIME-Version: 1.0
In-Reply-To: <83mu87b004.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:wfev0OqhsSKUIfX6IiE13LXQAKuHY2AFrix+dPXC+GfhEsOTf8h
 Xz/kslLd45wipWmiZjxLhkFFIMi9OYcMHdKUBoWjw4IUizZ1cOu6EbwI/RKByHZr5DHzmD5
 WFf2Z9w+CUhRzmNhMJ/s9vRqPTrlCS++ZyQLqz+RndfCXN98+Vfnlu0eBi/CAbE566wCVSH
 3jh/Quo1rSH315Eno52Mw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Eq06hFfhEKk=:ydwA35vWxmGsBgFe6O4+1n
 s4cSfpjpHOZRxi2ysMTn74H/6BzbEdRuyPeBeGsjHM1OtCo5T/V7MC+w1TLNYII5g3R5MHWeI
 IHKtIcmCvdXPaw3pc40xdCA+RihoDZCBglMg83i0cs+2THvU6Iu4IfsoEjS7mW166uI38LSYf
 bJ9VdmgsCU8OlBam9Rj/RHK4iK8FZHuvMpkH23EbVjB1QYo45Uly4bchDBbzwjZEx+QbTVg2b
 S1oNjf5FzPJIEpgLa3GTRdXXj7wEiHM33W7z7fe+70UaZz2Z6QNZwvzD/0eX+SWtRz9DDJaKW
 Idn+vbNEscuVAOS1Jyh/6S+T7pqJy1eSr3I4lssC2Lcte9R8xDkYLfLMWu3DkwmI4AluFwbK+
 HY6gPLRROeveeAokP6O9rp/bbvTWq2gBbUwCvGNn/zrRBCR+nvNkpV3oIu34GkJes23JFhc9p
 kKqVNxp1SXrG+FM1Rh00nWNOCyaKgOtwMPOxNBy4akNnIhMTtoJp7qMgx6JPTF6+jA77kS5ZM
 a6cCW7N52u3aIbGMkhAhZWiSLDKvhN49JEhspE1izDVTvG54Ua0s+8EQ2J26C6vfoemihvwyJ
 xruN/MXqEqLDBZkgH7wStxbrgaYdWmg63f/rpMz/BsKwWibVAAg/RClZL0Ou3Q7DoBbSRz0xc
 CPXRkYsb2Hh8KgpYoSYJA8G13PMwl0nmmKjJt3XkoLQxLQ2K/IxDvmIVYU9NeGHTH1UwUvU9O
 onyJ1G3MaPYY1HgYRB1kbZqcMo1hqIKVO14qlGSnMByTU32pSpSFHPt71fyTWbN0hj56SJZ7s
 flVz9s1nwEcjrpHo92nRLeuEYW3IpSoJNHwQoAvj7fmeyKp5t7jaPDpW+GEzFAZqKuJIL0KkC
 HzpLkm7rOrK/jtlidT7fZKI+0eKlE8b1MVBE1ovN2W9i/kSRKv69XgmynPq4u76r0Kp160Uke
 l+/hW37Yd/dIuVa9LXXZvcZg8eLu5UzHnbaMzbMIWoBI2Iv3tChY56h/HpwRoX/sM/iaGuaT0
 NJK2EFitW2n//BXSemB9VmEO4gSe4JQcSNUH6grdNVbC/OWCwy0AaiukL4gEjW8S2U1Pp6PWq
 IVpDWDbdEXRLCf/Rj/zOIbo58KSwAaMX0fES2HFEr0xUm7k39oYuwV2x/uzpel9LFBSSGvbpb
 v7iU7HfyT85erIKk964ZaioES0zRC5TC+DgcCGMtUm5ZefZE9THUzlTmmXoMOLyoKw/sqWlo7
 J3oA7oKRUbAFHdTqH
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> (and (frame-live-p (selected-frame))
 >>        (window-live-p (selected-window))
 >>        (eq (frame-selected-window (selected-frame))
 >> 	 (selected-window)))
 >
 > I agree.  But note that selected-frame could switch frames internally,
 > if the last selected frame is dead; as long as selected-frame also
 > adjusts the selected window, the above will still hold.

Do you mean 'select-frame' instead of 'selected-frame'?  If so, please
note that the problems occur due to the fact that we set selected_frame
and selected_window directly without going through do_switch_frame.

 > I'm okay with having non-deterministic behavior triggered by code that
 > violates that invariant.  We will tell people who write such Lisp code
 > "if it hurts, don't do that".

But till then we may have to handle reports of bugs that are very hard
to reproduce.  In the case at hand the mode-line code runs a function
'sly-db-exit' (https://github.com/joaotavora/sly/blob/master/sly.el)
where practically every single function call can have unpredictable
consequences.  And 'sly-db-exit' might be one of the milder examples of
what code can possibly do there.

 >> Wrong type argument: window-live-p, #<window 3>
 >>
 >> error in redisplay.
 >
 > That might not be the best solution, but it's "good enough" in my
 > book.  The programmer who writes such code deserves punishment, and an
 > error in redisplay that doesn't lock up Emacs (or does it?) is ample
 > punishment, IMO.

This error might be due to the fact that _any_ of old_top_frame,
old_window and target_frame_window in unwind_format_mode_line can be
dead at the time of unwinding.  unwind_format_mode_line is much to
fragile in this regard.  And I have no idea yet why we need an extra
unwind for restoring selected_frame and selected_window.  Shouldn't
these go hand in hand with what unwind_format_mode_line does?  Does the
one even know about the other?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 23 Mar 2020 14:48:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 23 10:48:32 2020
Received: from localhost ([127.0.0.1]:53388 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jGONT-0003iz-OB
	for submit <at> debbugs.gnu.org; Mon, 23 Mar 2020 10:48:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56892)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jGONS-0003ij-HD
 for 39977 <at> debbugs.gnu.org; Mon, 23 Mar 2020 10:48:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54364)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jGONM-0001wm-Lo; Mon, 23 Mar 2020 10:48:24 -0400
Received: from [176.228.60.248] (port=1614 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jGONM-0005K9-09; Mon, 23 Mar 2020 10:48:24 -0400
Date: Mon, 23 Mar 2020 16:48:27 +0200
Message-Id: <83mu87b004.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <88e06868-cfc2-7109-b5ea-71fea3aa897e@HIDDEN> (message from
 martin rudalics on Sun, 22 Mar 2020 19:20:33 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83imj88tpt.fsf@HIDDEN> <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN>
 <83wo7o6nxs.fsf@HIDDEN> <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN>
 <83blozckn2.fsf@HIDDEN> <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
 <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN> <838sjtetmp.fsf@HIDDEN>
 <88e06868-cfc2-7109-b5ea-71fea3aa897e@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 22 Mar 2020 19:20:33 +0100
> 
> Once an initial frame has been created, Lisp code should be always able
> to rely on the truth of
> 
> (and (frame-live-p (selected-frame))
>       (window-live-p (selected-window))
>       (eq (frame-selected-window (selected-frame))
> 	 (selected-window)))

I agree.  But note that selected-frame could switch frames internally,
if the last selected frame is dead; as long as selected-frame also
adjusts the selected window, the above will still hold.

> (1) Let the redisplay code handle it.
> 
> (2) Let the frame and window management handle it by disallowing such
> operations while they are issued by the mode line or frame title
> processing code.
> 
> (3) Ignore it and let the frame/window management routines catch up with
> it later.
> 
> Using (1) way my initial idea.  The patch I proposed handles simple
> cases like Madhu's bug.  It will certainly not handle more sophisticated
> cases where, for example, an application kills two frames in a row.
> 
> (2) is by far the most simple and reliable approach but it will restrict
> applications in what they are allowed to do when processing a mode line
> or frame title.
> 
> (3) means that frame/window management proceeds in a non-deterministic
> fashion as long as it has not detected that its basic invariant has been
> violated.

I'm okay with having non-deterministic behavior triggered by code that
violates that invariant.  We will tell people who write such Lisp code
"if it hurts, don't do that".

>  > This isn't about trust.  This is about letting users' Lisp do anything
>  > they want as long as the results allow redisplay to continue after
>  > that Lisp returns.  I don't think it's right to disallow certain
>  > actions just because they _might_ cause problems.
> 
> You again care about redisplay only.

Only because the crashes we are discussing were in redisplay.  Not in
general.

>  >> If that's the reason, then SELECTED_FRAME can easily set selected_frame
>  >> to some live frame and continue.
>  >
>  > Something like that, yes.
> 
> I attach a patch that does that.  If you try it with a recipe like
> loading
> 
> 
> (defvar foo
>    '(:eval
>      (when (> (length (frame-list)) 1)
>        (delete-frame (next-frame)))))
> 
> (setq-default mode-line-format foo)
> 
> (make-frame)
> 
> 
> with emacs -Q you will see that while it works around the crash it still
> produces a
> 
> Wrong type argument: window-live-p, #<window 3>
> 
> error in redisplay.

That might not be the best solution, but it's "good enough" in my
book.  The programmer who writes such code deserves punishment, and an
error in redisplay that doesn't lock up Emacs (or does it?) is ample
punishment, IMO.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 22 Mar 2020 18:20:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 22 14:20:47 2020
Received: from localhost ([127.0.0.1]:50894 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jG5DL-0000yQ-AN
	for submit <at> debbugs.gnu.org; Sun, 22 Mar 2020 14:20:47 -0400
Received: from mout.gmx.net ([212.227.15.15]:39705)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jG5DJ-0000y8-8u
 for 39977 <at> debbugs.gnu.org; Sun, 22 Mar 2020 14:20:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584901235;
 bh=0QgLIffPSaf9JBIxoYDsg6sPmLkGq0OsfFJNuMbNt4k=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=IrLsiXY+Fuz0hTF+MXQxidsBNqfDpqYd38FTbYCGWe82JtZ8tE0lQUONaestfLyKX
 yZCJGQZXAFnw9GEEItaQX1rnormqw29fxbpxGeztEehyB8xwyaPwD+TB+jbEjby7Y+
 HuAe5l8w9g635UMwjDqlFVBJCM8ZCfx9gvodwx8I=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.244]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1ML9yS-1iy0MT02Pi-00IFxl; Sun, 22
 Mar 2020 19:20:35 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83imj88tpt.fsf@HIDDEN> <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN>
 <83wo7o6nxs.fsf@HIDDEN> <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN>
 <83blozckn2.fsf@HIDDEN> <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
 <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN> <838sjtetmp.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <88e06868-cfc2-7109-b5ea-71fea3aa897e@HIDDEN>
Date: Sun, 22 Mar 2020 19:20:33 +0100
MIME-Version: 1.0
In-Reply-To: <838sjtetmp.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------CA36CE8C6D6763F6338D104A"
Content-Language: en-US
X-Provags-ID: V03:K1:RN0Z6vdp3BiTIfwIj1iuYimrfv0YR00UxShzBb3leJGjuhg/FJF
 GlTNYqLNYG3qlXprZmgrWSZLk2i9mR3qWt/Af5LtGPrOiDnMH1Sxzlqpi4+gSJTIARO5Ssd
 /9K0/v474hqQ8b2JMlWKRdcE9aCyZqJyGRERaLb3xdyLFHAUG08XciaM7N8dNyAdeXEcSQu
 ijczvh9hP1yFb2ow6JC6A==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:jICGt61p5Pg=:qKl4/KZ7hhh5M2PL7YHX/8
 TUP0kpDy4N+6cWOQ9rwXG+JlGIUshDY4xPGAr3ThTso55mtB6wB00x82yEW3pHUIoZebtvNXW
 ehP0rkqM9oZ6DdVPnYy0FzNNmobUlKZHP3AwJoSxGVF8zohNICQ82yXBi+Ag/jSmaMmXmP+tp
 GUbqTWRIa6y/pU5MqVvO+aShsqhjTJrbuEOa4Ef17dVbO6SRsw6DQp3Sl6HDLxNvZJQ/PBKq4
 Vjnq4G9mlF+7+m8FJ0RlU5fq/OQ68gc97HBamsgnW7d/xs2S07Imblqqjsl5eZPxGbFQZu/Tr
 Plt3VXB3KZb22FMyYj+UNUh1kuLTdMVkvVjGqtgrqDMAdY0CHT98P+Syq9GN+DcPKP7PIHrAM
 wHzX1XJEWdyqdb4gb0LTfBXgl4yNcyiVHE6/GmkL8CXiAh1yan85GUz6Z1NJjQydENTQfbdRT
 nAQZR7YxcentWJEESRgpdP4QabaBz3UPGdKWgcooVFqCyMTgbVpfVHWavR8Xd2BFmclscIYe+
 HM5+Y3SUZr8cMY57+nnZDZZcHGuSXFmvcaP5B94Ttavh7rbEb+dOcKM0KixVOE0IXyOaF6Tvp
 SygjcgA7Oa2GdpR58huQzeLrYiu78heTEzTBwUge7XgfCqCZnb/og5czKREkozK16pc1F10G+
 MaD0u0ts9fIZL2+LqR9i++77wkxhYDeO8xYexHUQwofJmNoRkDwUryR6Xrmdsf8atgWPYz4we
 Wfz2eSaSAe8S+G8MW08Z63bcdlPkIRHM1XSUBV1Fw59sIFSYanuuNv7hi+tS5fhi8twfcC4je
 QzLy35S15ml62or8x0KJE/B7Dpb2cb5LPigTFQA40Sz9H28sI92AyGy54TQhokCk5iiMlASa6
 N/a+ms0nJznPeXwY9U7mAj55WUQCWbafK+Ul1gLhGQt/FGXdQhSP+zKW0d1lqkJ18rZc47QLm
 MPYJPyE7xzVOo71MHMIago15+J8T0rMbj6M8j6rN5qt/q1WON8u8YSBQk5ymnhUGfVX+v7rf3
 We5Hy5DEX+v17C58vdIwoO5aSucST1EUfbrMn7UzzZOiBrKKaHtCwf91/QSxZka/zkaaSSTao
 0UuUWUJcX7IRzIHfn+3LUwehnHvZqDsD/gLQ+Jx1xx0IhTC/QL58SufEYRau3CPyOE7HzRhg3
 TtNJKtnFbgMMWPD6bvPwBOPpP9LIxrQnVy+QNXl6BQZt5305ITIuuXvhtA7D+hXUb25esNC+s
 buVmpq1zgQrjc1QOt
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------CA36CE8C6D6763F6338D104A
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 >> Not really.  It's easy for delete_frame to refuse deleting a frame right
 >> at the beginning.  But once it has accepted a deletion, it might become
 >> hard to deal with all the consequences.
 >
 > I don't think I understand where you are going with this.

Once an initial frame has been created, Lisp code should be always able
to rely on the truth of

(and (frame-live-p (selected-frame))
      (window-live-p (selected-window))
      (eq (frame-selected-window (selected-frame))
	 (selected-window)))

Whenever this basic invariant is violated, there is no guarantee that
frame and window management will produce correct results.  Currently,
this invariance is no longer guaranteed if Lisp code is allowed to
manipulate frames and windows arbitrarily while processing the mode line
or the frame title.  IMO there are three possible ways to deal with this
problem:

(1) Let the redisplay code handle it.

(2) Let the frame and window management handle it by disallowing such
operations while they are issued by the mode line or frame title
processing code.

(3) Ignore it and let the frame/window management routines catch up with
it later.

Using (1) way my initial idea.  The patch I proposed handles simple
cases like Madhu's bug.  It will certainly not handle more sophisticated
cases where, for example, an application kills two frames in a row.

(2) is by far the most simple and reliable approach but it will restrict
applications in what they are allowed to do when processing a mode line
or frame title.

(3) means that frame/window management proceeds in a non-deterministic
fashion as long as it has not detected that its basic invariant has been
violated.

 > This isn't about trust.  This is about letting users' Lisp do anything
 > they want as long as the results allow redisplay to continue after
 > that Lisp returns.  I don't think it's right to disallow certain
 > actions just because they _might_ cause problems.

You again care about redisplay only.  Which means that frame/window
management is second-class as far as safety is concerned.

 >>   > No, they are there in cases where we simply don't know how to
 >>   > continue.
 >>
 >> If that's the reason, then SELECTED_FRAME can easily set selected_frame
 >> to some live frame and continue.
 >
 > Something like that, yes.

I attach a patch that does that.  If you try it with a recipe like
loading


(defvar foo
   '(:eval
     (when (> (length (frame-list)) 1)
       (delete-frame (next-frame)))))

(setq-default mode-line-format foo)

(make-frame)


with emacs -Q you will see that while it works around the crash it still
produces a

Wrong type argument: window-live-p, #<window 3>

error in redisplay.

martin

--------------CA36CE8C6D6763F6338D104A
Content-Type: text/x-patch;
 name="SELECTD_FRAME.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="SELECTD_FRAME.diff"

--- a/src/frame.c
+++ b/src/frame.c
@@ -1843,6 +1843,36 @@ other_frames (struct frame *f, bool invisible, boo=
l force)
   return false;
 }
=20
+
+/** Select some live frame.  */
+bool
+select_some_frame (void)
+{
+  Lisp_Object tail;
+  Lisp_Object frame UNINIT;
+
+  FOR_EACH_FRAME (tail, frame)
+    {
+      struct frame *f =3D XFRAME (frame);
+
+      if (!FRAME_PARENT_FRAME (f) && !FRAME_TOOLTIP_P (f))
+	{
+	  /* Select FRAME without switching to it.  This sets up the
+	     selected frame and the selected window and avoids aborting
+	     as when redisplay selects a dead frame (Bug#39977).  */
+	  selected_frame =3D frame;
+	  if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
+	    FRAME_SELECTED_WINDOW (f) =3D Fframe_first_window (frame);
+	  selected_window =3D FRAME_SELECTED_WINDOW (f);
+
+	  return true;
+	}
+    }
+
+  return false;
+}
+
+
 /* Make sure that minibuf_window doesn't refer to FRAME's minibuffer
    window.  Preferably use the selected frame's minibuffer window
    instead.  If the selected frame doesn't have one, get some other
diff --git a/src/frame.h b/src/frame.h
index a54b8623e5..807938fd9f 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1363,14 +1363,17 @@ window_system_available (struct frame *f)
=20
 extern Lisp_Object Vframe_list;
=20
+bool select_some_frame (void);
+
 /* Value is a pointer to the selected frame.  If the selected frame
    isn't live, abort.  */
=20
 #define SELECTED_FRAME()				\
-     ((FRAMEP (selected_frame)				\
-       && FRAME_LIVE_P (XFRAME (selected_frame)))	\
-      ? XFRAME (selected_frame)				\
-      : (emacs_abort (), (struct frame *) 0))
+  (((FRAMEP (selected_frame)				\
+     && FRAME_LIVE_P (XFRAME (selected_frame)))		\
+    || select_some_frame ())				\
+   ? XFRAME (selected_frame)				\
+   : (emacs_abort (), (struct frame *) 0))
=20
 =0C
 /***********************************************************************=


--------------CA36CE8C6D6763F6338D104A--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 21 Mar 2020 13:15:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 21 09:15:55 2020
Received: from localhost ([127.0.0.1]:46097 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jFdyl-0006Uk-De
	for submit <at> debbugs.gnu.org; Sat, 21 Mar 2020 09:15:55 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60756)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jFdyj-0006UX-BX
 for 39977 <at> debbugs.gnu.org; Sat, 21 Mar 2020 09:15:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44962)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jFdyc-00030w-Ch; Sat, 21 Mar 2020 09:15:47 -0400
Received: from [176.228.60.248] (port=3435 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jFdyY-0007wC-Tb; Sat, 21 Mar 2020 09:15:45 -0400
Date: Sat, 21 Mar 2020 15:15:42 +0200
Message-Id: <838sjtetmp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN> (message from
 martin rudalics on Sat, 21 Mar 2020 10:32:24 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
 <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sat, 21 Mar 2020 10:32:24 +0100
> 
>  >> I'm afraid that we already might mishandle some of those simple cases.
>  >
>  > That just makes my point stronger, doesn't it?
> 
> Not really.  It's easy for delete_frame to refuse deleting a frame right
> at the beginning.  But once it has accepted a deletion, it might become
> hard to deal with all the consequences.

I don't think I understand where you are going with this.

>  >>   > The problem is how to do this without breaking legitimate code.  For
>  >>   > example, changing the window configuration temporarily, then changing
>  >>   > it back is quite legitimate,
>  >>
>  >> Right in the middle of redisplay, while constructing the mode line or
>  >> the title format?
>  >
>  > Why not?  As long as things are back as they were by the time :eval
>  > returns, I see no reason to disallow such code.
> 
> Such a change in the window configuration would take place in a state
> where certain variables have temporary settings only.  Selected frame,
> selected window and current buffer have been set by redisplay in a fast,
> improvised manner.  I would never trust the outcome of save_window_save
> or 'set-window-configuration' in such a state.

This isn't about trust.  This is about letting users' Lisp do anything
they want as long as the results allow redisplay to continue after
that Lisp returns.  I don't think it's right to disallow certain
actions just because they _might_ cause problems.

>  > No, they are there in cases where we simply don't know how to
>  > continue.
> 
> If that's the reason, then SELECTED_FRAME can easily set selected_frame
> to some live frame and continue.

Something like that, yes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 21 Mar 2020 09:32:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 21 05:32:41 2020
Received: from localhost ([127.0.0.1]:45959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jFaUj-0006dx-5E
	for submit <at> debbugs.gnu.org; Sat, 21 Mar 2020 05:32:41 -0400
Received: from mout.gmx.net ([212.227.17.21]:38261)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jFaUg-0006dj-OR
 for 39977 <at> debbugs.gnu.org; Sat, 21 Mar 2020 05:32:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584783147;
 bh=zSV3GssfPET3S2r5lMc1GTuITqdgmjUefVNBQcmygaE=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=DDO8e474cRjArPyWI0ImgUXVyiRgbTFB6tsB34pYD5H5PEOL+9W7LchUA8oXY6qLf
 my3xVTqvZ+lCVdGSAGlKf0Xv4IPAZb3rdK/qwPWhpTy0+JIc+59f9KaeI863ttmoW0
 dO0BjCF05VRFQvuoYiKbQVhlhFXVLbxBgzoh/zmw=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.84]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MRmjq-1irtUf2ITi-00TGdW; Sat, 21
 Mar 2020 10:32:27 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> <83zhcce7n2.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <9a3df43d-4a83-bed0-9ad1-b59cf11b4c9c@HIDDEN>
Date: Sat, 21 Mar 2020 10:32:24 +0100
MIME-Version: 1.0
In-Reply-To: <83zhcce7n2.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:/UkRwJgrUYdLK0q3ZVuDbumVWCnDv+Y9vQSY+mQeYbKPcrpEGA0
 lJEM0KW3a5Gn19SCvMoVzWYz3QQrlPngCc9bKLE3loFGWjxbg8kl5j0aF3ygujCv9lF+J3S
 oVr4CvplHpMwmH2bVcLOngIklr0VfYa1srVyxSwtcypu7eAzr/s3AnboE8BBdctTThJkBfR
 K3nrdfB5az+rEJWjPwPiw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:eNOSvj1eZrw=:SypKTNH6m9bDIa/fBRNMZZ
 DgQdLJ2sMjCFeJSA8PQD3aEsr2VYTmK6/JBIRvhgbF8FNTZ5xTFULMVPDjfdYbs80Svx/rBt6
 CdL+JGkP1jAbnBdWIbaiUe/uYf0w+ZFMAF8eM+xJJVsPEYduWMDY8AVEPjmHBFv60qSkYJcOV
 YJyXvrXFjrv+QKyKAj3pijA+CjkgkZDzIHwOS3dr1e6wFE3Yaahv8Dg72oj3UUCCRQZM+lSlh
 vgj2R31tJKjzbc+kXvjhAxm6oYJ7yMmKz9IpJDZRJmmomKFtMffBa1OeuMy7uPwgUz2T5/5NO
 PEpCRu+Jlqnx99Q1o3azFltbjPLHZU6q0D3NEASoo3eZmHj8Uc3t8MxhkUZL5czuT4i6gm3bk
 IV+O7JGH/hDhh1JZFqX/EvLEa5ZtC5XWVgJXWLCZNHqgz2t9Us/Q702tOqf7ng7dKSnkh2VVe
 3cyMww3OwK6gPdjeMzgvSTH+mYxb7MwR2OW06qgTxb4Juia+gZWJqJYzJQYmA5BxL4/XmtRR/
 bxm01LC2M3NKyh33jnV56+pfVlh4nU+rDuvEEqDxRFLqp+4/dVUc6C9xQfPy4pAhBBLffL9Rm
 bVh3Kf+EQoRUhOW0lOLQajWYo4irmszxzlk1WicsRtB9BluTbEjZcAHL+2V9TkslKToC3bVjg
 sVE22IauXUleG8nOrS6NdQnteOyHmaB5DIjewqRV0w05ep1xjcuElSImwofGn1hcTMqOBn3L7
 7Mz3j0D4m9aXQebQgGUF5yU3Wdpe+OZnuNH0Wygho7PkGfe9CsPIHK7vdpU9eVqxF3uYc5u8+
 oxz3v9Li32sDTknR3aKr2Cc18Lg08Z6nm144lHin04b5ClQP6RKKw+/wQXQVOvaEv4UeYlKI5
 uxTIqJchp6MDd7mp6vG9xhsmdxILVjWpymcOlPDg0Tx+GF1TmPwbY39Uj6ab3i92eNmeJXsHm
 YZAJIM/4ISxGO/3bV/wMINgF6MbtrvRobVrsH/zXYdjXW5VvHuJJeASDS72oFxiUqkxJc1GIL
 AatJTiT2SNIE8iAKlUhCbMlIXAq25aLcVnVLwX8KpjpbsN5ep17T0mkunUuAakGljMBvMzI/p
 2TWyQrymPjTzg5SuGjqBBsXzW1wioplblIIPmLrCMgSZEnNcZzi/8uj7B+C//I4M2aGoBRe+w
 bHTIiiJC9TRog6Ks2aQSbNajAQgBhNIm40Wa9NznLmYmVTDyeorklVVvfQCLEyzh4crpPA+9v
 SQ+lkWuReY4kQhmHn
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> I'm afraid that we already might mishandle some of those simple cases.
 >
 > That just makes my point stronger, doesn't it?

Not really.  It's easy for delete_frame to refuse deleting a frame right
at the beginning.  But once it has accepted a deletion, it might become
hard to deal with all the consequences.

 >>   > The problem is how to do this without breaking legitimate code.  For
 >>   > example, changing the window configuration temporarily, then changing
 >>   > it back is quite legitimate,
 >>
 >> Right in the middle of redisplay, while constructing the mode line or
 >> the title format?
 >
 > Why not?  As long as things are back as they were by the time :eval
 > returns, I see no reason to disallow such code.

Such a change in the window configuration would take place in a state
where certain variables have temporary settings only.  Selected frame,
selected window and current buffer have been set by redisplay in a fast,
improvised manner.  I would never trust the outcome of save_window_save
or 'set-window-configuration' in such a state.

 > No, they are there in cases where we simply don't know how to
 > continue.

If that's the reason, then SELECTED_FRAME can easily set selected_frame
to some live frame and continue.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 19 Mar 2020 14:34:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 19 10:34:05 2020
Received: from localhost ([127.0.0.1]:43467 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEwFJ-0008P7-5W
	for submit <at> debbugs.gnu.org; Thu, 19 Mar 2020 10:34:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34315)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jEwFG-0008OT-PC
 for 39977 <at> debbugs.gnu.org; Thu, 19 Mar 2020 10:34:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48282)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jEwFA-000385-Vl; Thu, 19 Mar 2020 10:33:57 -0400
Received: from [176.228.60.248] (port=1677 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jEwF8-00083T-AT; Thu, 19 Mar 2020 10:33:56 -0400
Date: Thu, 19 Mar 2020 16:33:53 +0200
Message-Id: <83zhcce7n2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN> (message from
 martin rudalics on Thu, 19 Mar 2020 09:55:07 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
 <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Thu, 19 Mar 2020 09:55:07 +0100
> 
>  >> We already disallow deleting the last live or visible frame and the last
>  >> window on a frame.
>  >
>  > Those situations are easy to detect, so we do that.
> 
> For some value of easy.

Relatively easy.

>  > You are now
>  > proposing something more sophisticated than that, and I'm afraid that
>  > doing so is not as straightforward as in those few simple cases we
>  > already handle.
> 
> I'm afraid that we already might mishandle some of those simple cases.

That just makes my point stronger, doesn't it?

>  >> So the redisplay code, whenever it runs Lisp in between, could
>  >> simply set a boolean that will disallow deleting any window or frame
>  >> as well as setting the window configuration and other dangerous
>  >> operations that implicitly might kill a window or a buffer.
>  >
>  > The problem is how to do this without breaking legitimate code.  For
>  > example, changing the window configuration temporarily, then changing
>  > it back is quite legitimate,
> 
> Right in the middle of redisplay, while constructing the mode line or
> the title format?

Why not?  As long as things are back as they were by the time :eval
returns, I see no reason to disallow such code.

>  > so summarily disallowing such actions is
>  > too drastic and will be hard to justify.
> [...]
>  > All we need to do is avoid crashing and keeping the display
>  > up-to-date; any other outcome: error messages, code that doesn't do
>  > what the author expected/intended, and any other annoyance -- are
>  > completely fine, because whoever writes such nasty code will learn a
>  > lesson.
> 
> Hmmm...  I thought we have all those emacs_abort instances to ease
> debugging.

No, they are there in cases where we simply don't know how to
continue.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 19 Mar 2020 08:55:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 19 04:55:22 2020
Received: from localhost ([127.0.0.1]:41737 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEqxW-0005D7-JB
	for submit <at> debbugs.gnu.org; Thu, 19 Mar 2020 04:55:22 -0400
Received: from mout.gmx.net ([212.227.17.20]:39017)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jEqxV-0005Cn-1W
 for 39977 <at> debbugs.gnu.org; Thu, 19 Mar 2020 04:55:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584608109;
 bh=48BciicsdquvjgNUEHMYPrXrgwEJAHADCp5ZvzNr75c=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=JjYWsudszXXfIJa0R+XPmXLg7E+4m5QBfnsQ7BSuKEmkixJMlxMUSHfgcm9KDR+rT
 Fqot0Tq84O4WtPuitXOkc5zY3IuxsDjhFIDCJ5plkw/Y0BW7ajc645Dg+e3PgRwabJ
 +M0T1h6p0ojivmPGsre9GWODyeYmmebZPsAzij98=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.20]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MzhjF-1jRxvg2R61-00vhYn; Thu, 19
 Mar 2020 09:55:09 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> <835zf1fobf.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <4472dbf8-eec0-72eb-a4ad-c6b382d27f1f@HIDDEN>
Date: Thu, 19 Mar 2020 09:55:07 +0100
MIME-Version: 1.0
In-Reply-To: <835zf1fobf.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:yaT2m20ao5y8ydT4jJgLItdNuXlpfX+W9YfJAmeCGgsn/VupVkH
 xeLrn14YbpGAPoxpAGjleN+fODrCV2BDi5JAjb2XnfvvZXZDs4esINeBDahZ+6PNv2M4JjX
 SE9s4+T+xnJ5uGoSDUvZtYXE1Ty7d4746ii5PJrUAVvYRzJzKugwU36seYrkfqD0GTMQd5F
 MgIu58VDhxtAsIVcMeCUA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:wdaKKAmnta0=:sWL2F0iWqXe9sats6RFppS
 InfKdWPG4+l/GKPRwCYulpGc6E+bKQa/UXey4FxBXjaq8N0o9jh5+3TXg/UAQI7Rxx95tCQY2
 FhhCMr0388slWImovZUnEHZH93Z1v9gXlel3nKT9y2cI0rMbE7jRYT5j9A8SrVbQz2lPAWPiE
 0rDGtIXwPOXSnmGmNwZTiqTM45WEYl8ucFNfz7huzOmFVRr50vWL3D7KXhK/pdmSw3vdgpLPQ
 zLLCYST8y81yFMlqIHFeiiuYUlluepvOc1vpc0AKWiOv/y3QViF6dcbX5EMvqHmdnQw1y/Imo
 0DyvuotDqz63bCDfdC74mr4EQygWdpsx0V51sJ43Ew0Ydyv0QtF3KONl8kwqUx7Rmi2DAlNIu
 c0GGaqY/l43LwuArKF6HY703iOLuisExJ37GY4bMV1VFx41Uyhqi+98OD1W/ljmcNpR/dUMIu
 PWLI4OcrWMOAGiOu84gWmbuc+Wimv7hevYRX6Bs/qa0i5Euzm0os9TovRgcMPL+nH5YvNs1s6
 JOIzhiTFtL+kwDSMS1ONpwG2pUwlm460Y97RoGhHAxXO1qE0oC+H7ybnqaSM8iZMRbtbO5dp7
 kZS3tPzMImWCO/gWJVZn5sZ/+ht2daKsfpUEgfDb9tCOp5oB+Vnl7A6vGCmDxFMjUQ+h91kN/
 Crn7ky/Xgx9X0Jbsp0dj+TC1eUUL/eTcSuPNGp5y9RlhCdzfJQC/Umskl/b7/HAZdi6r8B/7D
 EmukjL/pA9xrsYNIWuVKYb3BGxVHUWPBDdh49S4IRNsQXsSzWAdBgdWGkrdEn9g4p7Tx5UjWA
 /1wsJ8jSQqJjkHckANDGSq/beDqF822KAbNEcyS5qBETdHqVuevoTaC5fV4kXUTdFDkFST7z1
 AaoBy0ILn4NVnoTQpBnlVwAgf6/Az8UpRUv8Q8gCgl+ZaqTU1mHt5fmg3r3BCm8mRpEB1WvN8
 QX1XA05TkEQHN24CFRV0uPEejZODYO/z8tPkjYjCfvKNNPt0A7WDTkhjrZi3qZ+Ph38upGGHU
 MN3kydszQA++/aOwM/2z5LJ421R5MoxeiKYAS/GHsb1cXTcoC7LFvFYG+7poNSxQdTUOADAX0
 ae8hXCQgdEAYIJmlEbh6+3kdeBTsz9wrAN1/MVSADRzBHvtohl2sNt8Soy/zd+mfREEoR/8aJ
 +5zJJpOxSZCsCGsZGkjX/1R3NPbZSZVcF3L8HkrBhSlvVe8bk6hVtdyYAtjpoHpqdoM9kon1B
 jsiDOh8RoHmqbHGlI
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> We already disallow deleting the last live or visible frame and the last
 >> window on a frame.
 >
 > Those situations are easy to detect, so we do that.

For some value of easy.

 > You are now
 > proposing something more sophisticated than that, and I'm afraid that
 > doing so is not as straightforward as in those few simple cases we
 > already handle.

I'm afraid that we already might mishandle some of those simple cases.

 >> So the redisplay code, whenever it runs Lisp in between, could
 >> simply set a boolean that will disallow deleting any window or frame
 >> as well as setting the window configuration and other dangerous
 >> operations that implicitly might kill a window or a buffer.
 >
 > The problem is how to do this without breaking legitimate code.  For
 > example, changing the window configuration temporarily, then changing
 > it back is quite legitimate,

Right in the middle of redisplay, while constructing the mode line or
the title format?  I won't object but this is something we should decide
ASAP in order to decide which kind of solution to pursue.

 > so summarily disallowing such actions is
 > too drastic and will be hard to justify.
[...]
 > All we need to do is avoid crashing and keeping the display
 > up-to-date; any other outcome: error messages, code that doesn't do
 > what the author expected/intended, and any other annoyance -- are
 > completely fine, because whoever writes such nasty code will learn a
 > lesson.

Hmmm...  I thought we have all those emacs_abort instances to ease
debugging.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 19 Mar 2020 03:48:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 18 23:48:52 2020
Received: from localhost ([127.0.0.1]:41638 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEmAu-0003Ej-0i
	for submit <at> debbugs.gnu.org; Wed, 18 Mar 2020 23:48:52 -0400
Received: from smtp6.ctinetworks.com ([205.166.61.199]:33434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <enometh@HIDDEN>) id 1jEmAs-0003Ec-Rc
 for 39977 <at> debbugs.gnu.org; Wed, 18 Mar 2020 23:48:51 -0400
Received: from localhost (unknown [117.193.20.155])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: enometh@HIDDEN)
 by smtp6.ctinetworks.com (Postfix) with ESMTPSA id 76AB4841E0;
 Wed, 18 Mar 2020 23:48:41 -0400 (EDT)
Date: Thu, 19 Mar 2020 09:18:31 +0530 (IST)
Message-Id: <20200319.091831.1677136392730703805.enometh@HIDDEN>
To: rudalics@HIDDEN
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
From: Madhu <enometh@HIDDEN>
In-Reply-To: <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN>
References: <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN>
 <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN>
X-Mailer: Mew version 6.8 on Emacs 28.0
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-ctinetworks-Information: Please contact the ISP for more information
X-ctinetworks-MailScanner-ID: 76AB4841E0.A96DF
X-ctinetworks-VirusCheck: Found to be clean
X-ctinetworks-SpamCheck: 
X-ctinetworks-Watermark: 1585453729.89902@v+Tsi1iehz/n6y2IhBumHw
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * martin rudalics Wrote on Wed, 18 Mar 2020 19:48:10 +0100
 >> So we are talking about :eval in mode-line-format (and similar >>
 variables)?
 > > I am but I might be wrong. Maybe Madhu can tell us where [...] 
 Content analysis details:   (1.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 -0.0 SPF_PASS               SPF: sender matches SPF record
 1.5 RCVD_IN_SORBS_WEB      RBL: SORBS: sender is an abusable web server
 [117.193.20.155 listed in dnsbl.sorbs.net]
X-Debbugs-Envelope-To: 39977
Cc: eliz@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.5 (/)

*  martin rudalics
Wrote on Wed, 18 Mar 2020 19:48:10 +0100
>> So we are talking about :eval in mode-line-format (and similar
>> variables)?
>
> I am but I might be wrong.  Maybe Madhu can tell us where that
> window quitting operation is issued.

I'm afraid I haven't made any progress in figuring it out.  Unless I
hear from you I will send you a mail shortly with my setup (prereqs:
sly and some supported-by-sly lisp implementation already installed on
your system) with the recipe for the crash - (I don't want to post it
to this list)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 18 Mar 2020 19:36:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 18 15:36:22 2020
Received: from localhost ([127.0.0.1]:41440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEeUI-0004ov-Gr
	for submit <at> debbugs.gnu.org; Wed, 18 Mar 2020 15:36:22 -0400
Received: from eggs.gnu.org ([209.51.188.92]:47629)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jEeUH-0004oh-ET
 for 39977 <at> debbugs.gnu.org; Wed, 18 Mar 2020 15:36:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33102)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jEeUB-0004of-Nc; Wed, 18 Mar 2020 15:36:15 -0400
Received: from [176.228.60.248] (port=4084 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jEeU4-00072U-1J; Wed, 18 Mar 2020 15:36:15 -0400
Date: Wed, 18 Mar 2020 21:36:04 +0200
Message-Id: <835zf1fobf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN> (message from
 martin rudalics on Wed, 18 Mar 2020 19:48:10 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
 <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Wed, 18 Mar 2020 19:48:10 +0100
> 
>  > I'm not sure we can detect these actions reliably, as Lisp code can be
>  > very complex.  I think we can only handle the consequences of those
>  > actions.
> 
> We already disallow deleting the last live or visible frame and the last
> window on a frame.

Those situations are easy to detect, so we do that.  You are now
proposing something more sophisticated than that, and I'm afraid that
doing so is not as straightforward as in those few simple cases we
already handle.

> So the redisplay code, whenever it runs Lisp in between, could
> simply set a boolean that will disallow deleting any window or frame
> as well as setting the window configuration and other dangerous
> operations that implicitly might kill a window or a buffer.

The problem is how to do this without breaking legitimate code.  For
example, changing the window configuration temporarily, then changing
it back is quite legitimate, so summarily disallowing such actions is
too drastic and will be hard to justify.

>  > Which is why I proposed to deal with that in SELECTED_FRAME
>  > (we could, of course, find some other place where the disastrous
>  > results of such code can be detected).
> 
> SELECTED_FRAME does not necessarily have to abort.  It could return some
> other live frame, maybe selecting it on-the-fly, in the hope that the
> configuration stabilizes sooner or later.  But this doesn't help with
> the fact that such an :eval can do a lot more nasty things like deleting
> windows or killing buffers.

All we need to do is avoid crashing and keeping the display
up-to-date; any other outcome: error messages, code that doesn't do
what the author expected/intended, and any other annoyance -- are
completely fine, because whoever writes such nasty code will learn a
lesson.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 18 Mar 2020 18:48:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 18 14:48:26 2020
Received: from localhost ([127.0.0.1]:41406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEdju-0003Wl-5V
	for submit <at> debbugs.gnu.org; Wed, 18 Mar 2020 14:48:26 -0400
Received: from mout.gmx.net ([212.227.15.19]:34109)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jEdjr-0003WT-Nr
 for 39977 <at> debbugs.gnu.org; Wed, 18 Mar 2020 14:48:24 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584557292;
 bh=Qt6aQEWFYG1YvjapBOFXuSwevzeJhLLm+IpSkC1/u/o=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=RQkXJ5EGQEoim/0iqYd8N9YUmj4wnOAIghMJHj5EREp2pI6E4XYr25KxyAx+9hMyN
 fCvpRLOYgHgLkptP2P9ieo4a7xMYtGkHRB8GssOlYv7pFUnAHwV4qAngYF9Feo3doD
 SSK5tuluX17iWjzHZmQKA4glMchuz6HvplsyJ26c=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.248]) by mail.gmx.com (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MLR1V-1iwhTj1WFf-00IU8J; Wed, 18
 Mar 2020 19:48:12 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> <83imj1g1eu.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <bc03fa9f-9792-6de8-ff5b-53f4b099296c@HIDDEN>
Date: Wed, 18 Mar 2020 19:48:10 +0100
MIME-Version: 1.0
In-Reply-To: <83imj1g1eu.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:Q3iPIBUTT+jsXeHB+2J7WNQTqhcje2RjeNBpIVCe+HG4q0z1Tlm
 AcgbiEZCPClY5wjoJtpyAeXQYYUMoOncI+FsLRq2DGMqKzUzY/nzhASjcElTSiD/RX/hJku
 nyKUld4L0Ovdc66kI2uc156SChIx2pdHoXLVmvkFtJx/Ei1SSgVIdB+EFzYaoW2KFTvvJFE
 f+7eBwPY7cvpIAVX6b/Ig==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:ne8kAYsfAI8=:YdBmrajKftsv7Y8IouZhR9
 kUjbLswX5J233sF0JePLvte6oxWFO/jKeNHbLRWjRrslhVGCFOX8oULTh58zIQIDgwdJdg/EU
 huJ5DFVXbKtJPIQpUuu0Fm+hbQ8vXUxW/y1ohl+WNebNgTORocnQZmM3OVi5Bk0qPqHpo6AE6
 BrrPofDqRLpPkzQHDNceuberazOdI9JpH88v1SFYext9uFCWOgitEz4cKNMfRhBBtv6N4Tljg
 3qbZqE5YB6aUP+HUYhCxD+WsRU9ckFRZLU31UiO+xOlYyr09/Lzpfc/fJTBWFNaJPsdYttQqb
 TN8bGr1elKw52RmUrI7QoNPgih2ZhGg58JGlvDxrJbNygQCitndbTq+Hm76oeFWTtaSrCoSFR
 gmK4sfx4gsYHFZ80aaEEMiLoNU0ulXyvHsqOLY28ULoqcDIFJHExUDvMLcp4tyRAfssx0ysez
 e3wCchirvW7Od22FNoGDiJw823AK9+hat8dgNQzKDC+jUfaArCjr6DTl/y3zWUZCuxUjSxkty
 npldodCyCtRtgeHzedlx3F3ip4h84JSNxwZ9KDnwNJKxoLnVWaP/NIKwJgZMjSEWyB8YI2g1L
 /3kZvVhda85z+kp/jb8qVxU6FUXeZGs8HCwQianQSeJNJRdb5/fiXQDiQ2q85lqWRRl9beL3T
 ADJyouxLxF1E+pV3MiVVCF/ALNRFswsvVL3jIpTFSxuTpiukE+qhENa3j4T9eBXlhOHc2nufM
 tNKQ8BYtotyGBxnF7K0iCO+bDpK9YJGNJ2hqzDQZwsz5mcFD9wZuugZVH16eUgAlfflOTi8bB
 ZyxYzSCgTV88fidWNFpjw4gLOQ2TTX+uQ2149dd0lzXMwuk72TICa1XdAZ7fMPIUBKXNNbypD
 3xzJ48SL3Qv/pUQu8EwnR5ZeeXg1E73wg9D4QJq3NmzWZtEDiygOeeZy/j/s89jALHah4UWw/
 j6jhH+CmQimL7YLp1ctRgqfwpjx3HvJmsH0jJ5SUHi6hmcYQed+QLTI6qDbFaBpBEURqZA6g0
 nmI2ShC02ZTDbGVhb/YPiRecLY9BeWv3JRFWXiizh08piRaiSyIPZAUcjPLqp0aHO+lGpzcvy
 CoQ15+0/RV31q7wqkKTvqK5RY55OnQ2YunS1dmY2ZHFQXGUHP8PEZ/jQDmjJ3qsaLoHjx65C5
 yoEco0cqS2YtK6NXkGdrgqQnle1A6mtyMz1kQig5K8EfjHiZcKO1ERqlN+b4mlVLxXQHit6gr
 3GSl2T0WgYEEwfFlw
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > So we are talking about :eval in mode-line-format (and similar
 > variables)?

I am but I might be wrong.  Maybe Madhu can tell us where that window
quitting operation is issued.

 > I'm not sure we can detect these actions reliably, as Lisp code can be
 > very complex.  I think we can only handle the consequences of those
 > actions.

We already disallow deleting the last live or visible frame and the last
window on a frame.  So the redisplay code, whenever it runs Lisp in
between, could simply set a boolean that will disallow deleting any
window or frame as well as setting the window configuration and other
dangerous operations that implicitly might kill a window or a buffer.

 > Which is why I proposed to deal with that in SELECTED_FRAME
 > (we could, of course, find some other place where the disastrous
 > results of such code can be detected).

SELECTED_FRAME does not necessarily have to abort.  It could return some
other live frame, maybe selecting it on-the-fly, in the hope that the
configuration stabilizes sooner or later.  But this doesn't help with
the fact that such an :eval can do a lot more nasty things like deleting
windows or killing buffers.

martin





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 18 Mar 2020 14:53:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 18 10:53:40 2020
Received: from localhost ([127.0.0.1]:41025 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEa4i-00043g-Bo
	for submit <at> debbugs.gnu.org; Wed, 18 Mar 2020 10:53:40 -0400
Received: from eggs.gnu.org ([209.51.188.92]:60017)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jEa4h-00043S-NL
 for 39977 <at> debbugs.gnu.org; Wed, 18 Mar 2020 10:53:39 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:55636)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jEa4b-00036q-UC; Wed, 18 Mar 2020 10:53:33 -0400
Received: from [176.228.60.248] (port=2517 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jEa4X-00024i-W2; Wed, 18 Mar 2020 10:53:33 -0400
Date: Wed, 18 Mar 2020 16:53:13 +0200
Message-Id: <83imj1g1eu.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN> (message from
 martin rudalics on Wed, 18 Mar 2020 10:12:32 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
 <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Wed, 18 Mar 2020 10:12:32 +0100
> 
>  > Feel free
>  > to fix this (whatever it is) as you see fit.
> 
> The longer I'm looking into this, the more I think that we should be
> much more restrictive wrt what an :eval form in mode line or title name
> processing should be allowed to do.  Tab bars could provide even more
> confusion.  I think we should disallow any such :eval to kill buffers
> and delete windows or frames at the very least.

So we are talking about :eval in mode-line-format (and similar
variables)?

> Maybe it should be also disallowed to select a window or frame or
> whatever the display engine tries to restore after processing these
> forms.  Such selections would be usually undone anyway by the display
> engine.  Probably, we should disallow such :eval forms to modify
> "anything" at all but I have no idea how to do that.

I'm not sure we can detect these actions reliably, as Lisp code can be
very complex.  I think we can only handle the consequences of those
actions.  Which is why I proposed to deal with that in SELECTED_FRAME
(we could, of course, find some other place where the disastrous
results of such code can be detected).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 18 Mar 2020 09:12:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 18 05:12:48 2020
Received: from localhost ([127.0.0.1]:39811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEUkq-0006Vx-AB
	for submit <at> debbugs.gnu.org; Wed, 18 Mar 2020 05:12:48 -0400
Received: from mout.gmx.net ([212.227.17.22]:58071)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jEUko-0006Vj-5b
 for 39977 <at> debbugs.gnu.org; Wed, 18 Mar 2020 05:12:46 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584522755;
 bh=9y8VQsQt1UZHRpirJCS9O8DWtPw+1pgfOGSi9232//U=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=Nrapo7YFZD/gtw6sq/Cz7PddjQ8/6Hl9CDJ+hWMysHryNP4OEAij4YijdyAP0lMbk
 UnsfkyXyrnmfvw712oRIjpBoFr/qKKX2gw++KFpTG5XXmVF8FiiudUAhTzY42BKQG7
 nL0tK60TyMyIn71nSnA0u0hKlAw3JJaCgNCavScM=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.17]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MulqN-1jWA7s03mN-00rmEs; Wed, 18
 Mar 2020 10:12:35 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> <83sgi6g461.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <90ac4084-4fbb-b5d7-6a7c-597d8f08e88a@HIDDEN>
Date: Wed, 18 Mar 2020 10:12:32 +0100
MIME-Version: 1.0
In-Reply-To: <83sgi6g461.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:f8XndkMGsPynl0oX6/sXkbAtLKnXqehod658U0anviCazO6DOnw
 pmK0/5xg0KIfIXy/02Gcsy+LP5vW58+mQj76ySCOMhuNk0TQ5VIQGaKQ2JKlXPdugWcv8mn
 AimXvZuOJNQIp4vHdhLnMtAsTrKXsVTPJfZBvFx8C4Twgo6AX8Qch6pVma65xVGWobWVE99
 7+nIHkupZdwbYiDrsjiZw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:qQlSO7CcvII=:ovR//lbRtREJn0IP26JCdX
 LrAB3FqIYKmSDmc1YWlfTE31lDfduJDsz90veejeFIge83aFIFpLqBgSRydf2iCUQebYh+B1m
 uobGwCdSlj6EuYl97zWAeqUJwJTXRspN5gsFzmnFnrK4grgxDC53OHQdlvTYM5YPRvDJr51/2
 L9aJvKy25KqZNTn8Y4yYP+NzYV4iQsQuaqIsGWkIA5IJd6u2QLqbFPYxTcTrJ4Na95kILZdbq
 +mgzbHGrI0DYEwEKzxSdQuXlrs8KVGK3fEAbfEh3VZeqIHCp1OMAoq7qJ7afwe0M53W1VroAA
 iYP4oy/g93rm1ZAA4UHpMui7NE/tXGnMX9n5v0vozsZLVLPzZh4cqzTG9O3u1i1unLkceQp+p
 x6TqIWKMhHSJgoCMcBEh+ZFBNQOwfRjMxKUEPlsm+5EgvNmhx8quKWMu0iA9YyqTbVJpXuvlF
 7ThWf2tfNvn/6QOeu7PICyaNwsfoGkIS4A/5pBKpPsOU6mfericvbFbv5O3FgpbOzVSuaKCtz
 ZA58gyKE+D+Y3ok3Btw6GQSER+6KOYcekGJMfl8bZ2QcrYNEx7qkS7oyFMjum3qj2ivAnv2Y4
 qvLJAY/rHyfJY7IiUWW2vVYDYBSKrW28gvrr8rzdSQTBpUQ50qGvs1n+ef6Fm9krWfkwSDbdu
 0jTYS3cqgl2PUEv+wiYAFNlWSKvMaMx6v/8tWj5WypUzgdzII8qSzzSqzjImBnwWJhHIOB8V3
 6lgvp6TNXSZCpS25W/cI4kMDzHsJrMbyX2qEQLd8VFaiFfah3oX/1+4uEHvBvbW46SN35GqNr
 lDuvk4hNqOH/5aNuU5GbNOtXnDAK41+K0G8zlNBdECTDFpwFYELSMepdyKU6bKLORcz8WifxL
 kZyekUTI7R8e5AAhk2vCLtN8s4SkapZghxBoXr30tQ2AL/5ENNZYQ+ztzDdLusZXjrral6OIs
 Dt6JGY3+9gUCkErYZqe8cgONtaJm1vGL/OEOwXEa1iV1pivTiHved3ihiCa7thMmtJKTdcq0p
 HS9kWLDtrG02z5rRHMlgQceI+1ftXbwJpwx5TW43SpbGXSVqwKIGIY39d46B4bkMWC5lNwkPu
 Sr2+RKNgklv/jC4h/G+kA47CsEJL838h7PHCZFrXmTMHW87j4j608sU3lSxK6oxkpms0wraHP
 kAxdC4MRlmSld7IfoC0tH0/LTXq+8FhqNOn2aHLB+7zFR8vIgaiYw9ETgg4NWSATwuGLYyrM7
 7RnfhrCNDvlgyGtPu
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I'm sorry, I think I no longer know what we are discussing.

For me the present abort is just another instance of Bug#29726 where you
said:

   The reason for the crash is that the ':eval' form which you have on
   the header-line can delete the frame whose header-line Emacs is
   redrawing!  The Lisp-level backtrace below shows how delete-frame is
   called from your code; hopefully, this backtrace will allow you to fix
   your code so it doesn't do such nonsensical things.

Only that in the case at hand 'delete-frame' does not try to delete the
frame the display engine is working on and so your fix for Bug#29726
won't catch it.  Rather, the frame that gets deleted is the frame that
was selected before the display engine started to process the :eval
form.  When, after processing the :eval form and the containing mode
line or title bar format, the display engine wants to restore the
previously selected frame, it sets selected_frame to a dead frame.  And
the next attempt to use selected_frame via SELECTED_FRAME results in the
abort.

 > Feel free
 > to fix this (whatever it is) as you see fit.

The longer I'm looking into this, the more I think that we should be
much more restrictive wrt what an :eval form in mode line or title name
processing should be allowed to do.  Tab bars could provide even more
confusion.  I think we should disallow any such :eval to kill buffers
and delete windows or frames at the very least.

Maybe it should be also disallowed to select a window or frame or
whatever the display engine tries to restore after processing these
forms.  Such selections would be usually undone anyway by the display
engine.  Probably, we should disallow such :eval forms to modify
"anything" at all but I have no idea how to do that.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 19:41:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 17 15:41:32 2020
Received: from localhost ([127.0.0.1]:39570 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEI5k-00061t-8G
	for submit <at> debbugs.gnu.org; Tue, 17 Mar 2020 15:41:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36853)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jEI5h-00061b-0S
 for 39977 <at> debbugs.gnu.org; Tue, 17 Mar 2020 15:41:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40417)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jEI5b-0003XT-8s; Tue, 17 Mar 2020 15:41:23 -0400
Received: from [176.228.60.248] (port=3965 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jEI5Z-0007o1-K4; Tue, 17 Mar 2020 15:41:22 -0400
Date: Tue, 17 Mar 2020 21:41:26 +0200
Message-Id: <83sgi6g461.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN> (message from
 martin rudalics on Tue, 17 Mar 2020 19:39:18 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
 <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Tue, 17 Mar 2020 19:39:18 +0100
> 
> > Why?
> 
> So that SELECTED_FRAME does not abort.

I'm sorry, I think I no longer know what we are discussing.  Feel free
to fix this (whatever it is) as you see fit.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 18:39:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 17 14:39:35 2020
Received: from localhost ([127.0.0.1]:39549 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEH7n-0002Jd-4Y
	for submit <at> debbugs.gnu.org; Tue, 17 Mar 2020 14:39:35 -0400
Received: from mout.gmx.net ([212.227.17.21]:56353)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jEH7k-0002JH-Ef
 for 39977 <at> debbugs.gnu.org; Tue, 17 Mar 2020 14:39:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584470360;
 bh=07VKyJes7yMgJBtzkNDwOK4B+4GeeSfUiGuoEyVy9cU=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=dKr+fzeCAOxwkZlJbWnV28SZhk4HLYE3Gx1n+cvTi5AGCeo3dhZZVdIZQdY6kZJql
 mZmiebVjOyMaYpcHFTev9bbPWdGoxkYZeQV4IkN4YvdW5QbfD4+R9dV261nBMBywLn
 iV/yKtnIfcynsFq89OBxDdxUtAznh3sMOv025bzs=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.240]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Ml6qC-1ji8pg0OQ0-00lTdU; Tue, 17
 Mar 2020 19:39:20 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> <83tv2mg9j0.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <9684641c-a59a-4ed6-a6b4-d3238f789050@HIDDEN>
Date: Tue, 17 Mar 2020 19:39:18 +0100
MIME-Version: 1.0
In-Reply-To: <83tv2mg9j0.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:OXQThl9L/BwuNvg0gJHuTDvuCLmJjg2zC6hOb2UR55otKPZZvcM
 Ix7zwCiAp7LutspWyA6fjdQcK485c128H0BqOiHaKM3NNUVtfLNvGZkG3RqHPXaAU7zIgdQ
 u131bfaGkI+324PTaRu27kKrOzYn6RP2JwdV/anXVXBmVH0IwY8mLgHomwfQi6Z5Ft+3CFH
 HJ9acdx6ntRvxnKG15nqw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Mr1OhQlfeMs=:+j4egJ1P8nguyP+NTWqxSe
 M/RzOGSAWbvlHXtM7n1qwI/1Pupou13kvKVY86ZwjFkhciwAsDZ06ch7MJhgboOqSWnwggBjZ
 Uzh0K9k0J4vng024t4cu7XnsKsejisOdZE7qid+WsP8G84Mn3xoyE7Nr02kqNIRDfx8ZrVzpA
 UWllwEw1vgMmBIDUJA4aWysWLad/E2WwnCPz4uDK8yIZ81423LjtqJKoTDLE7NuyL/wgmusiG
 0nqNDo/Z0joJmhghq9jJK01gXQ8y1+GDAHntDaO2hY2njsssg4RtirDyqezSzQd7ddSZxfTW6
 RZA/wl8Lp7ShqrSe20D7xDu93HVvMH2wTawFw8TaAyogg8o6PYmDzKW5ROz6bdW9AHFSddQtq
 TnjwCVosIQtqNpgmwRlyqMZLfpBP+VfT750lWneRnpn0ckbXUvvQHd0XNQvEcFMxzYrVJMi+6
 7makmy0Wn7R1tN66Otb7VuXMg3GYDgVlBIArGH6YkJvFEl1nUL5w9Bfe1xC8BD4tqcS2vC1QL
 9S4b8POGv0lvbJ7nI08GS7cBHaei5U+ymF866kv9MG4DZnbHQ2V/JAnO0jM3PuSqbH8YZAbRc
 e1/fUu7TQfLbgkVETY5dW9AbmDd4aNEEPtJotxA9CmxJg7BNvu6UFzaBjbyLuMgBSBd6CgLAJ
 rpNcYkbIpbyp3e41XV1vAa8hba1nTJ1Z5t2TFRYVCa5Hxg99XkcatQRA21RxxyAyLQ0Vzqmhx
 4MIi8UX4X1Xx4STvMjXgePn1rkFo2E6dObM4xW84fIcTpGoS5AsDcfbi3VBQOVPWmjvElW4Xg
 3sZ3ATf4rDVCZ79Yoi7+4+LJoXxLJuwZLh74rLtoYMGEMQJxNOy0d4VbO+yVpBZhPBO5LOKuv
 xTICSkCk+bLXphDHEIz5iaxrhJAu8PupvZZ8B9K6wvMDNzMb9JLA1aU4MKYfcOJeEX5bqRE90
 BZ1jk3dRcM1Cm2NNFOvSP83X0VkPvUnetBO1vbAcdWykxrInRtQZ1ODouqsuzpUFSZdX//NJb
 UiSudbvpimQyLeCzyhOM+GRegR8831fP6qpwGFxhZVgmc02bDwiwolIT+KLfReqdaB4cwNNNZ
 pW5+7ARvkQnT/NSMBYej0cAML4SI/PY9/Ep6iXVbTRQEgwFlBO1ug4p/1rGbG0FalwHJUUMd9
 lz99+h/4i5i4WmgPTyOxxF+BRENAIxDX8ABy3/PwZQv60bmIVwOTTOr6I9Y4ANkSbl2BHkUzs
 9OwnMuI1cT12ZDjaX
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Why?

So that SELECTED_FRAME does not abort.

martin






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 17:46:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 17 13:46:16 2020
Received: from localhost ([127.0.0.1]:39533 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEGIC-0000sU-EM
	for submit <at> debbugs.gnu.org; Tue, 17 Mar 2020 13:46:16 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37024)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jEGIA-0000sH-LI
 for 39977 <at> debbugs.gnu.org; Tue, 17 Mar 2020 13:46:15 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38230)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jEGI4-0001EI-PZ; Tue, 17 Mar 2020 13:46:08 -0400
Received: from [176.228.60.248] (port=4786 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jEGI2-0004nt-3P; Tue, 17 Mar 2020 13:46:08 -0400
Date: Tue, 17 Mar 2020 19:45:39 +0200
Message-Id: <83tv2mg9j0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN> (message from
 martin rudalics on Tue, 17 Mar 2020 18:31:18 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
 <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Tue, 17 Mar 2020 18:31:18 +0100
> 
>  > You are proposing that we find all the places where SELECTED_FRAME is
>  > used and fix them one by one?  I thought it could be better to fix
>  > them all at once as part of SELECTED_FRAME.
> 
> We are still miscommunicating.  I only want to fix the parts that
> restore selected_frame so to make sure that they never set it to a dead
> frame.

Why?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 17:31:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 17 13:31:33 2020
Received: from localhost ([127.0.0.1]:39525 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEG3x-0000VB-JH
	for submit <at> debbugs.gnu.org; Tue, 17 Mar 2020 13:31:33 -0400
Received: from mout.gmx.net ([212.227.15.15]:56143)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jEG3v-0000Ux-AL
 for 39977 <at> debbugs.gnu.org; Tue, 17 Mar 2020 13:31:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584466280;
 bh=E6+C81LiFPq+yytggIeTbdGNn0GG5OYlbi+D5UsRV3I=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=GfE9VbJH5oXAmYlUH+/Y1WgM8L3yUFrSmfvWgcpGR49CWiHxouKd/Lgm1H8wk5xFM
 RC8Hzw5PhsCoS7H00AaXgA98t1/NjV09T0BJTn3QEaeP0b/G35VvBsercIavIJ/Qkb
 p+DmySC3CJGUVa0SSgXAibx+rEJXTwJ475IVEVIQ=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.16]) by mail.gmx.com (mrgmx004
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M26vL-1jGAnh12Kn-002b8C; Tue, 17
 Mar 2020 18:31:20 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> <83y2rzf08m.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <7a0b9999-6778-6235-fbc9-2a24b4e3bc53@HIDDEN>
Date: Tue, 17 Mar 2020 18:31:18 +0100
MIME-Version: 1.0
In-Reply-To: <83y2rzf08m.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------D1A4A937170B4EA6EB2BB62D"
Content-Language: en-US
X-Provags-ID: V03:K1:pHJANxacxx4Cm6ltzDtm+T1RVtWa2j78GZ/uBzHvRIRn/tDbMNj
 oYGiJnzsnT2lsUU6roNRQcnhO/Hzf91VNi9RaH7M+xJvcNqDwqn+XIR22zl0JwDY+t5Rqha
 v5OKhW2rKIc7jljGNRYrhpXhyPe0VVU6++HNsH8lSInC8RlqDtoh8vbGxMRkJJJh6PWfjdb
 1bLUSmL4+kztvv5iQrJ2w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:0hbxc1SKLlY=:Bp0EdcChyUHIiNqYDiDuUp
 XOPRQKz9EnVZRzaZiOTwmO600o/R2uqEryGtLjp2VN35ZWfeg5SFr7fXp5yF5PITdRYPZ54en
 Y3j+4cYmRaGI7p0J0Mn7MyFk1s2Av0mSWmnnncmv7r19jwgWfJsTj9Y6QKlrLIhNzFeCGP82Y
 hoV6LJcQHsrJaFKNmnvZWBOvq0cfhG/NIVKqzWQRCBXH8gDWA7i+0wGFqBRSBD8ud9PDvnZlN
 669hZNEecOVhZuKKWKkfromdlvPG8KhTGfORDtCmeKG4zN4cvg7Vvyb6Ib9ZUi4+vBOifiitN
 uEgWTgZ+TiprqH0MASZal8DP9wDVSPmNApfqcFLcgkaDoG9PDdy5gEXMGtt+TSb1YjvZQR5Ly
 MW+PG9a1i0vt/LgalDxrdcFZBnX3RloZ5JgBjWqJe17sYHOtJbtIzHzqnnrYMOJJcGGY6ZVCz
 eeCXGlAjBOiVhiSA8ldvvNQfQhlhLxFh8Xd82AZTrtu/dQNMejg4YHT7vunc664yKdKNZTjY0
 UcsOIamotAeGTJNg2j8v/6aaaHICmQBbmvKneOLM6CCoDCe+zJa2ulf2PKaXYSRrASkujRC7o
 mdyddZ+dYVMlTVs/tFqdRbv/a99Y+vy4C7B0BMKlDIEIDR+QOQPUZQPxQHhcLk36DSKS37Yye
 RLGL4imlSUMI2SlJaiegl6Gchx2Fq4Lt5Lb9uFjAgHpXmHWpHkx8oCjDmXJpPOuHmdX3P0eCG
 E5Ie9EHuIHwyQujz+W9usKWidUr+eFNk5Wct4GsA9Cs9iryx0jqC/Ey6FbZeNkj1hLJTqFJzf
 TE2znbs535Q3yHe4dMEI9GwMYmGGBKKI22pSYURpfNAQoaIA0aPJLWVPOswPrV+3bhIU08MjD
 Z8OS7PLumP1AAtyBaq6ljZyGl0tO53cniSVrpfr9JUzFVU3f3pEO+PL8MweB0vouTXshb55SO
 phKl0kSRIAOFkQHF2oJ0KqvGJMXj1X28UH0M6jEIjaGER6/AAslqm9XiuBCj05wmkunu+/zOU
 YzSTw2VMBJZQofC/7LiMurZLZuQOjbZ2P2gnlDCRa7mP/28cdbCT5LGWS3YeUFHU0pfxS1uLe
 PNQNUngNX7nRgTLQLG7iIcO/LDcaHbUc9GpwF1wk9Cc+kc8QI8szMiLcY9161EQbxpi9YQXCi
 sQvHgkgWMIE7hzOBoGhDwIlEbatKuLz7m9VbbObe7zpDfFmHd1ahlhtbKmP+0iQbfwPaeWx8i
 q/7GHVd/AI5LYKGEh
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------D1A4A937170B4EA6EB2BB62D
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 > You are proposing that we find all the places where SELECTED_FRAME is
 > used and fix them one by one?  I thought it could be better to fix
 > them all at once as part of SELECTED_FRAME.

We are still miscommunicating.  I only want to fix the parts that
restore selected_frame so to make sure that they never set it to a dead
frame.  See the attached selected_frame.diff.

martin

--------------D1A4A937170B4EA6EB2BB62D
Content-Type: text/x-patch;
 name="selected_frame.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="selected_frame.diff"

diff --git a/src/frame.c b/src/frame.c
index 88d6f22fc0..ef42f230ef 100644
=2D-- a/src/frame.c
+++ b/src/frame.c
@@ -1466,6 +1466,11 @@ do_switch_frame (Lisp_Object frame, int track, int =
for_deletion, Lisp_Object nor
       tty->top_frame =3D frame;
     }

+  if (!FRAME_LIVE_P (f))
+    /* Return nil if for some reason FRAME has become dead now
+       (Bug#39977).  */
+    return Qnil;
+
   selected_frame =3D frame;
   if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
     last_nonminibuf_frame =3D XFRAME (selected_frame);
@@ -2009,8 +2014,6 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
 	error ("Attempt to delete the only frame");
     }

-  /* At this point, we are committed to deleting the frame.
-     There is no more chance for errors to prevent it.  */
   minibuffer_selected =3D EQ (minibuf_window, selected_window);
   sf =3D SELECTED_FRAME ();
   /* Don't let the frame remain selected.  */
@@ -2066,10 +2069,17 @@ delete_frame (Lisp_Object frame, Lisp_Object force=
)
 	Fraise_frame (frame1);
 #endif

-      do_switch_frame (frame1, 0, 1, Qnil);
+      if (!EQ (do_switch_frame (frame1, 0, 1, Qnil), frame1))
+	/* Error out if for some reason FRAME1 was not live
+	   (Bug#39977).  */
+	error ("No frame to switch to found");
+
       sf =3D SELECTED_FRAME ();
     }

+  /* At this point, we are committed to deleting the frame.
+     There is no more chance for errors to prevent it.  */
+
   /* Don't allow minibuf_window to remain on a deleted frame.  */
   check_minibuf_window (frame, minibuffer_selected);

diff --git a/src/xdisp.c b/src/xdisp.c
index 3a8b5e3f1d..e573c7cf88 100644
=2D-- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -12608,6 +12608,16 @@ fast_set_selected_frame (Lisp_Object frame)
     }
 }

+static void
+fast_set_selected_frame_if_live (Lisp_Object frame)
+{
+  if (!EQ (selected_frame, frame) && FRAME_LIVE_P (XFRAME (frame)))
+    {
+      selected_frame =3D frame;
+      selected_window =3D XFRAME (frame)->selected_window;
+    }
+}
+
 #endif /* HAVE_WINDOW_SYSTEM */

 /* Update the tab-bar item list for frame F.  This has to be done
@@ -12681,7 +12691,7 @@ update_tab_bar (struct frame *f, bool save_match_d=
ata)
 		       XFRAME (selected_frame)->selected_window));
 #ifdef HAVE_WINDOW_SYSTEM
 	  Lisp_Object frame;
-	  record_unwind_protect (fast_set_selected_frame, selected_frame);
+	  record_unwind_protect (fast_set_selected_frame_if_live, selected_frame=
);
 	  XSETFRAME (frame, f);
 	  fast_set_selected_frame (frame);
 #endif
@@ -13625,7 +13635,7 @@ update_tool_bar (struct frame *f, bool save_match_=
data)
 		       /* Since we only explicitly preserve selected_frame,
 			  check that selected_window would be redundant.  */
 		       XFRAME (selected_frame)->selected_window));
-	  record_unwind_protect (fast_set_selected_frame, selected_frame);
+	  record_unwind_protect (fast_set_selected_frame_if_live, selected_frame=
);
 	  XSETFRAME (frame, f);
 	  fast_set_selected_frame (frame);

@@ -25009,9 +25019,14 @@ display_mode_lines (struct window *w)
       ++n;
     }

-  XFRAME (new_frame)->selected_window =3D old_frame_selected_window;
-  selected_frame =3D old_selected_frame;
-  selected_window =3D old_selected_window;
+  if (WINDOW_LIVE_P (old_frame_selected_window))
+    XFRAME (new_frame)->selected_window =3D old_frame_selected_window;
+  if (FRAME_LIVE_P (XFRAME (old_selected_frame)))
+    {
+      selected_frame =3D old_selected_frame;
+      selected_window =3D old_selected_window;
+    }
+
   if (n > 0)
     w->must_be_updated_p =3D true;
   return n;

--------------D1A4A937170B4EA6EB2BB62D--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 15:52:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 17 11:52:02 2020
Received: from localhost ([127.0.0.1]:39445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jEEVe-0004HU-Iu
	for submit <at> debbugs.gnu.org; Tue, 17 Mar 2020 11:52:02 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50386)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jEEVd-0004H0-HK
 for 39977 <at> debbugs.gnu.org; Tue, 17 Mar 2020 11:52:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36769)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jEEVX-0007y8-P9; Tue, 17 Mar 2020 11:51:55 -0400
Received: from [176.228.60.248] (port=1323 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jEEVT-00072c-Sg; Tue, 17 Mar 2020 11:51:55 -0400
Date: Tue, 17 Mar 2020 17:51:37 +0200
Message-Id: <83y2rzf08m.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN> (message from
 martin rudalics on Tue, 17 Mar 2020 10:38:11 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
 <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Tue, 17 Mar 2020 10:38:11 +0100
> 
>  > Why does it matter which SELECTED_FRAME crashes?
> 
> Because the next crash may happen at some time in the future.  Why not
> cure the first crash we have right away?

If we can cure it, sure.  But I don't yet see what kind of cure are
you suggesting.  And in any case, the cure is not in SELECTED_FRAME.

>  >>   >> As far as frame.c is concerned, it should do something like in the
>  >>   >> attached patch.
>  >>   >
>  >>   > We cannot punt like that in the display engine.
>  >>
>  >> Why not?
>  >
>  > Because we must have a frame that we were supposed to redisplay.
> 
> Either we are miscommunicating or I' m just dumb.  I would in no way
> restrict the display engine in choosing whatever live frame it wants to
> redisplay.

The original crash, and the crash you reported a couple of messages
upthread, are both in redisplay, though.  So I'm looking for a
solution to those.  Assigning some arbitrary value to a local variable
and/or switching to a different frame can be such solutions, albeit
not optimal ones; the changes you propose for frame.c cannot.

So I'm still unsure what exactly would you propose for the display
engine to do when it needs to examine the selected frame and discovers
that this frame is invalid.

>  > The display engine doesn't select frames to show them to the user, it
>  > selects them to redraw their windows.  So the considerations what to
>  > do in this case are different from those we need to consider when the
>  > user selects a frame.
> 
> As I said above: This is not about the frame its windows it has to
> redraw.  It's about the display engine trying to select a frame after
> it has redrawn (parts of) another frame's windows.

The display engine selects a frame because it needs to display
something related to that frame.  If it cannot select it, it should do
something about that, not just punt.

> :eval deleted the frame being displayed
> 
> So the display engine is, in principle, aware of one incarnation of the
> problem - the one where an :eval tries to delete under its feet the
> frame it currently tries to redraw and the comment correctly says that
> 
>    This is a nonsensical thing to do,
>    and signaling an error from redisplay might be
>    dangerous, but we cannot continue with an invalid frame.

You are proposing that we find all the places where SELECTED_FRAME is
used and fix them one by one?  I thought it could be better to fix
them all at once as part of SELECTED_FRAME.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 17 Mar 2020 09:38:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 17 05:38:28 2020
Received: from localhost ([127.0.0.1]:38186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jE8g7-0006rE-UM
	for submit <at> debbugs.gnu.org; Tue, 17 Mar 2020 05:38:28 -0400
Received: from mout.gmx.net ([212.227.17.20]:53857)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jE8g6-0006r2-PP
 for 39977 <at> debbugs.gnu.org; Tue, 17 Mar 2020 05:38:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584437895;
 bh=B6sBakW2Pte2ynZXZRQ/boZBEj48ROXQaFC19Y54HMI=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=SKzPcHVcE7OccofH0Q2knTfoDIMkfjpI+Q26OqR92tA1ywdkX1tdcCb+HnzQRF2Rn
 hU5OgqXTFhdypTGaTYI9/yU2vzT5pne0uZGZ+wArFVQSjYmtsYWZAkJri0T2rngfmG
 VOjwX2UFIkQVMGMd1F57gp6nbNad35HA7mcgsIiY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.16]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mq2jC-1jaZ4X2FAQ-00nBnS; Tue, 17
 Mar 2020 10:38:15 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> <83d09cb9gz.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <69a74f9e-079b-a771-0213-f60ed0bf5720@HIDDEN>
Date: Tue, 17 Mar 2020 10:38:11 +0100
MIME-Version: 1.0
In-Reply-To: <83d09cb9gz.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:NnX+xS7g3Fz7h5qVPPyjr8gCIRO5tZJ8mBZKIjNmpSohHrzkLSL
 lg5wXqmFj0cs1yWcC+/9Ei2aXVk2nLCcOXmvV7YWknk71L84Qf+KrL6Qa9fM4lrLR/C8Bt5
 +8fnBZhf2xYtwTbu5Y6S0YV8kwASctBJ0WQkREY1fNtiqWwHHORqgIne/7nJ2iG4f/Y3TUT
 EYnn0SuZvh6frFPAYXUmA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:B990qTyP+Ms=:F6sqJEqK1tUYn+HrxNnJZF
 1c3rTlXX5gbBZRv9KqvBAs7Zxlj0Zf9Eyt/Djcjey2SEfgAb5PFjjoJxQoaHUAA5dStxUzQK+
 /3y8c6hqsnYgQJbgDjIq2l8nLcYN/d6RK/qJbLhwoKAvD/TlAUfpQIyzW+CCE73yOA2Ewv0uQ
 mOz3ykjUPOsmeU7mCMrdKNdFrcWrKb/oWdjtSPmLwd+yld36XrIAwlVWCPj5nnCkeGF3mFhfM
 qXC8Or6zkE+VzmIN5SNcxmzGk+KxtQ6lr3m+uJIEpf/TRbyf9c/NLh+VqYpPWJbAdKpLoMqTT
 g8cBN5l5TqUtgkzEiYSc9B9h63nf5LVzJVKsLnfWOOkMsLHieYlJk1sukYJe/UvJCd7AdzCyp
 2wgDQHE/KdHLkC5PFzOk2b37Y0J45yx6DQAWnP19itLT7sJbId5hnpWHmwp4PSX/aTfdotjuU
 sqlbe9rZ/hiLuWgfExUotGErThb9YHmX8tGDyRNesvwUdIYalPTN0C8Da93uOUUU1vB/f5OJf
 17pD6YmP5egrofQMEkwh6Z64HBebMYJMaOpf4BmghpjQZXPAP3jquwW/ru8kAEyN+0nEKVlwI
 jGnp1+SWSviLW1zt1AEoWgyv1qzkibpsxg0SFLj+4WMZsa6L9zLDjozqjc+GsDho//sv/xiqa
 Xlj87/flVNFjwnZrGM1TJsRPc+hCEDo+TzTw6eZYzepABOON6j9vds4KTTZcB3d1Elna4f7Wb
 9tgo7gsTA9GRXYx2o/5o13EmPOzXQhyVLY+hdr7u4awR1ilY8r/bfi/9ZPcbSTKMLdswp3vbp
 idUEfoJQYWUraqgATj1siFj9UYwkm/dXHSVR3hdyA2bMQpz4jW3tICRCIeX/y7lor5vqGbLfl
 81z/ViPGczD4V+p8NFDawoJumrwLW1qx5u3XWGjajkCMYO3bcDFWJZszWLIbpm7ocb1jjmK5t
 7tecHgD1m1OA+g3W2+xd2RE4Z9OwXRW8wAwD3cyTZyxc5RlLG4KR4Je3DNyKTFsb1A8TU/3i4
 6NlBtcmrNuCYniVGENgecBWraR6B4kbLCMN2SbSwaEZ0FY0sMKm/BNlcT/wL+ni13qgOWsT0S
 dORaTav4TwPfGKjEO9SH6QCF3L4bRxMFg6WYFkp1IGXXTvUXonnj8APMdwgtFEoXBRFSKkwJb
 jdzFFiI8igc6ydCLAj5gU+/DlDS41bFezvXGls7j2aLr3/3mjdNEFyeGoF6+4vZnqicyS/1i5
 yFHuvyiO/FDXRJvnY
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > Why does it matter which SELECTED_FRAME crashes?

Because the next crash may happen at some time in the future.  Why not
cure the first crash we have right away?

 > Anyway, my point was a different one: it was that we cannot simply
 > "not select" such a frame, we need to do something else.  What exactly
 > is not trivial, and I didn't understand what you were suggesting to
 > do.
 >
 >>   >> As far as frame.c is concerned, it should do something like in the
 >>   >> attached patch.
 >>   >
 >>   > We cannot punt like that in the display engine.
 >>
 >> Why not?
 >
 > Because we must have a frame that we were supposed to redisplay.

Either we are miscommunicating or I' m just dumb.  I would in no way
restrict the display engine in choosing whatever live frame it wants to
redisplay.

 > The display engine doesn't select frames to show them to the user, it
 > selects them to redraw their windows.  So the considerations what to
 > do in this case are different from those we need to consider when the
 > user selects a frame.

As I said above: This is not about the frame its windows it has to
redraw.  It's about the display engine trying to select a frame after
it has redrawn (parts of) another frame's windows.

 >> Not "will" but "may".  The problem is that it then might be harder
 >> to find the cause.
 >>
 >> With emacs -Q evaluate
 >>
 >> (defvar foo
 >>     '(:eval
 >>       (when (> (length (frame-list)) 1)
 >>         (delete-frame (next-frame)))))
 >>
 >> (setq-default mode-line-format foo)
 >>
 >> and do C-x 5 2.  The backtrace I get here is
 >
 > Which just means we need to add the protection to SELECTED_FRAME
 > itself, so that it runs everywhere.

But SELECTED_FRAME is not the cause of this problem.  The cause of the
problem is AFAICT the fact that :eval is allowed to do silly things
while the display engine tries to redraw windows.  The example above is
only a mirror of

----------------------
With emacs -Q evaluate

(defvar foo
   '(:eval
     (when (> (length (frame-list)) 1)
       (delete-frame))))

(setq-default mode-line-format foo)

and do C-x 5 2.
---------------

where I'm told that

:eval deleted the frame being displayed

So the display engine is, in principle, aware of one incarnation of the
problem - the one where an :eval tries to delete under its feet the
frame it currently tries to redraw and the comment correctly says that

   This is a nonsensical thing to do,
   and signaling an error from redisplay might be
   dangerous, but we cannot continue with an invalid frame.

So here the display engine bows out.  OTOH we allow it to set
selected_frame to an equally invalid frame.  Isn't that a bit selfish?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 16 Mar 2020 15:33:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 16 11:33:34 2020
Received: from localhost ([127.0.0.1]:37791 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDrkE-0001jL-Eg
	for submit <at> debbugs.gnu.org; Mon, 16 Mar 2020 11:33:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jDrkD-0001j4-9A
 for 39977 <at> debbugs.gnu.org; Mon, 16 Mar 2020 11:33:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44556)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jDrk7-0002lr-Fv; Mon, 16 Mar 2020 11:33:27 -0400
Received: from [176.228.60.248] (port=1645 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jDrk6-0002rq-Ir; Mon, 16 Mar 2020 11:33:27 -0400
Date: Mon, 16 Mar 2020 17:33:32 +0200
Message-Id: <83d09cb9gz.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN> (message from
 martin rudalics on Mon, 16 Mar 2020 10:24:14 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
 <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Mon, 16 Mar 2020 10:24:14 +0100
> 
>  >> As far as xdisp.c is concerned it simply must not set selected_frame
>  >> to a dead frame.
>  >
>  > I don't think that's possible in xdisp.c cases you've shown.
>  >
>  >> Never ever.
>  >
>  > Why not?
> 
> Because it might shift the abort to the next instance of SELECTED_FRAME.

Why does it matter which SELECTED_FRAME crashes?

Anyway, my point was a different one: it was that we cannot simply
"not select" such a frame, we need to do something else.  What exactly
is not trivial, and I didn't understand what you were suggesting to
do.

>  >> As far as frame.c is concerned, it should do something like in the
>  >> attached patch.
>  >
>  > We cannot punt like that in the display engine.
> 
> Why not?

Because we must have a frame that we were supposed to redisplay.

> At least one of the frame restorations is unprotected anyway
> and might leave the temporarily selected frame selected.

The display engine doesn't select frames to show them to the user, it
selects them to redraw their windows.  So the considerations what to
do in this case are different from those we need to consider when the
user selects a frame.

>  > So you are saying that selecting such a frame will cause trouble to
>  > some other code, not to the display engine?
> 
> Not "will" but "may".  The problem is that it then might be harder
> to find the cause.
> 
> With emacs -Q evaluate
> 
> (defvar foo
>    '(:eval
>      (when (> (length (frame-list)) 1)
>        (delete-frame (next-frame)))))
> 
> (setq-default mode-line-format foo)
> 
> and do C-x 5 2.  The backtrace I get here is

Which just means we need to add the protection to SELECTED_FRAME
itself, so that it runs everywhere.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 16 Mar 2020 09:25:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 16 05:25:18 2020
Received: from localhost ([127.0.0.1]:36067 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDlzq-0004eB-3S
	for submit <at> debbugs.gnu.org; Mon, 16 Mar 2020 05:25:18 -0400
Received: from mout.gmx.net ([212.227.15.19]:40215)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jDlzn-0004dq-T6
 for 39977 <at> debbugs.gnu.org; Mon, 16 Mar 2020 05:25:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584350705;
 bh=XEDFPmX3jOFYruRrvS4HucQRZUPKdoNRIlMzkLCNTj8=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=QMD+NSib4uB9UJO34It2QXyztB4UgNmCd+LXT/4U8EadKvfCFOdMFPR/LtLI3qGG0
 SW24CrdNZlgZP0Gc+j//XOAh6KGvvtfbxavd5tilSmmWCHovnEFyIHqeQ57qhBI9+n
 PViQSRErs8SNaIL/eb7LhnvW0AyAkiKegbweI5ok=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.221]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MBm1e-1j1iEX0IvM-00C6tX; Mon, 16
 Mar 2020 10:25:05 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Madhu <enometh@HIDDEN>
References: <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN>
 <83y2s2bswl.fsf@HIDDEN> <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN>
 <20200316.081218.1449850131949168714.enometh@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <0780eada-69c0-af33-846f-0730c7ee763d@HIDDEN>
Date: Mon, 16 Mar 2020 10:25:04 +0100
MIME-Version: 1.0
In-Reply-To: <20200316.081218.1449850131949168714.enometh@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:jn1CNJjSB950mHzZmaoMpBGsaNSqJsc1j1qEsuQmDohZ+6rg1Mc
 TRdKU1HsSqturoDZM94ONGBlbFUqFbCI3IYa68z4uYo7s6jLn68wAYMn+NhJN4csLtCl6W5
 6V/iCJNNl/dD6drs/TfOJdfVrv/wGy7zj2L4YraHehHXCsrppfptR9APyDjzPGctPR/s6dj
 1GLi2LNZS+Mn1T/+SqIrg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Iy5TK3PclPo=:qPBNQY2Ijk8gPstHEQP1yx
 J9SSJ/H3lYvNzxKnSlwtlYGP1OPp2xdZiKYujwGaXFUBNRyPW72npl1hXH+JCZsqxL3dhAmnB
 5xWeemE1ItW5cHcmxiwa3S8ErcdwjVchQLkW8LUTA8E54fyR4yhhdQ7eo57+Sd1TohydLSqGx
 2WzfBHxWBKOqwlzMVdbNa8ADRi6jBlH+CFXXJtth39oieoOK/84yp1FXqkxV2XSZfUJHdA2xJ
 owPjOJkL+5TKzHBMbeaBi3GS2WwBFraUaSn29PNLA8BelEc3gAARPkOIcVSMO4HcMAmMsQRaa
 HO0j90N7kmeIN2wRllEGiT5GMj1sA3rdn87DA9LtjcqHlsfPDb1qadk9cekle+pL5C5JL7IHr
 i0jre7DSbxddkFdGlrdFm7DwiicvIU9/yv0/yyC2ivtWd2Ko4iriNqUJv4zsZO+GUhWDW1iai
 DLbV5ckj31D4jOuCQEgkoNmZzMNPbtxAOrwBmVg5h/NT09giXoYbtli+anzLYLUjbfd/9H93s
 ZhliC3G6E7UnwyqS2lfhJSQZSRQkMWbmFmSfieupuMtvvHk/5wnx5J6gCX7chrU2GjdwpPZQo
 C9anreyJnm7X+TGDQ8//9ETRpqMMvvQS+U+ToZGYwc/iPaHHjFXBiIr/EgyHAeJaYzvw68YpY
 GJqwtLf2YHTfSaa79Yr1qcvH/UUaREoTMjHX5Kbd3YyTPU1pn6cjT8L/1g+EPEeRfgDYWJQZs
 f0mlBYEwNm5rlNE949iMTZXnvqo3my05AOQBLceEbEgdD349OnaMckqCiyZ3YwbLROmICzPWQ
 OqEkvuhjYwyEJy8UvDG6e+PuN+uTt9jC8jOW1u2Mhtn8S7oQ/dLZtUO12ce3Z01wGHHX7+sad
 ZMNNdQgOaKBQkMePQy62MqdJ2ToSmgXtGZBgrkI40woIntMLiPhwm8Zus+VxAAelBxbWZ1F7e
 XvZA4r0dlktOV/UDfIueYwQ59BOLiSwCe5OL1LFimucmMXC0Fxsb8ONVFMEAo8mZqmPNZNzgc
 prr16yNw+/cc4CSIBh+sUJsEgPTAcMk96gyhVHjMRm8oG1fOjQZ0Mz1fqMD7tYpT+0dpz7I63
 jLtVoEnKnx0KlzEwYEqzvZW8sjurmlpwjr79563Ursmyu0gUHXVHgXQpIroIdOvXToPs5JZoF
 IY6CbYfSgGK4oeqxoJPBmJZq2GLELV1SnZ/tKZcCiudCf6KmdukwLx/vT1Wu+CjyTqU6F/85w
 RyB+TWT3adcgbla+B
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: eliz@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > I haven't understood the sequence of events which causes leads to this
 > crash case.  I'm a little embarrased to reveal it but I can try to
 > pass on the recipe to Martin.

Do you ever evaluate something that could cause a frame deletion when
setting a mode or header-line string or a frame title.  Do you use the
tab-bar?  Where in your code does the "quitting the window (and frame)"
you mentioned earlier happen?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 16 Mar 2020 09:24:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 16 05:24:30 2020
Received: from localhost ([127.0.0.1]:36051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDlz4-0004bc-1W
	for submit <at> debbugs.gnu.org; Mon, 16 Mar 2020 05:24:30 -0400
Received: from mout.gmx.net ([212.227.15.18]:36457)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jDlz2-0004bP-A5
 for 39977 <at> debbugs.gnu.org; Mon, 16 Mar 2020 05:24:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584350657;
 bh=T3ihwJSd3VmqtX20Ce+cjBpgzymnGQyeVAJnNqBL69Q=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=IW/fNAjarp8Jc3GtpqilpB8BnKwM+WWFrhF2UWYk3wqfVAG72oWFdxRtXOMhKQr/J
 oT/DLFTqmVsJ2Lm/Tk8d1vp9J8ddz2i20NREtrqWMjXMAW2t17qoN9z4Rn0IqBDssP
 eoBM+JV5YhrG395i+EiAvKKexi1EWww+s3Vf+/PY=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.221]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMofW-1iv06u3fFM-00Inx4; Mon, 16
 Mar 2020 10:24:16 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> <83k13lbgux.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <eacebbcb-0f62-7eeb-968d-767cc0a775b6@HIDDEN>
Date: Mon, 16 Mar 2020 10:24:14 +0100
MIME-Version: 1.0
In-Reply-To: <83k13lbgux.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:cx+loIlLWwtBdqRkwdUmLhCQGsa2JasHCUZZUpP1N43SvX8K2ur
 sRRID+fuCcnpdGxMdquNsEBShVRn5UODRtGtKgA9gkav7aq1pgPQ6OHeyeLD/0EyQ5L16qH
 WR1ZEGe7mNKgu6kVGhKzDSyX462ehew8F3BsD5SsCha1rgpWL6FEyAYvAbhu4Sra49l6W2n
 6qNUoQllD9+jsH3FX8TSg==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:iwjGOPIDbBg=:yaiA1JeAdbRKtPRD/oOuX+
 02vCdWi1PN9flJyhnf2lxR560sTwYJAQc/dHsV4N9ChMf1pmyCU0ESFx24/jBj4C4J92blIoh
 8H5EgrZNgxStDy5SVu8+/b8LcmSSFoRO/siU8f6+5Q/alkOYAwbi+dOseupNYiqlcEgaOogJo
 EVQ8Ok92PpQpj7QSBxnv3XpJ2I0zm926SSgTYlC7EFBtWddhoD+0owHsX9irDvp+hF8pZbMB3
 fLBSmDnWTHerA484GSLzkQJnbkxw4QFyLUEbyrVLA+8eouUziEjtI0m2yaCZW585YYGq8svrE
 3x3luPCsQ00vPnydC8KNJd6lipj0RYbKyXqH1xa/TeLzgQsnxlZb2s+4YkzgoOo8uKWkg1I49
 n4oJnyS4AKq8+OKQQj+39bVYUGTa2LVEvvqjapQcrms6NGMY54FeFodvJdUcAclwOLMusachY
 J+MeU62DjuYyPS5iAG5YYdnN1e4giRayRg3Li6KtOhFlAqVUaJEwicJi1h0z9+6i/q4TuGMwA
 58qSVbP0IcuCEgIyzpD/CJDaznnQr9G9XEJ+GSxPP+Ds5CQyFcqoor5xUyqEQcm5LF89/wgEY
 yAILiE1ZlyDoxg1mtK1YLCSTs55Q7q623398cqa5sfPONZ+Cfb8fKOTSWF7rgbZcAL8rZD0PU
 QgcuSD2SuFU8vzDyqOZlHp/nQOBq1o2JqW+HmG9zrggUUnZPsK7Hd9sfyJGwe4/hFuEI5b9h/
 Ignevr3GLlau4DlQefIU9yL/EVfwe2L10/RlXbqa4XfngtECZj940ZK2NWQIb399xMqzcz9ms
 zKLstj+HlEPja8bBYUrIcFjPayfdkaDPGCM2zDu7crrZ307QAwnPR+iunGUqOwmcp3WGlBXry
 3JJvKvgu2vzSOIK2wlgOyfMjrg7PTVX5FsxuLcmlYI5a3sY5HTRdUvvCI2VGpvGvKK0NbBPWZ
 6KJFCayek5v36G7faJxG39TmNqV8npzh14i/IT7R7fry/B7ypIwXztrkmMy9vl02gy7ew+8po
 MVT/QoguJXMuTuqmDr4b3K74n64AG/blWXmwUI6YBJ9bcy19RDSLRc1ZN8IIAiABPpnihvYlP
 kBvLkO65QI25A2Xtg5GlW7/Sfy6YObCJ/wVMZoowU1IuPpehG24OZjqVaxmwIVZnWZaChohOC
 E6RD1kwM7EarW+j8bal4ZZACJ5Z3DZ02tH87OIeHpcDHT7UHt7FFOEraWlenXCrD6blyHAp2K
 59MaUCXp4dpY3f5fB
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> As far as xdisp.c is concerned it simply must not set selected_frame
 >> to a dead frame.
 >
 > I don't think that's possible in xdisp.c cases you've shown.
 >
 >> Never ever.
 >
 > Why not?

Because it might shift the abort to the next instance of SELECTED_FRAME.

 >> As far as frame.c is concerned, it should do something like in the
 >> attached patch.
 >
 > We cannot punt like that in the display engine.

Why not?  At least one of the frame restorations is unprotected anyway
and might leave the temporarily selected frame selected.

 > So you are saying that selecting such a frame will cause trouble to
 > some other code, not to the display engine?

Not "will" but "may".  The problem is that it then might be harder
to find the cause.

With emacs -Q evaluate

(defvar foo
   '(:eval
     (when (> (length (frame-list)) 1)
       (delete-frame (next-frame)))))

(setq-default mode-line-format foo)

and do C-x 5 2.  The backtrace I get here is


#0  0x000000000063f7a3 in terminate_due_to_signal (sig=6, backtrace_limit=40) at ../../src/emacs.c:371
#1  0x000000000068ac8a in emacs_abort () at ../../src/sysdep.c:2448
#2  0x00000000004ee088 in select_window (window=XIL(0x1be5745), norecord=XIL(0x30), inhibit_point_swap=false) at ../../src/window.c:544
#3  0x00000000004ee2f9 in Fselect_window (window=XIL(0x1be5745), norecord=XIL(0x30)) at ../../src/window.c:630
#4  0x0000000000484c33 in gui_consider_frame_title (frame=XIL(0x1be5505)) at ../../src/xdisp.c:12318
#5  0x00000000004974b6 in redisplay_window (window=XIL(0x1be5745), just_this_one_p=false) at ../../src/xdisp.c:18940
#6  0x000000000048cb00 in redisplay_window_0 (window=XIL(0x1be5745)) at ../../src/xdisp.c:16179
#7  0x00000000007b10dd in internal_condition_case_1 (bfun=0x48cabe <redisplay_window_0>, arg=XIL(0x1be5745), handlers=XIL(0x7ffff40bafbb), hfun=0x48ca86 <redisplay_window_error>) at ../../src/eval.c:1379
#8  0x000000000048ca58 in redisplay_windows (window=XIL(0x1be5745)) at ../../src/xdisp.c:16159
#9  0x000000000048b486 in redisplay_internal () at ../../src/xdisp.c:15627
#10 0x0000000000489084 in redisplay () at ../../src/xdisp.c:14854
#11 0x0000000000650828 in read_char (commandflag=1, map=XIL(0x17ce993), prev_event=XIL(0), used_mouse_menu=0x7fffffffe13f, end_time=0x0) at ../../src/keyboard.c:2493
#12 0x0000000000663705 in read_key_sequence (keybuf=0x7fffffffe2d0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at ../../src/keyboard.c:9549
#13 0x000000000064ccee in command_loop_1 () at ../../src/keyboard.c:1350
#14 0x00000000007b1002 in internal_condition_case (bfun=0x64c872 <command_loop_1>, handlers=XIL(0x90), hfun=0x64be81 <cmd_error>) at ../../src/eval.c:1355
#15 0x000000000064c457 in command_loop_2 (ignore=XIL(0)) at ../../src/keyboard.c:1091
#16 0x00000000007b04b6 in internal_catch (tag=XIL(0xd0e0), func=0x64c42a <command_loop_2>, arg=XIL(0)) at ../../src/eval.c:1116
#17 0x000000000064c3f5 in command_loop () at ../../src/keyboard.c:1070
#18 0x000000000064b968 in recursive_edit_1 () at ../../src/keyboard.c:714
#19 0x000000000064bb60 in Frecursive_edit () at ../../src/keyboard.c:786
#20 0x0000000000641f98 in main (argc=2, argv=0x7fffffffe7c8) at ../../src/emacs.c:2035


which is almost the same as Madhu's.  So maybe the display engine should
simply set a global boolean inhibit_frame_changes while evaluating mode
lines or frame titles and have at least delete_frame not delete a frame
when that variable is set.  If we decide that fixing such a problem is
urgent.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 16 Mar 2020 02:42:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 15 22:42:35 2020
Received: from localhost ([127.0.0.1]:35906 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDfi7-0002T0-HQ
	for submit <at> debbugs.gnu.org; Sun, 15 Mar 2020 22:42:35 -0400
Received: from smtp5.ctinetworks.com ([205.166.61.198]:40548)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <enometh@HIDDEN>) id 1jDfi6-0002St-Bb
 for 39977 <at> debbugs.gnu.org; Sun, 15 Mar 2020 22:42:34 -0400
Received: from smtp6.ctinetworks.com (smtp6.ctinetworks.com [205.166.61.199])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by smtp5.ctinetworks.com (Postfix) with ESMTPS id 155A4163477;
 Sun, 15 Mar 2020 22:42:26 -0400 (EDT)
Received: from localhost (unknown [117.193.4.241])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: enometh@HIDDEN)
 by smtp6.ctinetworks.com (Postfix) with ESMTPSA id 8ADFA83E41;
 Sun, 15 Mar 2020 22:42:16 -0400 (EDT)
Date: Mon, 16 Mar 2020 08:12:18 +0530 (IST)
Message-Id: <20200316.081218.1449850131949168714.enometh@HIDDEN>
To: rudalics@HIDDEN
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
From: Madhu <enometh@HIDDEN>
In-Reply-To: <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN>
References: <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN>
 <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN>
X-Mailer: Mew version 6.8 on Emacs 28.0
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-ctinetworks-Information: Please contact the ISP for more information
X-ctinetworks-MailScanner-ID: 155A4163477.AA337
X-ctinetworks-VirusCheck: Found to be clean
X-ctinetworks-SpamCheck: 
X-ctinetworks-Watermark: 1585190553.30726@qhMWAyOjzGzFCvNVNahDbg
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39977
Cc: eliz@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

[Sorry for the delay in checking my email until now. I wasn't
subscribe to the debbgugs newsgroup]

* I didn't get Eli's message #8 (Sat, 07 Mar 2020 20:50:42 +0200) in
my mailbox.  The patch supplied in this message does indeed make the
crash go away.

* I did get Eli's message #11 (Fri, 13 Mar 2020 11:55:26 +0200) to my
mailbox. Subsequent messages seem to be delivered to my email address.

* Re Martin's message #14 (Fri, 13 Mar 2020 17:28:53 +0100), the check
(f == sf) in delet_frame is not true when I trigger the crash.

* Re Eli's message #23 (Sat, 14 Mar 2020 12:10:09 +0200): It seems out
that I am going out of the way to trigger the crash - I may be
introducing a "bug" in SLY code, or exposing a defect in SLY design.

Presumably under normal circumstances the crash should not occur.

I haven't understood the sequence of events which causes leads to this
crash case.  I'm a little embarrased to reveal it but I can try to
pass on the recipe to Martin.

* Re Martin's message #35 (Sun, 15 Mar 2020 18:49:21 +0100), the patch
frame.c.diff does make the crash go away.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 15 Mar 2020 18:41:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 15 14:41:59 2020
Received: from localhost ([127.0.0.1]:35578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDYD1-0004Zt-5u
	for submit <at> debbugs.gnu.org; Sun, 15 Mar 2020 14:41:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:39623)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jDYCz-0004Zi-TX
 for 39977 <at> debbugs.gnu.org; Sun, 15 Mar 2020 14:41:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56899)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jDYCu-0008Tn-8r; Sun, 15 Mar 2020 14:41:52 -0400
Received: from [176.228.60.248] (port=1321 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jDYCs-0003jj-QU; Sun, 15 Mar 2020 14:41:52 -0400
Date: Sun, 15 Mar 2020 20:41:42 +0200
Message-Id: <83k13lbgux.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN> (message from
 martin rudalics on Sun, 15 Mar 2020 18:49:21 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
 <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sun, 15 Mar 2020 18:49:21 +0100
> 
>  > And what do you suggest to do if the frame at RHS is not live?
> 
> Sorry, what is RHS?

Right-hand side.

> As far as xdisp.c is concerned it simply must not set selected_frame
> to a dead frame.

I don't think that's possible in xdisp.c cases you've shown.

> Never ever.

Why not?

> As far as frame.c is concerned, it should do something like in the
> attached patch.

We cannot punt like that in the display engine.

>  > Why do you think this is a problem for redisplay?
> 
> I didn't say that this is a problem for redisplay.  What I wanted to say
> is that your fix which is supposed to handle a (maybe only temporary)
> problem inside redisplay might cause more serious problems when
> selecting a dead frame outside of redisplay.  But maybe I'm confusing
> things.

So you are saying that selecting such a frame will cause trouble to
some other code, not to the display engine?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 15 Mar 2020 17:49:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 15 13:49:38 2020
Received: from localhost ([127.0.0.1]:35477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDXOM-00035H-9Q
	for submit <at> debbugs.gnu.org; Sun, 15 Mar 2020 13:49:38 -0400
Received: from mout.gmx.net ([212.227.17.20]:51481)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jDXOK-000354-Hm
 for 39977 <at> debbugs.gnu.org; Sun, 15 Mar 2020 13:49:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584294564;
 bh=kEqg/R70VGxf9QAjdtH3tHljgFTq8y8TG18pAbDaSVU=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=F9WKx5f1W1XHoTrPtxqfKBuxOxpYLjn3pMT6N13gd6Kgrl+MqWTDYnucsl+xgUHXM
 l5MfjfiaT4IS9JpOI03UkdNgMHa81Xiulercp5J7zytxBBs6ARoNDwomfi7IwfOOm2
 bNcosOJNKqiejblFeiseRiYdUFUChu+kcauUiifw=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.103] ([212.95.7.232]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MAONX-1j2DeB0pxL-00BxK2; Sun, 15
 Mar 2020 18:49:24 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> <83y2s2bswl.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <3ac189d0-5d05-fdf9-0922-0c464b1b17c3@HIDDEN>
Date: Sun, 15 Mar 2020 18:49:21 +0100
MIME-Version: 1.0
In-Reply-To: <83y2s2bswl.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------A6FDCB6C10F5BE317BA1FE59"
Content-Language: en-US
X-Provags-ID: V03:K1:gdgA6YxMKcCW1JhmJrQvO2clSBwvm1GwXOn7EHFtEFpx6QtdFxm
 BW2sz1KSIZUjad8DfM463eI4mZRMSjLxLlK1DUQB/bl/vK0oCKxl3B+GkD72oKkqHGfISTY
 72GE4hml3g+kFhu9xH2usuzpV2MUgvz/v4xepp3NclKR1RrK0pwyAAOTKoZdZuIDWv2QHFE
 YQBn/L9lsthi7laVJ/PnA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:vC7bmBVLPjI=:8nAFm/HRWKf82ZgcFPWqcr
 dTVjVOEwwfKK3LdxZqzdLo+lRyGAaSU7ShrY5AmqRsUXqRSiyHiEhqRjwrEd4zFwXlfPNbA//
 2wsS+Vq0oUkdFgW+PWqli6Uomf9MysXphQR0kXJankOmAHi9pJ/+9bmciK3k5np0r8EvL1192
 0+m4Y2DYXfJenAqKAyHsUMI08kJ5aLPciV74yWK7qcESiSDWHgGgAFdK7pdntznybXw6ifTwg
 QnbLZ9uw9rn1LLmaF8t/w/6/Y16pL3OGGcDcccuzu/BnouhxRHVrvnGcD+2pmSnqVJ8jb3OxZ
 Jgmy5PH/ORT26AdqdgH9rBuKSctjYrmIQBDl2GESbihLrBqquQDtZNqgv8Lw7PHoA78QXi97a
 VRhswcnOguG6Q5doPAm1Tc9Ea1DPpDM/Mkx31pVzk7ff2FVI5wwXpR2L5jKr99elBMfTtWrkN
 OKgy8hHkbp/0u4tcUH0BkZBgv3FoGc6MtRzyDL/bb6cTc+eDWucfMb4VKmJ2tzkyLH9uKxdWA
 kFR5ZHw3ElSW0C2VhhqFIKNuVJJf9CFUFOhui7xShpy2wc0Z2qlftQCMmAQ8pngS63Cq3YTge
 edttK/WwqDM7gqeNVRJHYeHgZqUEyqXwEoHFTSyHsZljYii4+rvHe7TvPuxPgGAVvABHm+a3U
 nHAs+FBpwq9DmFOJYtuBAyGf5F60ulgmAUcrPJusjldNC0qHHl6Rr0naglB5HrLG2VskGGauQ
 vEh1+eiwi0QL0LJ76kUtKZG4kP+cuyO4n99u8eSQ9Ab0eTBM06V93NSLGC2FtkIpRZl53BqNY
 xRGXihTLG+DpoqAz+OMzol0ZTK1QWvww2GdGEQyDd2QP3MwEp3Npfb7wMs6nOl9+Mg0rh8lTt
 n3VwUykT0OwBWLHruBl6zfM7i7+0kdiRAytBPQB5lmeZDLhuAuo9VEZ4b34ckhuQ/ck5m+CyU
 oy373piB/LnjPXIYp1Z9ObPl93ubfDCNiQbTLN6Pkzr1g/ZUUO8X1fjlcpH+K/crXM6SSYyY3
 aQfqKpeTnhAR9TYwHeuYC2rt45pfNHVJi6yyPR8/gnpJkV3YmyPXVIyjFN9e4jBJzB3wf4/wJ
 RfhdgGYodIWOEWzOcmPIrOjk0obX7T1me0Z3hzwKTGJUCD2u8EK9RE2RyX/f5dRHo8+4hOIBZ
 T2+fxqs/wpPnZOzYjJ8nle54jIEBe8E8Y3kOmMzhDaIpakzocUfuJrN4AIRJ8f5+Ryz+pgz73
 6/wxBiU2pMQ4SBsog
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

This is a multi-part message in MIME format.
--------------A6FDCB6C10F5BE317BA1FE59
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

 > And what do you suggest to do if the frame at RHS is not live?

Sorry, what is RHS?  As far as xdisp.c is concerned it simply must not
set selected_frame to a dead frame.  Never ever.  As far as frame.c is
concerned, it should do something like in the attached patch.  In the
worst case this might make it impossible to remove a specific frame but
this can usually be fixed by C-x 5 2 followed by C-x 5 1 unless things
are awfully broken.  But at least this is a place from where to continue
investigating.  I have no better idea.

 >> I have no idea whether these could help in any way but since we are in
 >> redisplay and the selected frame has become dead all of a sudden ...
 >
 > Why do you think this is a problem for redisplay?

I didn't say that this is a problem for redisplay.  What I wanted to say
is that your fix which is supposed to handle a (maybe only temporary)
problem inside redisplay might cause more serious problems when
selecting a dead frame outside of redisplay.  But maybe I'm confusing
things.

martin

--------------A6FDCB6C10F5BE317BA1FE59
Content-Type: text/x-patch;
 name="frame.c.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
 filename="frame.c.diff"

diff --git a/src/frame.c b/src/frame.c
index 88d6f22fc0..ef42f230ef 100644
=2D-- a/src/frame.c
+++ b/src/frame.c
@@ -1466,6 +1466,11 @@ do_switch_frame (Lisp_Object frame, int track, int =
for_deletion, Lisp_Object nor
       tty->top_frame =3D frame;
     }

+  if (!FRAME_LIVE_P (f))
+    /* Return nil if for some reason FRAME has become dead now
+       (Bug#39977).  */
+    return Qnil;
+
   selected_frame =3D frame;
   if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
     last_nonminibuf_frame =3D XFRAME (selected_frame);
@@ -2009,8 +2014,6 @@ delete_frame (Lisp_Object frame, Lisp_Object force)
 	error ("Attempt to delete the only frame");
     }

-  /* At this point, we are committed to deleting the frame.
-     There is no more chance for errors to prevent it.  */
   minibuffer_selected =3D EQ (minibuf_window, selected_window);
   sf =3D SELECTED_FRAME ();
   /* Don't let the frame remain selected.  */
@@ -2066,10 +2069,17 @@ delete_frame (Lisp_Object frame, Lisp_Object force=
)
 	Fraise_frame (frame1);
 #endif

-      do_switch_frame (frame1, 0, 1, Qnil);
+      if (!EQ (do_switch_frame (frame1, 0, 1, Qnil), frame1))
+	/* Error out if for some reason FRAME1 was not live
+	   (Bug#39977).  */
+	error ("No frame to switch to found");
+
       sf =3D SELECTED_FRAME ();
     }

+  /* At this point, we are committed to deleting the frame.
+     There is no more chance for errors to prevent it.  */
+
   /* Don't allow minibuf_window to remain on a deleted frame.  */
   check_minibuf_window (frame, minibuffer_selected);


--------------A6FDCB6C10F5BE317BA1FE59--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 14 Mar 2020 20:09:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 16:09:27 2020
Received: from localhost ([127.0.0.1]:34043 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDD67-000312-6p
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 16:09:27 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42685)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jDD64-00030q-U7
 for 39977 <at> debbugs.gnu.org; Sat, 14 Mar 2020 16:09:25 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43168)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jDD5z-00033V-FB; Sat, 14 Mar 2020 16:09:19 -0400
Received: from [176.228.60.248] (port=2213 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jDD5y-0002Kg-1j; Sat, 14 Mar 2020 16:09:19 -0400
Date: Sat, 14 Mar 2020 22:09:14 +0200
Message-Id: <83y2s2bswl.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN> (message from
 martin rudalics on Sat, 14 Mar 2020 19:55:34 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
 <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: martin rudalics <rudalics@HIDDEN>
> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> Date: Sat, 14 Mar 2020 19:55:34 +0100
> 
> Maybe the following two changes would not harm:
> 
> (1) In fast_set_selected_frame check whether FRAME is live before doing
>      selected_frame = frame;
> 
> (2) In display_mode_lines check whether new_frame is live before doing
> 
>      selected_frame = new_frame;
> 
>      and maybe also for old_selected_frame before
> 
>      selected_frame = old_selected_frame;

And what do you suggest to do if the frame at RHS is not live?

> I have no idea whether these could help in any way but since we are in
> redisplay and the selected frame has become dead all of a sudden ...

Why do you think this is a problem for redisplay?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 14 Mar 2020 18:55:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 14:55:50 2020
Received: from localhost ([127.0.0.1]:34013 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jDBwr-0001If-U7
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 14:55:50 -0400
Received: from mout.gmx.net ([212.227.17.22]:35871)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jDBwp-0001IS-LH
 for 39977 <at> debbugs.gnu.org; Sat, 14 Mar 2020 14:55:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584212136;
 bh=rS/OdSWFnSz9/gAg1TZCE634aSijQsHb6HhTpb0nXKo=;
 h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To;
 b=BEHis4M7hUhtViri160lrjwSJ7xMeW0xBynqwfsbmButkHeN8CE5R1BCld+bHyuQx
 73/P3Hn4UMxPJWgFUJr4ItX1ta+UNHxzNfHIz3c6q4FFFHw2TcKl/3g7DYVrGvaJuv
 Hf4XJpn4Q8sMzVb9QpfwKImN+/TrPgYgkCzHpu5M=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.100] ([212.95.5.175]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXXyJ-1ioDdX2Mc3-00YyP9; Sat, 14
 Mar 2020 19:55:36 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
From: martin rudalics <rudalics@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
 <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
Message-ID: <01305dbc-c69b-baf9-f0bf-1e5b8c04d970@HIDDEN>
Date: Sat, 14 Mar 2020 19:55:34 +0100
MIME-Version: 1.0
In-Reply-To: <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:MUryw7g74F70abUzVPutLBBo6yTwwoUR34h0+NBISwBnNFK6Frc
 LIyTtwgrLubZ+SVyIGnDwgd3rlzptl1NBJ7viq1d9t0xLq9Q8/dOqlbVrgMxWqI8CIBtAsj
 wtL4sLN6Z2sB8KkKTrY+riZDBrjD89pXlI/G1c51KRdVCuxoffuWGtzHlkKVaxUXshCYgqq
 ZoxiX29tKUxWT3evYgpWw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:uLhJDjwx+uM=:2nkgcojojHYT7IaYDUr7iN
 xSGpflqOk5ZkeKYS/1OWrQ1N0Th/kvPUukUCAAbyOOkjMXxJzGehFV+nqnZ+s3s3hXc23pisM
 aa/AnxDgORn2rlNOou5Q0+w3s411Wd1M12QmLcJXC+zxsuW0LmXDdWctfMlyBT4fZ/kPCpB+o
 D37M9ybKas/KjPDzc2/KH5xRQoKtQs08hh6sKlahL1Tm5JQD9CjhhSpRA+7jmoWlh24aRw0w7
 dTIdUmU29MV6QM/nx2mSALXReJ0BhmJJj4pQipL/z15H80D4Z4yl9eiJsqKxZ7NkS+FJmCoaZ
 chmFinLM5yCBiYGklE7/Bb86dCzSh4c46LmGxiElWrmNXdQUO2kONp4m9gm5NDt9tK45h5M5K
 qoEaIZVw4OjcvINZkHaVx8NA9aPHQCkZwQMly/LqQNVN6iDpVyavxkB9C6622aAcju3sqhAEJ
 gqfqfZ9EWcBujhbxEBBaFCpYlBE3MLaW41CRK8yIVVHZoRKw1rV3qF2K/rIFSxtFkXyCZpBrr
 q07/XBCWa8xNdEQk0Hub/cunCdNv7JBI4j0TpiN2vMgBV2yi6oWoibWn1g9aM0OcLnBDxnC+t
 4ZFo2T96nBOTCBr2xKRGVpzHIxszWoTcf+i4ZaQbnmsvwlzBLTM0HlhPjBrrKuM29/843smvT
 HBNhfrTHmxQj9fXjnZHQjlEv7DG8FtR1JtFknjsRB7kEKBg7y1QoQlI7nQdMNUJT3zOba58qJ
 c4Y7g95PtQvyb5mezs0N6IUMSEtnYD85iUAw4DkzRnLlSVOFIhg4QSJ6P0aCUEHO7KL8Mz4AS
 +eiWAv0bAgS8X9bmYii8gTWrnR4WaZpJRmZB25VsRkqjdglym9xJsiD83m63XtmT/5lxGsSYJ
 hdAjcxg01wehQWVuz6ommkt9OG+jax6+EqKkflhEB6z+zsAV17xX2cWcTnOd4GbkysnaLmpBr
 JSSy1i8Gr5h2JgxvZH7DgXajCE1XSSRDVEJlra/O9O+37n0WpSZW8WamgGNfh6TBrC+5+arRB
 xo+ntaPoJ8oxkD/yBjXUDR2P8aBjyhDm0VDi2pg2G3qCkO+rTKZGIgjzVAL5aBg2B144cbi8u
 tQVVrSSfUerU+MavUbAbc7f6ipHMDAgjPNRcQ4ECXeaPS3zek30Vyqy/zPZdo5gONuSvMDxKE
 BshQ3nmcSE8bcwlqzGUPX0zOGpQqKl6rgVeJyacR48uWoBzoK4ztcnNlGV78KqJWpSFIDZ+zT
 vQdESRkyqcMd9DuUJ
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Maybe the following two changes would not harm:

(1) In fast_set_selected_frame check whether FRAME is live before doing
     selected_frame = frame;

(2) In display_mode_lines check whether new_frame is live before doing

     selected_frame = new_frame;

     and maybe also for old_selected_frame before

     selected_frame = old_selected_frame;

Maybe display_mode_lines should better use

    record_unwind_protect (fast_set_selected_frame, selected_frame);

What was the rationale for protecting frame reselection when drawing the
tab bar or the tool bar and not protecting it when drawing mode lines?

I have no idea whether these could help in any way but since we are in
redisplay and the selected frame has become dead all of a sudden ...

Another point is obviously the

       do_switch_frame (frame1, 0, 1, Qnil);
       sf = SELECTED_FRAME ();

combination in delete_frame itself.  If frame1 is dead, we select the
frame we are about to delete.  But this should not produce the abort at
hand since the assignment to selected_frame happens in do_switch_frame.
Guarding that assignment would not harm either and then we're done IMO.
WDYT?

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 14 Mar 2020 10:37:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 06:37:49 2020
Received: from localhost ([127.0.0.1]:60639 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jD4Av-0004oA-5j
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 06:37:49 -0400
Received: from mout.gmx.net ([212.227.17.21]:47343)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jD4At-0004nw-5n
 for 39977 <at> debbugs.gnu.org; Sat, 14 Mar 2020 06:37:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584182256;
 bh=SgMbafOAJpGYEL2/rGgisljuPJIX6+PegqxLOF4Ym/Y=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=g4xoI+2nXMEvmuAMms6GxkLUCqzD6/tzOh1a47lHBnyIcg+vQYZeZSBc/IhtggWw5
 vF+HPusk0wfUd+iyQ8DeAkmjB7HQcpzR2/ICMMer5znhf1woSg0MIvCJ+OEuGsXh0+
 b2Zajzk8QeyX1hXOfgjHEJAxGs+rKsLmwTcqBpN8=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.49]) by mail.gmx.com (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MTzb8-1inFXz0Mni-00R00K; Sat, 14
 Mar 2020 11:37:35 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> <83blozckn2.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <cefd439a-ade2-99b0-bcd6-bd077898c775@HIDDEN>
Date: Sat, 14 Mar 2020 11:37:24 +0100
MIME-Version: 1.0
In-Reply-To: <83blozckn2.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:JKdkfUQx99ESOqeshMUkXCqIXbHinj84h3ZZARqjIOwn2f7KK9v
 oZU+xXU05r7YB2ULMDm4N0nVmcMMG4RCewIt8PkkCu4lL1UKqbKVkoRvz4uUuDygwj+2OSG
 4ORTEGB9RmhSRxaZsnXuuWnvc+vx5G5090/AhHiiv/2LEHIlhcPQpi3HyVfu6Tdq9f0tjSX
 jmidQ+yz8UpnDpgiyCUEA==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:MZAH9EL8fb4=:WGtZgmoSHhI6822fH51zmM
 xfGUnzTkNJAk82ArN8EfSDedSAm7tRNIPWnkUF85qNgFeKV6RsT23KupGajLbyaSrR9L1rfRf
 TWkcs8xHe6IN43ywLfd+vk+pOjh1E8IdgCuIy9BAjZzcremzFo838CU3nD+tPTPJRfW7RZk+0
 M2mrWpoLwyaopXnK4BBav/MdQG5JUElQWKIjqDG0Mw0e4BCRRvWqXVe1mrXAN8w+/T9w/yk9/
 ApfOaH9jcDk/8ax5QiONhIJ/uhd/mRYw5a1F4AlvRAv7UR4MVWzwHcu0dDTgRHrb2GUNDjbo9
 YylIbrh27tNHSzvb712rJjbxAFr/AeTCBPB0NgLPHblEsN9uY04A88bBkOuA0OJosuAHr5ATM
 B4RayMo5Br4NJIqSoL/Wp/AabdRRSzPgrTCs1I0NqCZD/a0AEUu8ED3plk1rR8Te1dz0YP6k3
 26nETNFwRRHf/qDxONx3dnGEvwekI8d0YCTtB6SLWXV1KBvvPqumX3dX9lXUbPd9dq4jxWFep
 yZHfTr6MEwltmeMdMzOo/G13A3/u3JVRE+DYdld8TcvfiRd6ftzVmdneZFa5zA4uUFBhgEUwU
 sFRDDu1ueISYdhKi25Ru9c8bDt20s89dsojXMX7l3RyFzPElvRn1gCWewlma3Y5HUkU6suj6g
 A6fi71kVOAWoxZNSTzR3MuS3WmsFAzD0/3x6YPKvjg6sp5kUv6UXifrOyfO+MvDvVL7wqhTNC
 hvz8/Xleq9SiytyeQ8JblMaOzYqew1W3mHw4WdpfhdLEzpPIR8wAX/0rUy6WmQYRoPsH9c4GT
 sDhzAygbeRyth5rLCULIrVRxVUHCrrJndQM0nrpj7llQV35OG0M4N0bHx95VupcCBBdzCmO84
 QjIrbO3CXPr+k58XztzX2/Fan9zA7XHlYx1OTGp28dG/e4YkyMO7EFeAHAqPcjWWSYrjeRvtd
 eyaRt30JfecHTJzJduzz6Q11tvwWA3oQ+w/U6yz7VeBrEBpkudxA+9fs2otrkDGzIgCf4Ma3P
 yau9PUt2bbADwLCqGKn4GYsu7hKFiDwDml9X3y56ViP7Tcoea4QqH/X9OAq+8IOxGJrYpsIAI
 EAoz0EJO6NKZ1/85RWTnNryauy1yntMtsBVKm+u79D/8c7DhbDa2CpvOIA/CkH9cr7AaTld3S
 y2z715U81Ua+wmRU6LuZSaCCLU7zVVoIDeaTEUB4T2nobqUUroBUJIYbLf7kYcLYmDeEbv97S
 KtXkU+mf0cV2M0pyC
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 > My understanding of the scenario in this report was that the value of
 > selected_frame didn't have time to become updated before redisplay
 > kicked in.

My understanding is the same.  But we should not allow redisplay to kick
in before selected_frame is updated.

 > If you think the problem is elsewhere, I'm okay with
 > leaving this crash in emacs-27 until we understand the cause of that
 > and fix it elsewhere. I just hope you will have the solution quickly
 > enough to not release Emacs 27 with this crash.

I don't oppose your patch and that's why I didn't comment it initially.
If you think it's urgent to fix this specific crash, push it.  But we
obviously might also let more serious bugs pass through that mechanism
then.  If Madhu has a simple recipe to reproduce the crash, we should
IMHO try to profit from it.  If he responds at all.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 14 Mar 2020 10:10:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 06:10:20 2020
Received: from localhost ([127.0.0.1]:60625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jD3kK-00046W-4r
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 06:10:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jD3kI-00046K-L2
 for 39977 <at> debbugs.gnu.org; Sat, 14 Mar 2020 06:10:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36573)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jD3kD-0000o4-AP; Sat, 14 Mar 2020 06:10:13 -0400
Received: from [176.228.60.248] (port=4026 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jD3kC-0007eu-GZ; Sat, 14 Mar 2020 06:10:13 -0400
Date: Sat, 14 Mar 2020 12:10:09 +0200
Message-Id: <83blozckn2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN> (message from
 martin rudalics on Sat, 14 Mar 2020 09:48:20 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
 <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Sat, 14 Mar 2020 09:48:20 +0100
> 
>  >> In either case sf = NULL; is not TRT but I think you are aware of
>  >> that.
>  >
>  > No, I don't think I'm aware of that.  It's just a local variable, so
>  > why assigning NULL could not be TRT?
> 
> Because it hides the underlying error.  The abort in SELECTED_FRAME is
> there so we can find its cause and that's why I said you are aware of
> it.  Obviously, we can set it to NULL to avoid an abort when, as in the
> case at hand, we construct the mode line or the frame title.  But in
> general doing such a thing in select_window is not TRT.  At least that's
> what I learned from you.

My understanding of the scenario in this report was that the value of
selected_frame didn't have time to become updated before redisplay
kicked in.  If you think the problem is elsewhere, I'm okay with
leaving this crash in emacs-27 until we understand the cause of that
and fix it elsewhere.  I just hope you will have the solution quickly
enough to not release Emacs 27 with this crash.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 14 Mar 2020 08:48:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 14 04:48:35 2020
Received: from localhost ([127.0.0.1]:60585 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jD2TD-00027J-B6
	for submit <at> debbugs.gnu.org; Sat, 14 Mar 2020 04:48:35 -0400
Received: from mout.gmx.net ([212.227.17.21]:53367)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jD2TB-000275-Hp
 for 39977 <at> debbugs.gnu.org; Sat, 14 Mar 2020 04:48:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584175702;
 bh=8A14J/5g8dkqDQr6k4dbh7jg+GBRWVHbAIm77y6tcEo=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=kZsluodvWe53cPbZsKXQgu1Jol99rMGbg7GvTDkz2UPS1BSBGK8bw4KtI/D4itg2y
 PK4OqzkpLKGc2phmyaW9ZQBtd76Qe0BEgkYne9TXzok4eEfkqLOJHpddNTzJrXWJq3
 geUhiDebOVmkO3BeBYa1Jw3KkdXyPJ5vPu6lL2Xo=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([212.95.5.28]) by mail.gmx.com (mrgmx105
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MN5eX-1iuglf2Kvt-00J32e; Sat, 14
 Mar 2020 09:48:22 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> <83wo7o6nxs.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <60dd4ced-a2e5-ed17-0570-b7bdd2a557af@HIDDEN>
Date: Sat, 14 Mar 2020 09:48:20 +0100
MIME-Version: 1.0
In-Reply-To: <83wo7o6nxs.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:hLufy2ShbYZcguEB0DwJLjDPzxVr7sXoqcY4c4BVcz/wDSDaqIj
 v1PvM/p5MZa067JAmji95S+sED0z05xGDOwO6Y0kEP8+AiFSZ+KF6v7dw/nFBUFiwr9bwQD
 h+fCBMXjECVckgdhQ0QL7pdAniqE8USoR74WwWPYLmAeRfrjHklIe3mFs6j5yAMHK3qFaiz
 Zg0dJ2AgkyeIPxKO+EcyQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:FpuG9tG45es=:GdnQG7AeHhFBoPzYY99Vny
 Xfsgd05iSMKgAxH7cMb/Qptwo+lwzLa+D83VovDm06YHyhRVYQs4ABWrDDGK0SHQeZY0DBHel
 cxCiUH/AAnp6Q6ygghHPJfwjJuDy5Lyc9Uut2PD7kRgc0nKic2lA5sg9zgv9jOS5h0iP+VcdG
 PveKagHA7rpkK7Aqit+aaGDZifZ2uz62cIChmXzGRgPrNhZzgTUM1QdnK4KPn6lG2JL+8pi6M
 5w8lv0n7t+OKOB/rKbFl/AmW4Am59L4goWvJ/dU6bjlbhjBGOWml59gBVD72fNivL955W1dW1
 zZiwtF7LbkFkFRLETH5NHUX1Guy83a79LB+cFCMI4C5FWVqA3CpI09NUkbli5ES/lMcP9dnyW
 iAWyktSWTFOH6n4MYu+b4enM3BiJkGzW8eTjXhhBcODqfFMxxoJ9fexCBjh9aGcIH+dU8ER5+
 8GyY9aJ8OzNYc2vLpebk/bxohfyaas0YmQYR1iIxhAzjxAWM4ZhDbJjr14WxdpdKauJVdH8OR
 GMB2USYKLzVsq/+SvYHLuXEHw5PWcVGjIl1IjmX7OC3pMeFKQ08/S7zfkuulILtQ5WJBRl032
 Fk4k0QALNsExtUoShOS6eJhyeLN0fx16QIBngl2Suyew4bjvn0Vu279MfUiqh8L9x7/dKuscp
 RwveTbX6QPtZyhmqtohX7E43hpyZbAVoCrBxMxcKMzO/xCZW2KsqIdOza79CYoJweBoaBovaG
 7e/N9KH3uKLGN0AzbtapjhrjOQ01Kxy5Td/CPrS38ZDoUHvqvBe18+2Gv0RlfJXpEYPqflzEs
 rT+7zpHaq2u+W4eIR7MC+4gTDuVtACnaQ1sUfCMQ2aqM/RuxO4c09A6f0Mtnu3RbgmOCr74C8
 pvW/Req+51ltgZq5dOgesbhWivzIiZGtQ1fFIvhuD2YtC2RM+RzNZi7JsmSeR76YWZ8xaRtGP
 gYopg1bsi0rPWQ99TbmBxwhZ2ijDIJB6sVnBuAQKGw/OUOr6BbJ6kvaU1LxMShWsQTZhSMQw2
 +XGpMGASLpvrAOmoR/qsFaSN5KLtF1b66yldpZb/bP/fCa7WlUg/vsLUTmlaSWLMwPQ6RTerL
 abpn/Ls1NY8phXyfoIYU+wabr1x8bxSKxOdbMSFsFDCv9ik45cTfOREecf6C1VlX0XtfLHEKJ
 wOtJ3PNLHsduFS7IuXVDgco5nMWJAIdjY6a4SuLrOnqMBbAACenQuEyE7I/bJlW+XOmncB+GF
 jKnZy1W5EjrkRX7ms
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

 >> In either case sf = NULL; is not TRT but I think you are aware of
 >> that.
 >
 > No, I don't think I'm aware of that.  It's just a local variable, so
 > why assigning NULL could not be TRT?

Because it hides the underlying error.  The abort in SELECTED_FRAME is
there so we can find its cause and that's why I said you are aware of
it.  Obviously, we can set it to NULL to avoid an abort when, as in the
case at hand, we construct the mode line or the frame title.  But in
general doing such a thing in select_window is not TRT.  At least that's
what I learned from you.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 13 Mar 2020 19:43:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 13 15:43:20 2020
Received: from localhost ([127.0.0.1]:60264 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jCqDI-0004sc-7O
	for submit <at> debbugs.gnu.org; Fri, 13 Mar 2020 15:43:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54934)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jCqDH-0004sP-6l
 for 39977 <at> debbugs.gnu.org; Fri, 13 Mar 2020 15:43:19 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52313)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jCqDB-0004zt-MF; Fri, 13 Mar 2020 15:43:13 -0400
Received: from [176.228.60.248] (port=2920 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jCqDB-0000Ql-26; Fri, 13 Mar 2020 15:43:13 -0400
Date: Fri, 13 Mar 2020 21:43:11 +0200
Message-Id: <83wo7o6nxs.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: martin rudalics <rudalics@HIDDEN>
In-Reply-To: <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN> (message from
 martin rudalics on Fri, 13 Mar 2020 17:28:53 +0100)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
 <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: enometh@HIDDEN, 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Cc: 39977 <at> debbugs.gnu.org
> From: martin rudalics <rudalics@HIDDEN>
> Date: Fri, 13 Mar 2020 17:28:53 +0100
> 
> In either case sf = NULL; is not TRT but I think you are aware of
> that.

No, I don't think I'm aware of that.  It's just a local variable, so
why assigning NULL could not be TRT?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 13 Mar 2020 16:29:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 13 12:29:08 2020
Received: from localhost ([127.0.0.1]:60179 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jCnBM-00089p-Kg
	for submit <at> debbugs.gnu.org; Fri, 13 Mar 2020 12:29:08 -0400
Received: from mout.gmx.net ([212.227.15.18]:33679)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rudalics@HIDDEN>) id 1jCnBK-00089D-Ec
 for 39977 <at> debbugs.gnu.org; Fri, 13 Mar 2020 12:29:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net;
 s=badeba3b8450; t=1584116935;
 bh=+/kaq8+5Qtt5uXu9m5k4JABIsesTcICQGtNXHdstIdU=;
 h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To;
 b=YjpwOOHEhpQXObJxPdozm8IXlpWfIXGKSig7MNlctL6btfdOouI485w0aPiWrMxMp
 vPcq0XWcjvMAWkuVQVmimFgREQiPPw3DQuYK/DdeiLmgEFVU+y/pa2ftI1VEJzqDgx
 sUPdhDHMflwkZTaE0yPQfVvoYkT8r6Zb1jvzU7Lo=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.1.101] ([46.125.249.120]) by mail.gmx.com (mrgmx005
 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mjj8D-1ja0OC1HUh-00lA8o; Fri, 13
 Mar 2020 17:28:55 +0100
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
To: Eli Zaretskii <eliz@HIDDEN>, enometh@HIDDEN
References: <m3k13woybv.fsf@HIDDEN>
 <83zhcs80e5.fsf@HIDDEN> <83imj88tpt.fsf@HIDDEN>
From: martin rudalics <rudalics@HIDDEN>
Message-ID: <550fbc22-09db-d30b-c194-8f26b5dca05f@HIDDEN>
Date: Fri, 13 Mar 2020 17:28:53 +0100
MIME-Version: 1.0
In-Reply-To: <83imj88tpt.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:mdtpFr4US078oWHvwm6kehbD3rbWdtU60bnTLdqVT2hpP8INS5+
 gEVZ4Psw7RqueZ/tPH8dK+7Oq6rqfzcAI5ANxD35Ol2cfOI7Jj/6WJzjFGWSKeqLVkdSQBz
 4IoYweuFkYMMbvias+d07hpx1v25ddAKnOthYT+dTuiOOs7cvrvuwyLr8HY8wRpAPh23M7t
 HFzJ4B+WCgnGHa3Btdlkw==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:Q5EkdDVVLYk=:mOh+G1iRISLefcetaj1yoK
 /ynSdNGpTmiPA3AzapqOElLUxfi5xzvi6pKNRCoR+ER81ymUiHUgqUsi6mkET7Mi/HIqg6AZn
 Bq/ppaLkHvAleuRX8P5tV0BpCDqSC/cMM5Caxn25Fu162Wgykj1+0RiHvVvT6h0+lMp8rs3Vf
 35eb8n71D8rlyVfZNcCPg2s4Fs6b6KkjdUmqAqr3Hc01yEIS+hjkVyKF4Qu1cQ6hoOLGuzz4f
 YwJ1gf+4ZBd2j8/ucFmSmD/gpPGo714N9J4g16XGW/taBZZZgh5zX7PRDOg4Ac9RyBNb52kzg
 /RMCqdQoe31OhWiBzp1mS4CLKrrOhlb1zDB5YBve7YbcZmTtBLJuPf/FlNRHRVxd7AJTUayYH
 VV+d+DY1Q9jLgXWzLG22cMi22Bbqc8YFppcgYt7h7x5YgEXRUeiuET5Pf7sraALVO1ZdNuPGG
 Z6sISxj5lJ0nbQ+WQrK0bf1nP0pKVeyTgoy36RUyU76ytk4tGkfhbVHkaQrM8vNQjCTc9j000
 PHqRVoMyfpYvnfbOR4otVXFC1t2t0aEPsNABbOtWft6Ts5L+oePGAOst/nNoKdOyxlvp4VZ9p
 mO2D+e9v5w6kNZq1+mzHp4/r0uKGUtGEzx7axR0HH/uuYFqFVE4x+pX5znFUWCbY9T6o0c2Gg
 vBQNG2l39G1+gmh7qJm/48+fdw9cuSy2vZA4sYPhQnklR4yn03JrnkKvbDutACSsqgA4JTTjc
 dkJfn/1yh0VP7ITmBQe4pxKCbtyIzF5AL02yMGG9dl1K31tpVoZK+Qney9XIoKQmAo4G8tgaz
 T6auSVVC2/ZLGEAVzOw2ln3PRWVP+GmB7NTc+CxJyucPzslPnJgjF/wPB3LBRYy/Wv+gZGb1/
 gBq6X0sMhw5IJxD+SpeWRY/B+8pm1hFKSizDC/ZEYNMJhU2/OaZh2/UEZCWvDDAmgvl5VWyyG
 NA11S2/KMM/PUhR6wSgwb3htIZaYqnyP5lsRAmDjJi/8oyxlu53rzvCblBTntS22KjWJ8qChw
 ukMSVWW0WlBb7i5BTFPEiUQTMUSSxlfxB1bi5Xf0r5VTHKHEygrUzmI53HduEj8Aat69eHihk
 uyRS8s6tFikblodXO/VpjIIjuB2+fqz6a4BmvDqbneTFCpZNPJE3oZGRakTZax2xzh7zoFqkt
 toL6v7BS2RVzyBJDXsuPD6nJLR1TWZ4GLDbToxL1aN4PSM7P6JcuZgsnrA2sB5RSPMSoLeixg
 083Z9z1v6M2q0b8EC
X-Spam-Score: 0.8 (/)
X-Debbugs-Envelope-To: 39977
Cc: 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.2 (/)

 > Martin, any thoughts or comments about this?

The selected frame must be invariantly live.  Madhu, could you find out
why we apparently manage to return from delete_frame in frame.c without
selecting another frame?

The dividing area is the part written as

   /* At this point, we are committed to deleting the frame.
      There is no more chance for errors to prevent it.  */
   minibuffer_selected = EQ (minibuf_window, selected_window);
   sf = SELECTED_FRAME ();
   /* Don't let the frame remain selected.  */
   if (f == sf)

starting around line 2012 in delete_frame.  Put a breakpoint anywhere
there and run your sly function.  If the (f == sf) check is not true, we
are lost.  Otherwise, try to step through the following FOR_EACH_FRAME
and tell us why it doesn't break out of that loop (and the subsequent
one).  It requires a bit of intuition, but since you probably will not
have more than one frame you should be able to find out quickly.

Other than that I cannot imagine what could have gone wrong here and/or
how to test this.  In either case sf = NULL; is not TRT but I think you
are aware of that.

martin




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 13 Mar 2020 09:55:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 13 05:55:37 2020
Received: from localhost ([127.0.0.1]:58186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jCh2X-0003kN-9f
	for submit <at> debbugs.gnu.org; Fri, 13 Mar 2020 05:55:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34621)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jCh2W-0003kC-Js
 for 39977 <at> debbugs.gnu.org; Fri, 13 Mar 2020 05:55:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54324)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jCh2Q-0003ii-UX; Fri, 13 Mar 2020 05:55:30 -0400
Received: from [176.228.60.248] (port=2738 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jCh2O-0002ud-IX; Fri, 13 Mar 2020 05:55:29 -0400
Date: Fri, 13 Mar 2020 11:55:26 +0200
Message-Id: <83imj88tpt.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: enometh@HIDDEN, martin rudalics <rudalics@HIDDEN>
In-Reply-To: <83zhcs80e5.fsf@HIDDEN> (message from Eli Zaretskii on Sat, 07
 Mar 2020 20:50:42 +0200)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN> <83zhcs80e5.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Ping!  Can you please try the proposed patch?

Martin, any thoughts or comments about this?

> Date: Sat, 07 Mar 2020 20:50:42 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: 39977 <at> debbugs.gnu.org
> 
> > From: Madhu <enometh@HIDDEN>
> > Date: Sat, 07 Mar 2020 23:13:16 +0530
> > 
> > Thanks Eli, Following up on the emacs-devel message, I recompiled emacs
> > and get substantially the same stack trace. This is with my ~/.emacs and
> > all my local customizations loaded.
> > 
> > when evaluating a form in a sly lisp buffer with
> >  (break)
> > M-x sly-eval-last-sexp
> > pops up a sly debug window in a new frame
> > quitting the window (and frame) tries to select the previous window
> > and the crash apparently happens at this point. I'm attaching the
> > backtraces as attachments
> > 
> > With a little guidance I expect to be able to investigate this further
> 
> Thanks.  Please try the patch below, and tell if it makes the crash
> go away.
> 
> diff --git a/src/window.c b/src/window.c
> index 8cdad27..863fac4 100644
> --- a/src/window.c
> +++ b/src/window.c
> @@ -541,8 +541,11 @@ select_window (Lisp_Object window, Lisp_Object norecord,
>    else
>      redisplay_other_windows ();
>  
> -  sf = SELECTED_FRAME ();
> -  if (XFRAME (WINDOW_FRAME (w)) != sf)
> +  if (FRAMEP (selected_frame) && FRAME_LIVE_P (XFRAME (selected_frame)))
> +    sf = XFRAME (selected_frame);
> +  else
> +    sf = NULL;
> +  if (!sf || XFRAME (WINDOW_FRAME (w)) != sf)
>      {
>        fset_selected_window (XFRAME (WINDOW_FRAME (w)), window);
>        /* Use this rather than Fhandle_switch_frame
> 
> 
> 
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at 39977 <at> debbugs.gnu.org:


Received: (at 39977) by debbugs.gnu.org; 7 Mar 2020 18:50:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 07 13:50:52 2020
Received: from localhost ([127.0.0.1]:47555 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jAeXD-00068o-UP
	for submit <at> debbugs.gnu.org; Sat, 07 Mar 2020 13:50:52 -0500
Received: from eggs.gnu.org ([209.51.188.92]:48863)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1jAeXC-00068c-6T
 for 39977 <at> debbugs.gnu.org; Sat, 07 Mar 2020 13:50:51 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42302)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1jAeX6-0000E7-AF; Sat, 07 Mar 2020 13:50:44 -0500
Received: from [176.228.60.248] (port=1426 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1jAeX5-0001D9-EP; Sat, 07 Mar 2020 13:50:44 -0500
Date: Sat, 07 Mar 2020 20:50:42 +0200
Message-Id: <83zhcs80e5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Madhu <enometh@HIDDEN>
In-Reply-To: <m3k13woybv.fsf@HIDDEN> (message from Madhu on
 Sat, 07 Mar 2020 23:13:16 +0530)
Subject: Re: bug#39977: 28.0.50; Unhelpful stack trace
References: <m3k13woybv.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 39977
Cc: 39977 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> From: Madhu <enometh@HIDDEN>
> Date: Sat, 07 Mar 2020 23:13:16 +0530
> 
> Thanks Eli, Following up on the emacs-devel message, I recompiled emacs
> and get substantially the same stack trace. This is with my ~/.emacs and
> all my local customizations loaded.
> 
> when evaluating a form in a sly lisp buffer with
>  (break)
> M-x sly-eval-last-sexp
> pops up a sly debug window in a new frame
> quitting the window (and frame) tries to select the previous window
> and the crash apparently happens at this point. I'm attaching the
> backtraces as attachments
> 
> With a little guidance I expect to be able to investigate this further

Thanks.  Please try the patch below, and tell if it makes the crash
go away.

diff --git a/src/window.c b/src/window.c
index 8cdad27..863fac4 100644
--- a/src/window.c
+++ b/src/window.c
@@ -541,8 +541,11 @@ select_window (Lisp_Object window, Lisp_Object norecord,
   else
     redisplay_other_windows ();
 
-  sf = SELECTED_FRAME ();
-  if (XFRAME (WINDOW_FRAME (w)) != sf)
+  if (FRAMEP (selected_frame) && FRAME_LIVE_P (XFRAME (selected_frame)))
+    sf = XFRAME (selected_frame);
+  else
+    sf = NULL;
+  if (!sf || XFRAME (WINDOW_FRAME (w)) != sf)
     {
       fset_selected_window (XFRAME (WINDOW_FRAME (w)), window);
       /* Use this rather than Fhandle_switch_frame




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Mar 2020 18:08:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Mar 07 13:08:04 2020
Received: from localhost ([127.0.0.1]:47521 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jAdrm-00039j-0q
	for submit <at> debbugs.gnu.org; Sat, 07 Mar 2020 13:08:04 -0500
Received: from lists.gnu.org ([209.51.188.17]:53429)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <enometh@HIDDEN>) id 1jAdri-00039J-Mt
 for submit <at> debbugs.gnu.org; Sat, 07 Mar 2020 13:08:00 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:58219)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <enometh@HIDDEN>) id 1jAdrc-00083B-Oi
 for bug-gnu-emacs@HIDDEN; Sat, 07 Mar 2020 13:07:58 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: ****
X-Spam-Status: No, score=4.9 required=5.0 tests=BAYES_50,FILL_THIS_FORM,
 RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_NONE,T_FILL_THIS_FORM_LOAN,URIBL_BLOCKED
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <enometh@HIDDEN>) id 1jAdrW-0002Ci-M3
 for bug-gnu-emacs@HIDDEN; Sat, 07 Mar 2020 13:07:52 -0500
Received: from [117.193.3.70] (port=56264 helo=localhost.localdomain)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <enometh@HIDDEN>) id 1jAdrU-00022b-7J
 for bug-gnu-emacs@HIDDEN; Sat, 07 Mar 2020 13:07:46 -0500
Received: (qmail 24354 invoked by uid 500); 7 Mar 2020 17:43:16 -0000
From: Madhu <enometh@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 28.0.50; Unhelpful stack trace
Date: Sat, 07 Mar 2020 23:13:16 +0530
Message-ID: <m3k13woybv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no
 timestamps) [generic] [fuzzy]
X-Received-From: 117.193.3.70
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--=-=-=
Content-Type: text/plain


Thanks Eli, Following up on the emacs-devel message, I recompiled emacs
and get substantially the same stack trace. This is with my ~/.emacs and
all my local customizations loaded.

when evaluating a form in a sly lisp buffer with
 (break)
M-x sly-eval-last-sexp
pops up a sly debug window in a new frame
quitting the window (and frame) tries to select the previous window
and the crash apparently happens at this point. I'm attaching the
backtraces as attachments

With a little guidance I expect to be able to investigate this further


--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=bt.txt
Content-Description: bt

Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=6,
    backtrace_limit=40) at ../../src/emacs.c:371
371       signal (sig, SIG_DFL);
(gdb) back
#0  terminate_due_to_signal (sig=6, backtrace_limit=40)
    at ../../src/emacs.c:371
#1  0x000000000061aacd in emacs_abort () at ../../src/sysdep.c:2448
#2  0x00000000004ca88d in select_window (window=XIL(0x2d3a375),
    norecord=XIL(0x30), inhibit_point_swap=false) at ../../src/window.c:544
#3  0x00000000004caa4a in Fselect_window (window=XIL(0x2d3a375),
    norecord=XIL(0x30)) at ../../src/window.c:630
#4  0x0000000000474046 in gui_consider_frame_title (frame=XIL(0x2eb2255))
    at ../../src/xdisp.c:12318
#5  0x0000000000483e35 in redisplay_window (window=XIL(0x2d3a375),
    just_this_one_p=false) at ../../src/xdisp.c:18940
#6  0x000000000047a9b3 in redisplay_window_0 (window=XIL(0x2d3a375))
    at ../../src/xdisp.c:16179
#7  0x00000000007069ee in internal_condition_case_1 (
    bfun=0x47a971 <redisplay_window_0>, arg=XIL(0x2d3a375),
    handlers=XIL(0x7ffff4c2accb), hfun=0x47a939 <redisplay_window_error>)
    at ../../src/eval.c:1379
#8  0x000000000047a90f in redisplay_windows (window=XIL(0x2d3a375))
    at ../../src/xdisp.c:16159
#9  0x0000000000479845 in redisplay_internal () at ../../src/xdisp.c:15627
#10 0x0000000000477c11 in redisplay () at ../../src/xdisp.c:14854
#11 0x00000000005ee84b in read_char (commandflag=1, map=XIL(0x2fa0d43),
    prev_event=XIL(0), used_mouse_menu=0x7fffffffd7ef, end_time=0x0)
    at ../../src/keyboard.c:2493
#12 0x00000000005fd862 in read_key_sequence (keybuf=0x7fffffffd9f0,
    prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true,
    fix_current_buffer=true, prevent_redisplay=false)
    at ../../src/keyboard.c:9549
#13 0x00000000005eb9d6 in command_loop_1 () at ../../src/keyboard.c:1350
#14 0x0000000000706947 in internal_condition_case (
    bfun=0x5eb590 <command_loop_1>, handlers=XIL(0x90),
    hfun=0x5ead47 <cmd_error>) at ../../src/eval.c:1355
#15 0x00000000005eb263 in command_loop_2 (ignore=XIL(0))
    at ../../src/keyboard.c:1091
#16 0x0000000000706200 in internal_catch (tag=XIL(0xd4d0),
    func=0x5eb23a <command_loop_2>, arg=XIL(0)) at ../../src/eval.c:1116
#17 0x00000000005eb205 in command_loop () at ../../src/keyboard.c:1070
#18 0x00000000005ea91c in recursive_edit_1 () at ../../src/keyboard.c:714
#19 0x00000000005eaa9e in Frecursive_edit () at ../../src/keyboard.c:786
#20 0x00000000005e3245 in main (argc=7, argv=0x7fffffffdec8)
    at ../../src/emacs.c:2059

Lisp Backtrace:
"redisplay_internal (C function)" (0x0)


--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=bt-full.txt
Content-Description: bt full, xbacktrace

(gdb) bt full
#0  terminate_due_to_signal (sig=6, backtrace_limit=40)
    at ../../src/emacs.c:371
No locals.
#1  0x000000000061aacd in emacs_abort () at ../../src/sysdep.c:2448
No locals.
#2  0x00000000004ca88d in select_window (window=XIL(0x2d3a375),
    norecord=XIL(0x30), inhibit_point_swap=false) at ../../src/window.c:544
        w = 0x2d3a370
        sf = 0xda68b0 <lispsym+48>
#3  0x00000000004caa4a in Fselect_window (window=XIL(0x2d3a375),
    norecord=XIL(0x30)) at ../../src/window.c:630
No locals.
#4  0x0000000000474046 in gui_consider_frame_title (frame=XIL(0x2eb2255))
    at ../../src/xdisp.c:12318
        tail = XIL(0xf892b3)
        fmt = XIL(0x255e1d0)
        title_start = 42970910693
        len = 4999411
        count = 7
        other_frame = XIL(0x14ba8c5)
        title = 0x7fffffff96e0 "\320\341U\002"
        it = {
          window = XIL(0x1fb77b0),

          w = 0x0,
          f = 0x0,
          method = GET_FROM_BUFFER,
          stop_charpos = 2,
          prev_stop = 0,
          base_level_stop = 0,
          end_charpos = 0,
          s = 0x0,
          string_nchars = 0,
          redisplay_end_trigger_charpos = 0,
          multibyte_p = false,
          tab_line_p = false,
          header_line_p = false,
          string_from_display_prop_p = false,
          string_from_prefix_prop_p = false,
          from_disp_prop_p = false,
          ellipsis_p = false,
          avoid_cursor_p = false,
          dp = 0x0,
          dpvec = 0x0,
          dpend = 0x0,
          dpvec_char_len = 0,
          dpvec_face_id = 0,
          saved_face_id = 0,
          ctl_chars = {XIL(0) <repeats 12 times>, XIL(0xffffffffffffffff), XIL(0xffffffffffffffff), XIL(0xffffffffffffffff), XIL(0xffffffff)},
          start = {
            pos = {
              charpos = 0,
              bytepos = 0
            },
            overlay_string_index = 0,
            string_pos = {
              charpos = 0,
              bytepos = 0
            },
            dpvec_index = 0
          },
          current = {
            pos = {
              charpos = 0,
              bytepos = 0
            },
            overlay_string_index = 0,
            string_pos = {
              charpos = 0,
              bytepos = 0
            },
            dpvec_index = 0
          },
          n_overlay_strings = 0,
          overlay_strings_charpos = 0,
          overlay_strings = {XIL(0) <repeats 16 times>},
          string_overlays = {XIL(0) <repeats 16 times>},
          string = XIL(0),
          from_overlay = XIL(0),
          stack = {{
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 0,
              base_level_stop = 0,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 0,
                lookback = 0,
                nglyphs = 0,
                reversed_p = false,
                charpos = 0,
                nchars = 0,
                nbytes = 0,
                from = 0,
                to = 0,
                width = 0
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0)
                },
                xwidget = {
                  object = XIL(0)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 0
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 0,
                  bytepos = 0
                },
                dpvec_index = 0
              },
              from_overlay = XIL(0),
              area = LEFT_MARGIN_AREA,
              method = GET_FROM_BUFFER,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 0,
              base_level_stop = 0,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 0,
                lookback = 0,
                nglyphs = 0,
                reversed_p = false,
                charpos = 0,
                nchars = 0,
                nbytes = 0,
                from = 0,
                to = 0,
                width = 0
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0)
                },
                xwidget = {
                  object = XIL(0)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 0
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 0,
                  bytepos = 0
                },
                dpvec_index = 0
              },
              from_overlay = XIL(0),
              area = LEFT_MARGIN_AREA,
              method = GET_FROM_BUFFER,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 0,
              base_level_stop = 0,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 0,
                lookback = 0,
                nglyphs = 0,
                reversed_p = false,
                charpos = 0,
                nchars = 0,
                nbytes = 0,
                from = 0,
                to = 0,
                width = 0
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0)
                },
                xwidget = {
                  object = XIL(0)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 0
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 0,
                  bytepos = 0
                },
                dpvec_index = 0
              },
              from_overlay = XIL(0),
              area = LEFT_MARGIN_AREA,
              method = GET_FROM_BUFFER,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 0,
              base_level_stop = 0,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 0,
                lookback = 0,
                nglyphs = 0,
                reversed_p = false,
                charpos = 0,
                nchars = 0,
                nbytes = 0,
                from = 0,
                to = 0,
                width = 0
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0)
                },
                xwidget = {
                  object = XIL(0)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 0
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 0,
                  bytepos = 0
                },
                dpvec_index = 0
              },
              from_overlay = XIL(0),
              area = LEFT_MARGIN_AREA,
              method = GET_FROM_BUFFER,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 0,
              base_level_stop = 0,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 0,
                lookback = 0,
                nglyphs = 0,
                reversed_p = false,
                charpos = 0,
                nchars = 0,
                nbytes = 0,
                from = 0,
                to = 0,
                width = 0
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0)
                },
                xwidget = {
                  object = XIL(0)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 0
                },
                overlay_string_index = 8589934592,
                string_pos = {
                  charpos = 7,
                  bytepos = 283467841538
                },
                dpvec_index = 1
              },
              from_overlay = XIL(0xc),
              area = ANY_AREA,
              method = 4294967295,
              paragraph_embedding = (R2L | unknown: 4294967292),
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }},
          sp = 0,
          selective = 0,
          what = IT_CHARACTER,
          face_id = 0,
          selective_display_ellipsis_p = false,
          ctl_arrow_p = false,
          face_box_p = false,
          start_of_box_run_p = false,
          end_of_box_run_p = false,
          overlay_strings_at_end_processed_p = false,
          ignore_overlay_strings_at_pos_p = false,
          glyph_not_available_p = false,
          starts_in_middle_of_char_p = false,
          face_before_selective_p = false,
          constrain_row_ascent_descent_p = false,
          line_number_produced_p = false,
          line_wrap = TRUNCATE,
          base_face_id = 66,
          c = 0,
          len = 0,
          cmp_it = {
            stop_pos = 0,
            id = 0,
            ch = 0,
            rule_idx = 0,
            lookback = 0,
            nglyphs = 0,
            reversed_p = false,
            charpos = 524288,
            nchars = 0,
            nbytes = 0,
            from = 28956804,
            to = 0,
            width = 15
          },
          char_to_display = 15,
          glyphless_method = GLYPHLESS_DISPLAY_THIN_SPACE,
          image_id = 8,
          xwidget = 0x1fe00000290,
          slice = {
            x = XIL(0),
            y = XIL(0xffffffff),
            width = XIL(0),
            height = XIL(0x13e8210)
          },
          space_width = XIL(0x100000001),
          voffset = 8,
          tab_width = 0,
          font_height = XIL(0x4),
          object = XIL(0x900000000),
          position = {
            charpos = 0,
            bytepos = 2821793513472
          },
          truncation_pixel_width = 0,
          continuation_pixel_width = 0,
          first_visible_x = 0,
          last_visible_x = 0,
          last_visible_y = 0,
          extra_line_spacing = 0,
          max_extra_line_spacing = 0,
          override_ascent = 0,
          override_descent = 0,
          override_boff = 0,
          glyph_row = 0x0,
          area = LEFT_MARGIN_AREA,
          nglyphs = 0,
          pixel_width = 0,
          ascent = 0,
          descent = 0,
          max_ascent = 0,
          max_descent = 0,
          phys_ascent = 0,
          phys_descent = 0,
          max_phys_ascent = 1048576,
          max_phys_descent = 0,
          current_x = 0,
          continuation_lines_width = 0,
          eol_pos = {
            charpos = 74,
            bytepos = -1
          },
          current_y = 1,
          first_vpos = 0,
          vpos = 6,
          hpos = 6,
          lnum = 6,
          lnum_bytepos = 0,
          lnum_width = 0,
          lnum_pixel_width = 0,
          pt_lnum = 15,
          tab_offset = 0,
          left_user_fringe_bitmap = 0,
          right_user_fringe_bitmap = 0,
          left_user_fringe_face_id = 15,
          right_user_fringe_face_id = 0,
          bidi_p = false,
          bidi_it = {
            bytepos = 0,
            charpos = -1,
            ch = 0,
            nchars = -1,
            ch_len = 0,
            type = 4294967295,
            type_after_wn = 4294967295,
            orig_type = UNKNOWN_BT,
            resolved_level = 0 '\000',
            isolate_level = 0 '\000',
            invalid_levels = -1,
            invalid_isolates = 0,
            prev = {
              charpos = 0,
              type = UNKNOWN_BT,
              orig_type = STRONG_L
            },
            last_strong = {
              charpos = 1,
              type = 4294967295,
              orig_type = 4294967295
            },
            next_for_neutral = {
              charpos = 0,
              type = UNKNOWN_BT,
              orig_type = UNKNOWN_BT
            },
            prev_for_neutral = {
              charpos = 0,
              type = UNKNOWN_BT,
              orig_type = UNKNOWN_BT
            },
            next_for_ws = {
              charpos = 0,
              type = UNKNOWN_BT,
              orig_type = UNKNOWN_BT
            },
            bracket_pairing_pos = 0,
            bracket_enclosed_type = UNKNOWN_BT,
            next_en_pos = 0,
            next_en_type = UNKNOWN_BT,
            sos = NEUTRAL_DIR,
            scan_dir = 0,
            disp_pos = 0,
            disp_prop = 0,
            stack_idx = 0,
            level_stack = {{
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              } <repeats 113 times>, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 6,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 7,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 7409503,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488328224,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 2,
                level = 218 '\332',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488328200,
                next_for_neutral_type = 3,
                last_strong_type = 6,
                prev_for_neutral_type = 3,
                level = 76 'L',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 0,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 1,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 1,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 7409503,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488328368,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 2,
                level = 218 '\332',
                flags = 0 '\000'
              }},
            string = {
              lstring = XIL(0),
              s = 0x0,
              schars = 140737488328344,
              bufpos = 4999411,
              from_disp_str = false,
              unibyte = false
            },
            w = 0xcffff96b0,
            paragraph_dir = (unknown: 21237728),
            separator_limit = 140737488328392,
            first_elt = false,
            new_paragraph = false,
            frame_window_p = false
          },
          paragraph_embedding = NEUTRAL_DIR
        }
        f = 0x2eb2250
#5  0x0000000000483e35 in redisplay_window (window=XIL(0x2d3a375), just_this_one_p=false) at ../../src/xdisp.c:18940
        redisplay_menu_p = false
        w = 0x2d3a370
        f = 0x2eb2250
        buffer = 0x1440fe0
        old = 0x13caa30
        lpoint = {
          charpos = 2787,
          bytepos = 2787
        }
        opoint = {
          charpos = 912,
          bytepos = 912
        }
        startp = {
          charpos = 1,
          bytepos = 1
        }
        update_mode_line = true
        tem = 0
        it = {
          window = XIL(0),
          w = 0x7fff00000000,
          f = 0x1,
          method = 4104821184,
          stop_charpos = 0,
          prev_stop = 140737302855048,
          base_level_stop = 2,
          end_charpos = 140737302855048,
          s = 0x7fffffffaae0 "\020\253\377\377\377\177",
          string_nchars = 51546786412,
          redisplay_end_trigger_charpos = 140737298209216,
          multibyte_p = false,
          tab_line_p = false,
          header_line_p = false,
          string_from_display_prop_p = true,
          string_from_prefix_prop_p = false,
          from_disp_prop_p = false,
          ellipsis_p = false,
          avoid_cursor_p = true,
          dp = 0x646770 <PSEUDOVECTORP+57>,
          dpvec = 0x7ffff4f17d88,
          dpend = 0x7fffffffab10,
          dpvec_char_len = 7178860,
          dpvec_face_id = 0,
          saved_face_id = -185500280,
          ctl_chars = {XIL(0x7ffff4f17d88), XIL(0x6d3394), XIL(0x7ffff4aa99c0), XIL(0x7fffffffab50), XIL(0x6da345), XIL(0xda68e0), XIL(0x60), XIL(0x60), XIL(0x7fffffffab50), XIL(0x6d1d0b), XIL(0x200da9790), XIL(0x7fffffffab80), make_fixnum(1796336), XIL(0x7ffff4f17d88), XIL(0x2f10), make_fixnum(1608010)},
          start = {
            pos = {
              charpos = 48,
              bytepos = 140737488333776
            },
            overlay_string_index = 6457591,
            string_pos = {
              charpos = 140737298209221,
              bytepos = 12048
            },
            dpvec_index = -21328
          },
          current = {
            pos = {
              charpos = 134656,
              bytepos = 140737488334016
            },
            overlay_string_index = 66560,
            string_pos = {
              charpos = 71680,
              bytepos = 140737342230257
            },
            dpvec_index = -21520
          },
          n_overlay_strings = 0,
          overlay_strings_charpos = 578343116370176,
          overlay_strings = {XIL(0x20f0000027900), XIL(0x1040000000800), XIL(0x1150000001000), XIL(0x7fffffffacb0), XIL(0x7fffffffac40), XIL(0x7fffffffacc0), XIL(0), XIL(0), XIL(0x14b8788), XIL(0), XIL(0x14b8788), XIL(0x7fffffffb0e0), XIL(0x7fffffffacc0), XIL(0x7ffff75b5000), XIL(0x7fffffffac70), XIL(0x7fffffffb0e0)},
          string_overlays = {XIL(0x7ffff74ff93f), XIL(0x1040000000800), XIL(0x1150000001000), XIL(0x7ffff75b5000), XIL(0x7ffff75b5000), XIL(0x7fffffffada0), XIL(0x10400), XIL(0x11500), XIL(0x7ffff74a4ef1), XIL(0x7fffffffacd0), make_fixnum(644245094), XIL(0x80000000000), XIL(0x100000010400), XIL(0x1040000000800), XIL(0x1150000001000), XIL(0x100000001)},
          string = XIL(0x7fffffffad20),
          from_overlay = XIL(0x7fffffffada0),
          stack = {{
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 21727112,
              stop_charpos = 0,
              prev_stop = 21727112,
              base_level_stop = 140737488335296,
              cmp_it = {
                stop_pos = 140737488334240,
                id = 140737343344640,
                ch = -21168,
                rule_idx = 140737488335296,
                lookback = 140737342601535,
                nglyphs = 2048,
                reversed_p = false,
                charpos = 304564720898048,
                nchars = -145010688,
                nbytes = 32767,
                from = -145010688,
                to = 32767,
                width = 0
              },
              face_id = -21088,
              u = {
                image = {
                  object = XIL(0x14b8788),
                  slice = {
                    x = make_fixnum(35184335650967),
                    y = XIL(0),
                    width = make_fixnum(1147967545016739430),
                    height = XIL(0x80000000000)
                  },
                  image_id = 17592186110976
                },
                stretch = {
                  object = XIL(0x14b8788)
                },
                xwidget = {
                  object = XIL(0x14b8788)
                }
              },
              position = {
                charpos = 70912,
                bytepos = 24760068
              },
              current = {
                pos = {
                  charpos = 4294967297,
                  bytepos = 1
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 140737488334320,
                  bytepos = 137438953473
                },
                dpvec_index = -21040
              },
              from_overlay = XIL(0x1040000000800),
              area = 4096,
              method = 70912,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 20006912,
              base_level_stop = 140737342267172,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 28934560,
                rule_idx = 140737342698257,
                lookback = 0,
                nglyphs = -19664,
                reversed_p = 255,
                charpos = 28934192,
                nchars = -145651728,
                nbytes = 32767,
                from = -19664,
                to = 32767,
                width = -145754281
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0x1),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0x1)
                },
                xwidget = {
                  object = XIL(0x1)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 0
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 0,
                  bytepos = 0
                },
                dpvec_index = 0
              },
              from_overlay = XIL(0),
              area = LEFT_MARGIN_AREA,
              method = GET_FROM_BUFFER,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0),
              string_nchars = 0,
              end_charpos = 0,
              stop_charpos = 0,
              prev_stop = 0,
              base_level_stop = 0,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 0,
                lookback = 0,
                nglyphs = 0,
                reversed_p = false,
                charpos = 0,
                nchars = 0,
                nbytes = 0,
                from = 0,
                to = 0,
                width = 0
              },
              face_id = 0,
              u = {
                image = {
                  object = XIL(0),
                  slice = {
                    x = XIL(0),
                    y = XIL(0),
                    width = XIL(0),
                    height = XIL(0)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0)
                },
                xwidget = {
                  object = XIL(0)
                }
              },
              position = {
                charpos = 0,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 0,
                  bytepos = 140737342232866
                },
                overlay_string_index = 0,
                string_pos = {
                  charpos = 140737342232866,
                  bytepos = 0
                },
                dpvec_index = -20196
              },
              from_overlay = XIL(0),
              area = 28934192,
              method = GET_FROM_BUFFER,
              paragraph_embedding = (unknown: 4294947024),
              multibyte_p = true,
              string_from_display_prop_p = true,
              string_from_prefix_prop_p = true,
              display_ellipsis_p = true,
              avoid_cursor_p = true,
              bidi_p = true,
              from_disp_prop_p = true,
              line_wrap = (unknown: 28934192),
              voffset = 0,
              space_width = XIL(0x7fffffffb0e0),
              font_height = XIL(0x187ff90)
            }, {
              string = XIL(0x7fffffffb11c),
              string_nchars = -146121034,
              end_charpos = 285873023223808,
              stop_charpos = 304564720898048,
              prev_stop = 25690000,
              base_level_stop = 140737343344640,
              cmp_it = {
                stop_pos = 0,
                id = 0,
                ch = 0,
                rule_idx = 140737342244925,
                lookback = 0,
                nglyphs = -146099503,
                reversed_p = 255,
                charpos = 4591870180066957722,
                nchars = 28934192,
                nbytes = 0,
                from = 28934192,
                to = 0,
                width = 2
              },
              face_id = -8388608,
              u = {
                image = {
                  object = XIL(0x800ffffff),
                  slice = {
                    x = XIL(0x800000104),
                    y = make_fixnum(35184335558216),
                    width = XIL(0x29000000000),
                    height = XIL(0x7fffffffb1fc)
                  },
                  image_id = 34359738628
                },
                stretch = {
                  object = XIL(0x800ffffff)
                },
                xwidget = {
                  object = XIL(0x800ffffff)
                }
              },
              position = {
                charpos = 34359738385,
                bytepos = 34359738628
              },
              current = {
                pos = {
                  charpos = 28934192,
                  bytepos = 140737488335296
                },
                overlay_string_index = 25690000,
                string_pos = {
                  charpos = 140737488335356,
                  bytepos = 140737342234294
                },
                dpvec_index = 2048
              },
              from_overlay = XIL(0x1150000001000),
              area = 25690000,
              method = GET_FROM_BUFFER,
              paragraph_embedding = (unknown: 4149956608),
              multibyte_p = true,
              string_from_display_prop_p = true,
              string_from_prefix_prop_p = true,
              display_ellipsis_p = true,
              avoid_cursor_p = true,
              bidi_p = true,
              from_disp_prop_p = true,
              line_wrap = TRUNCATE,
              voffset = 0,
              space_width = XIL(0),
              font_height = XIL(0)
            }, {
              string = XIL(0x7ffff74a883d),
              string_nchars = 0,
              end_charpos = 140737342255825,
              stop_charpos = 4591870180066957722,
              prev_stop = 28934192,
              base_level_stop = 28934192,
              cmp_it = {
                stop_pos = -36028797018963966,
                id = 72057594029539328,
                ch = 16777215,
                rule_idx = 34359738628,
                lookback = 17,
                nglyphs = 0,
                reversed_p = 144,
                charpos = 34359738912,
                nchars = 260,
                nbytes = 8,
                from = 17,
                to = 8,
                width = 260
              },
              face_id = 17,
              u = {
                image = {
                  object = XIL(0x7fffffffb330),
                  slice = {
                    x = XIL(0x20f00),
                    y = XIL(0x22000),
                    width = XIL(0x7ffff74a4ef1),
                    height = XIL(0x7fffffffb260)
                  },
                  image_id = 0
                },
                stretch = {
                  object = XIL(0x7fffffffb330)
                },
                xwidget = {
                  object = XIL(0x7fffffffb330)
                }
              },
              position = {
                charpos = 24,
                bytepos = 0
              },
              current = {
                pos = {
                  charpos = 579442627840000,
                  bytepos = 598134325676032
                },
                overlay_string_index = 12884901888,
                string_pos = {
                  charpos = 140737488335536,
                  bytepos = 140737488335664
                },
                dpvec_index = 0
              },
              from_overlay = XIL(0),
              area = 21727112,
              method = GET_FROM_BUFFER,
              paragraph_embedding = NEUTRAL_DIR,
              multibyte_p = false,
              string_from_display_prop_p = false,
              string_from_prefix_prop_p = false,
              display_ellipsis_p = false,
              avoid_cursor_p = false,
              bidi_p = false,
              from_disp_prop_p = false,
              line_wrap = (unknown: 21727112),
              voffset = 0,
              space_width = XIL(0x7fffffffb750),
              font_height = XIL(0x7fffffffb330)
            }},
          sp = -145010688,
          selective = 140737488335584,
          what = 4294948688,
          face_id = 32767,
          selective_display_ellipsis_p = true,
          ctl_arrow_p = true,
          face_box_p = true,
          start_of_box_run_p = true,
          end_of_box_run_p = true,
          overlay_strings_at_end_processed_p = true,
          ignore_overlay_strings_at_pos_p = false,
          glyph_not_available_p = false,
          starts_in_middle_of_char_p = true,
          face_before_selective_p = false,
          constrain_row_ascent_descent_p = false,
          line_number_produced_p = true,
          line_wrap = (WORD_WRAP | WINDOW_WRAP | unknown: 32764),
          base_face_id = 2048,
          c = 134912,
          len = 165888,
          cmp_it = {
            stop_pos = 140737343344640,
            id = 140737343344640,
            ch = 0,
            rule_idx = 140737488335664,
            lookback = 21727112,
            nglyphs = -145751458,
            reversed_p = 255,
            charpos = 0,
            nchars = -1717986918,
            nbytes = 1069128089,
            from = 0,
            to = 2048,
            width = 134912
          },
          char_to_display = 139264,
          glyphless_method = GLYPHLESS_DISPLAY_THIN_SPACE,
          image_id = 25690052,
          xwidget = 0x100000001,
          slice = {
            x = XIL(0x1),
            y = XIL(0),
            width = XIL(0x7fffffffb380),
            height = XIL(0x2000000001)
          },
          space_width = XIL(0x7fffffffb360),
          voffset = 2048,
          tab_width = 0,
          font_height = XIL(0x2200000028800),
          object = XIL(0x7fffffffb4f0),
          position = {
            charpos = 0,
            bytepos = 24760016
          },
          truncation_pixel_width = 0,
          continuation_pixel_width = 0,
          first_visible_x = 0,
          last_visible_x = 28934192,
          last_visible_y = 0,
          extra_line_spacing = 0,
          max_extra_line_spacing = 0,
          override_ascent = 28934192,
          override_descent = 0,
          override_boff = 2,
          glyph_row = 0x7fffffffb4f0,
          area = LEFT_MARGIN_AREA,
          nglyphs = 0,
          pixel_width = 21727112,
          ascent = 0,
          descent = 0,
          max_ascent = 1072693248,
          max_descent = 0,
          phys_ascent = -65536,
          phys_descent = 25690000,
          max_phys_ascent = 0,
          max_phys_descent = 0,
          current_x = 0,
          continuation_lines_width = 28934192,
          eol_pos = {
            charpos = 2,
            bytepos = 28934192
          },
          current_y = 2,
          first_vpos = 0,
          vpos = 0,
          hpos = 0,
          lnum = 140737488336112,
          lnum_bytepos = 0,
          lnum_width = 25690000,
          lnum_pixel_width = 0,
          pt_lnum = 140737342572238,
          tab_offset = 25690000,
          left_user_fringe_bitmap = 0,
          right_user_fringe_bitmap = 0,
          left_user_fringe_face_id = 1017496,
          right_user_fringe_face_id = 32767,
          bidi_p = false,
          bidi_it = {
            bytepos = 140737343106464,
            charpos = 21727112,
            ch = -18992,
            nchars = 0,
            ch_len = 24760016,
            type = 21726688,
            type_after_wn = UNKNOWN_BT,
            orig_type = STRONG_R,
            resolved_level = 0 '\000',
            isolate_level = 0 '\000',
            invalid_levels = 0,
            invalid_isolates = 28934192,
            prev = {
              charpos = 2,
              type = 4294948304,
              orig_type = 32767
            },
            last_strong = {
              charpos = 0,
              type = 21727112,
              orig_type = UNKNOWN_BT
            },
            next_for_neutral = {
              charpos = 140737342731440,
              type = UNKNOWN_BT,
              orig_type = UNKNOWN_BT
            },
            prev_for_neutral = {
              charpos = 25690000,
              type = 2048,
              orig_type = 66560
            },
            next_for_ws = {
              charpos = 307863255781376,
              type = UNKNOWN_BT,
              orig_type = UNKNOWN_BT
            },
            bracket_pairing_pos = 28934192,
            bracket_enclosed_type = STRONG_R,
            next_en_pos = 0,
            next_en_type = 4294948304,
            sos = (L2R | R2L | unknown: 32764),
            scan_dir = 0,
            disp_pos = 25690000,
            disp_prop = -145783090,
            stack_idx = 32767,
            level_stack = {{
                next_for_neutral_pos = 25690000,
                next_for_neutral_type = 0,
                last_strong_type = 3,
                prev_for_neutral_type = 2,
                level = 79 'O',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 140737343106464,
                next_for_neutral_type = 0,
                last_strong_type = 1,
                prev_for_neutral_type = 6,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 4591870180066957722,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 2,
                last_strong_type = 6,
                prev_for_neutral_type = 0,
                level = 77 'M',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 2,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 6,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 140737488336304,
                next_for_neutral_type = 5,
                last_strong_type = 3,
                prev_for_neutral_type = 5,
                level = 77 'M',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 0,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 4,
                last_strong_type = 2,
                prev_for_neutral_type = 3,
                level = 77 'M',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 7,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 21690224,
                next_for_neutral_type = 7,
                last_strong_type = 0,
                prev_for_neutral_type = 6,
                level = 75 'K',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 21726224,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 0,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 21690224,
                next_for_neutral_type = 6,
                last_strong_type = 2,
                prev_for_neutral_type = 3,
                level = 74 'J',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = -1,
                next_for_neutral_type = 7,
                last_strong_type = 7,
                prev_for_neutral_type = 7,
                level = 255 '\377',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 72340172838076673,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 3,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 21726224,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 0,
                level = 65 'A',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488346816,
                next_for_neutral_type = 2,
                last_strong_type = 1,
                prev_for_neutral_type = 2,
                level = 80 'P',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 42256736,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 5,
                level = 132 '\204',
                flags = 2 '\002'
              }, {
                next_for_neutral_pos = 18615664,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 0,
                level = 65 'A',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488346816,
                next_for_neutral_type = 2,
                last_strong_type = 4,
                prev_for_neutral_type = 4,
                level = 74 'J',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 16777215,
                next_for_neutral_type = 4,
                last_strong_type = 1,
                prev_for_neutral_type = 6,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 21726688,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 7,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 21726688,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 0,
                level = 185 '\271',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 140737488336720,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488336780,
                next_for_neutral_type = 6,
                last_strong_type = 6,
                prev_for_neutral_type = 2,
                level = 74 'J',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 579442627840000,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 2 '\002',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 91 '[',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 5,
                last_strong_type = 7,
                prev_for_neutral_type = 0,
                level = 74 'J',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 1,
                last_strong_type = 2,
                prev_for_neutral_type = 3,
                level = 74 'J',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 4591870180066957722,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 0,
                level = 185 '\271',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 28934192,
                next_for_neutral_type = 2,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 72057594029539328,
                next_for_neutral_type = 7,
                last_strong_type = 7,
                prev_for_neutral_type = 7,
                level = 255 '\377',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 2748779069967,
                next_for_neutral_type = 1,
                last_strong_type = 2,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 2817498546176,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 2748779069967,
                next_for_neutral_type = 1,
                last_strong_type = 2,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 2748779069967,
                next_for_neutral_type = 1,
                last_strong_type = 2,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 18615664,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 42256736,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 1,
                level = 69 'E',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 24,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488336880,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 7,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 4294967296,
                next_for_neutral_type = 3,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 7,
                last_strong_type = 7,
                prev_for_neutral_type = 7,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 137438953472,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 72 'H',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 4294967296,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 2,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 3,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 536870912,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 72 'H',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 140737488337092,
                next_for_neutral_type = 0,
                last_strong_type = 7,
                prev_for_neutral_type = 3,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 140737488337184,
                next_for_neutral_type = 6,
                last_strong_type = 5,
                prev_for_neutral_type = 6,
                level = 73 'I',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 20889061,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 6,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 51941424,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 1,
                level = 69 'E',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 36756672,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488337264,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 1,
                level = 73 'I',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 1206885792144,
                next_for_neutral_type = 4,
                last_strong_type = 0,
                prev_for_neutral_type = 4,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4294967296,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 6,
                level = 15 '\017',
                flags = 3 '\003'
              }, {
                next_for_neutral_pos = 4837916,
                next_for_neutral_type = 0,
                last_strong_type = 3,
                prev_for_neutral_type = 4,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 6,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488338288,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = -281474976710653,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 1116691496968,
                next_for_neutral_type = 1,
                last_strong_type = 2,
                prev_for_neutral_type = 4,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 85899345928,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 21313616,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 6,
                level = 15 '\017',
                flags = 3 '\003'
              }, {
                next_for_neutral_pos = 51859424,
                next_for_neutral_type = 1,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488337280,
                next_for_neutral_type = 1,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 36756672,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 72 'H',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488337760,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 25690000,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 0,
                level = 24 '\030',
                flags = 3 '\003'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 28934192,
                next_for_neutral_type = 2,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488337760,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 21727112,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 2,
                level = 81 'Q',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 2,
                last_strong_type = 3,
                prev_for_neutral_type = 7,
                level = 73 'I',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 0,
                level = 185 '\271',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 2,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488337760,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 6,
                last_strong_type = 1,
                prev_for_neutral_type = 3,
                level = 79 'O',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 3,
                prev_for_neutral_type = 2,
                level = 79 'O',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 21690224,
                next_for_neutral_type = 0,
                last_strong_type = 1,
                prev_for_neutral_type = 6,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 4591870180066957722,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 7,
                level = 75 'K',
                flags = 1 '\001'
              }, {
                next_for_neutral_pos = 2,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 5,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 21727112,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 5,
                last_strong_type = 6,
                prev_for_neutral_type = 6,
                level = 75 'K',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 5,
                prev_for_neutral_type = 4,
                level = 75 'K',
                flags = 247 '\367'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 2,
                prev_for_neutral_type = 2,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 579442627840000,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 2 '\002',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 24,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488337792,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 6,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 4294967296,
                next_for_neutral_type = 3,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 4607182418800017408,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 4,
                prev_for_neutral_type = 0,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 1,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 7409503,
                next_for_neutral_type = 0,
                last_strong_type = 7,
                prev_for_neutral_type = 3,
                level = 241 '\361',
                flags = 244 '\364'
              }, {
                next_for_neutral_pos = 140737488338064,
                next_for_neutral_type = 0,
                last_strong_type = 7,
                prev_for_neutral_type = 3,
                level = 241 '\361',
                flags = 244 '\364'
              }, {
                next_for_neutral_pos = 140737488338256,
                next_for_neutral_type = 4,
                last_strong_type = 3,
                prev_for_neutral_type = 2,
                level = 109 'm',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737488338040,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 49443859,
                next_for_neutral_type = 0,
                last_strong_type = 7,
                prev_for_neutral_type = 3,
                level = 241 '\361',
                flags = 244 '\364'
              }, {
                next_for_neutral_pos = 140737298209216,
                next_for_neutral_type = 0,
                last_strong_type = 5,
                prev_for_neutral_type = 2,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 5001441,
                next_for_neutral_type = 2,
                last_strong_type = 6,
                prev_for_neutral_type = 3,
                level = 77 'M',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 140737298209221,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 3,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 5009665,
                next_for_neutral_type = 5,
                last_strong_type = 0,
                prev_for_neutral_type = 7,
                level = 170 '\252',
                flags = 244 '\364'
              }, {
                next_for_neutral_pos = 140737488338176,
                next_for_neutral_type = 5,
                last_strong_type = 0,
                prev_for_neutral_type = 2,
                level = 77 'M',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 14326896,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 7,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 13296,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 4,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }, {
                next_for_neutral_pos = 0,
                next_for_neutral_type = 0,
                last_strong_type = 6,
                prev_for_neutral_type = 4,
                level = 255 '\377',
                flags = 255 '\377'
              }, {
                next_for_neutral_pos = 14313600,
                next_for_neutral_type = 0,
                last_strong_type = 0,
                prev_for_neutral_type = 0,
                level = 0 '\000',
                flags = 0 '\000'
              }},
            string = {
              lstring = XIL(0),
              s = 0x7fffffffbd50 "\220\275\377\377\377\177",
              schars = 7150859,
              bufpos = 140737298900160,
              from_disp_str = false,
              unibyte = false
            },
            w = 0x7ffff4b524c0,
            paragraph_dir = (unknown: 4294950288),
            separator_limit = 7178860,
            first_elt = false,
            new_paragraph = false,
            frame_window_p = false
          },
          paragraph_embedding = (unknown: 4105512128)
        }
        current_matrix_up_to_date_p = false
        used_current_matrix_p = false
        buffer_unchanged_p = true
        temp_scroll_step = false
        count = 6
        rc = 0
        centering_position = -1
        last_line_misfit = false
        beg_unchanged = 0
        end_unchanged = 912
        frame_line_height = 20
        margin = 0
        use_desired_matrix = false
        itdata = 0x0
#6  0x000000000047a9b3 in redisplay_window_0 (window=XIL(0x2d3a375)) at ../../src/xdisp.c:16179
No locals.
#7  0x00000000007069ee in internal_condition_case_1 (bfun=0x47a971 <redisplay_window_0>, arg=XIL(0x2d3a375), handlers=XIL(0x7ffff4c2accb), hfun=0x47a939 <redisplay_window_error>) at ../../src/eval.c:1379
        val = XIL(0x44ea17)
        c = 0xe34b90
#8  0x000000000047a90f in redisplay_windows (window=XIL(0x2d3a375)) at ../../src/xdisp.c:16159
        w = 0x2d3a370
#9  0x0000000000479845 in redisplay_internal () at ../../src/xdisp.c:15627
        gcscrollbars = true
        f_redisplay_flag = false
        f = 0x2eb2250
        w = 0x30fdb90
        sw = 0x30fdb90
        fr = 0x1453850
        pending = false
        must_finish = true
        match_p = true
        tlbufpos = {
          charpos = 2787,
          bytepos = 2787
        }
        tlendpos = {
          charpos = 459,
          bytepos = 459
        }
        number_of_visible_frames = 3
        count = 3
        sf = 0x1453850
        polling_stopped_here = true
        tail = XIL(0x2fb7073)
        frame = XIL(0x2eb2255)
        hscroll_retries = 0
        garbaged_frame_retries = 0
        consider_all_windows_p = true
        update_miniwindow_p = true
#10 0x0000000000477c11 in redisplay () at ../../src/xdisp.c:14854
No locals.
#11 0x00000000005ee84b in read_char (commandflag=1, map=XIL(0x2fa0d43), prev_event=XIL(0), used_mouse_menu=0x7fffffffd7ef, end_time=0x0) at ../../src/keyboard.c:2493
        echo_current = true
        c = XIL(0)
        jmpcount = 14313600
        local_getcjmp = {{
            __jmpbuf = {0, 25769792928, 14313600, 0, 0, 140737488344512, 7150859, 20752949},
            __mask_was_saved = -10752,
            __saved_mask = {
              __val = {7181629, 140737297239296, 140737297239248, 0, 140737282925648, 0, 140737297239296, 14313600, 0, 0, 140737488344624, 6318522, 4103851216, 14313600, 0, 0}
            }
          }}
        save_jump = {{
            __jmpbuf = {0, 32112, 11403279980830917, 140737302856384, 40394003199754280, -8536289754134493180, 20752944, 0},
            __mask_was_saved = 0,
            __saved_mask = {
              __val = {14345712, 7150859, 0, 140737488344464, 7186180, 140737302856384, 12884890944, 0, 32112, 140737488344512, 140737302856384, 20752944, 140737488344440, 8132755, 51539607552, 14313600}
            }
          }}
        tem = XIL(0)
        save = make_fixnum(1579630)
        previous_echo_area_message = XIL(0)
        also_record = XIL(0)
        reread = false
        recorded = false
        polling_stopped_here = false
        orig_kboard = 0x121fb20
#12 0x00000000005fd862 in read_key_sequence (keybuf=0x7fffffffd9f0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at ../../src/keyboard.c:9549
        interrupted_kboard = 0x121fb20
        interrupted_frame = 0x1453850
        key = XIL(0)
        used_mouse_menu = false
        echo_local_start = 0
        last_real_key_start = 0
        keys_local_start = 0
        new_binding = XIL(0)
        count = 3
        t = 0
        echo_start = 0
        keys_start = 0
        current_binding = XIL(0x2fa0d43)
        first_unbound = 31
        mock_input = 0
        used_mouse_menu_history = {false <repeats 30 times>}
        fkey = {
          parent = XIL(0x11285d3),
          map = XIL(0x11285d3),
          start = 0,
          end = 0
        }
        keytran = {
          parent = XIL(0x7ffff4ef726b),
          map = XIL(0x7ffff4ef726b),
          start = 0,
          end = 0
        }
        indec = {
          parent = XIL(0x11285e3),
          map = XIL(0x11285e3),
          start = 0,
          end = 0
        }
        shift_translated = false
        delayed_switch_frame = XIL(0)
        original_uppercase = XIL(0)
        original_uppercase_position = -1
        dummyflag = false
        starting_buffer = 0x13caa30
        fake_prefixed_keys = XIL(0)
        first_event = XIL(0)
        second_event = XIL(0)
#13 0x00000000005eb9d6 in command_loop_1 () at ../../src/keyboard.c:1350
        cmd = XIL(0x20d5d10)
        keybuf = {make_fixnum(113), make_fixnum(5), make_fixnum(1757389), XIL(0), XIL(0x7fffffffdaa0), XIL(0x7099bf), XIL(0), XIL(0x7ffff4963cd4), XIL(0x30082f3), XIL(0x7ffff4ef7215), XIL(0x7ffff4ef7215), XIL(0x30082f3), XIL(0x7ffff4963cd4), XIL(0), XIL(0), XIL(0), XIL(0xda6880), XIL(0), XIL(0), XIL(0x7fffffffdaa0), XIL(0x5e4659), XIL(0xffffdaf0), XIL(0xda6880), XIL(0), XIL(0), XIL(0x7fffffffdad0), XIL(0x6ff885), make_fixnum(0), XIL(0x7fffffffdb10), XIL(0x706d4c)}
        i = 1
        prev_modiff = 59
        prev_buffer = 0x13caa30
        already_adjusted = false
#14 0x0000000000706947 in internal_condition_case (bfun=0x5eb590 <command_loop_1>, handlers=XIL(0x90), hfun=0x5ead47 <cmd_error>) at ../../src/eval.c:1355
        val = XIL(0x5e4659)
        c = 0xe34a60
#15 0x00000000005eb263 in command_loop_2 (ignore=XIL(0)) at ../../src/keyboard.c:1091
        val = make_fixnum(0)
#16 0x0000000000706200 in internal_catch (tag=XIL(0xd4d0), func=0x5eb23a <command_loop_2>, arg=XIL(0)) at ../../src/eval.c:1116
        val = XIL(0x7fffffffdc10)
        c = 0xe34930
#17 0x00000000005eb205 in command_loop () at ../../src/keyboard.c:1070
No locals.
#18 0x00000000005ea91c in recursive_edit_1 () at ../../src/keyboard.c:714
        count = 1
        val = XIL(0x7fffffffdc70)
#19 0x00000000005eaa9e in Frecursive_edit () at ../../src/keyboard.c:786
        count = 0
        buffer = XIL(0)
#20 0x00000000005e3245 in main (argc=7, argv=0x7fffffffdec8) at ../../src/emacs.c:2059
        stack_bottom_variable = 0x0
        no_loadup = false
        junk = 0x0
        dname_arg = 0x0
        ch_to_dir = 0x0
        original_pwd = 0x0
        dump_mode = 0x0
        skip_args = 0
        temacs = 0x0
        attempt_load_pdump = true
        rlim = {
          rlim_cur = 10022912,
          rlim_max = 18446744073709551615
        }
        lc_all = 0x0
        sockfd = -1
        module_assertions = false

Lisp Backtrace:
"redisplay_internal (C function)" (0x0)
(gdb) xbacktrace
"redisplay_internal (C function)" (0x0)


--=-=-=
Content-Type: text/plain


In GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, cairo version 1.16.0)
 of 2020-03-07 built on leonis4
Repository revision: 64c791cecf6a9a8593c6e818b0007fcba5cc1549
Repository branch: madhu-tip
Windowing system distributor 'The X.Org Foundation', version 11.0.12006000
System Description: Gentoo/Linux

Configured using:
 'configure -C --with-harfbuzz --with-cairo --with-x-toolkit=gtk
 'CFLAGS=-ggdb -O0''

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND GPM DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER
LCMS2 GMP

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  savehist-mode: t
  xclip-mode: t
  elisp-slime-nav-mode: t
  ivy-prescient-mode: t
  prescient-persist-mode: t
  ivy-mode: t
  save-place-mode: t
  recentf-mode: t
  show-paren-mode: t
  shell-dirtrack-mode: t
  minibuffer-depth-indicate-mode: t
  display-time-mode: t
  which-function-mode: t
  foo-clear-output-mode: t
  foo-translate-kbd-paren-mode: t
  new-shell-activate-mode: t
  foo-mode: t
  tooltip-mode: t
  eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail lw-manual lww61-manual-data
savehist xclip elisp-slime-nav gnus nnheader gnus-util rmail
rmail-loaddefs rfc2047 rfc2045 ietf-drums text-property-search
mail-utils mm-util mail-prsvr company pcase cus-start cus-load
ivy-prescient prescient counsel xdg swiper ivy delsel colir color
ivy-overlay ggtags etags fileloop generator xref project compile ewoc
zenicb-color zenicb-whereis zenicb-complete zenicb-stamp zenicb-history
zenicb-away zenicb zenirc-sasl erc-goodies erc erc-backend erc-compat pp
erc-loaddefs zenirc-color zenirc-stamp zenirc-trigger zenirc-notify
zenirc-netsplit zenirc-ignore zenirc-history zenirc-format zenirc-dcc
zenirc-complete zenirc-command-queue zenirc-away zenirc org-mew mew-auth
mew-config mew-imap2 mew-imap mew-nntp2 mew-nntp mew-pop mew-smtp
mew-ssl mew-ssh mew-net mew-highlight mew-sort mew-fib mew-ext
mew-refile mew-demo mew-attach mew-draft mew-message mew-thread
mew-virtual mew-summary4 mew-summary3 mew-summary2 mew-summary
mew-search mew-pick mew-passwd mew-scan mew-syntax mew-bq mew-smime
mew-pgp mew-header mew-exec mew-mark mew-mime mew-unix mew-edit
mew-decode mew-encode mew-cache mew-minibuf mew-complete mew-addrbook
mew-local mew-vars3 mew-vars2 mew-vars mew-env mew-mule3 mew-mule
mew-gemacs mew-key mew-func mew-blvs mew-const mew server winner
windmove whitespace tramp-sh tramp tramp-loaddefs trampver
tramp-integration files-x tramp-compat ls-lisp ange-ftp term disp-table
ehelp saveplace recentf tree-widget wid-edit paren ob-lisp ob-shell
shell org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-footnote org-src ob-comint org-pcomplete pcomplete comint ring
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob-core ob-eval org-table ol org-keys org-compat org-macs
org-loaddefs format-spec find-func cal-menu calendar cal-loaddefs
rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt
rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap sgml-mode dom
nxml-util nxml-enc xmltok mb-depth ffap thingatpt battery dbus xml time
so-long which-func imenu parse-time iso8601 time-date cookie1 diff
generic ansi-color derived easy-mmode edmacro kmacro advice cl-extra
help-mode dired-x dired dired-loaddefs cl gh-common marshal eieio-compat
rx info package easymenu browse-url url-handlers url-parse auth-source
cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json
subr-x map url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 496211 16301)
 (symbols 48 37922 1)
 (strings 32 133899 4857)
 (string-bytes 1 3903977)
 (vectors 16 38303)
 (vector-slots 8 455102 14242)
 (floats 8 588 350)
 (intervals 56 1694 0)
 (buffers 1000 12))



--=-=-=--




Acknowledgement sent to Madhu <enometh@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#39977; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 30 Mar 2020 02:45:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.