From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: enometh@meer.net, 39977@debbugs.gnu.org
Subject: bug#39977: 28.0.50; Unhelpful stack trace
Date: Mon, 16 Mar 2020 10:24:14 +0100 [thread overview]
Message-ID: <eacebbcb-0f62-7eeb-968d-767cc0a775b6@gmx.at> (raw)
In-Reply-To: <83k13lbgux.fsf@gnu.org>
>> 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
next prev parent reply other threads:[~2020-03-16 9:24 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-07 17:43 bug#39977: 28.0.50; Unhelpful stack trace Madhu
2020-03-07 18:50 ` Eli Zaretskii
2020-03-13 9:55 ` Eli Zaretskii
2020-03-13 16:28 ` martin rudalics
2020-03-13 19:43 ` Eli Zaretskii
2020-03-14 8:48 ` martin rudalics
2020-03-14 10:10 ` Eli Zaretskii
2020-03-14 10:37 ` martin rudalics
2020-03-14 18:55 ` martin rudalics
2020-03-14 20:09 ` Eli Zaretskii
2020-03-15 17:49 ` martin rudalics
2020-03-15 18:41 ` Eli Zaretskii
2020-03-16 9:24 ` martin rudalics [this message]
2020-03-16 15:33 ` Eli Zaretskii
2020-03-17 9:38 ` martin rudalics
2020-03-17 15:51 ` Eli Zaretskii
2020-03-17 17:31 ` martin rudalics
2020-03-17 17:45 ` Eli Zaretskii
2020-03-17 18:39 ` martin rudalics
2020-03-17 19:41 ` Eli Zaretskii
2020-03-18 9:12 ` martin rudalics
2020-03-18 14:53 ` Eli Zaretskii
2020-03-18 18:48 ` martin rudalics
2020-03-18 19:36 ` Eli Zaretskii
2020-03-19 8:55 ` martin rudalics
2020-03-19 14:33 ` Eli Zaretskii
2020-03-21 9:32 ` martin rudalics
2020-03-21 13:15 ` Eli Zaretskii
2020-03-22 18:20 ` martin rudalics
2020-03-23 14:48 ` Eli Zaretskii
2020-03-24 9:45 ` martin rudalics
2020-03-28 8:23 ` Eli Zaretskii
2020-03-28 18:38 ` martin rudalics
2020-04-03 16:32 ` martin rudalics
2020-04-10 11:51 ` Madhu
2020-09-30 15:06 ` Lars Ingebrigtsen
2020-09-30 15:31 ` Eli Zaretskii
2020-09-30 17:29 ` martin rudalics
2020-10-01 0:01 ` Lars Ingebrigtsen
2020-10-01 4:37 ` Madhu
2020-03-19 3:48 ` Madhu
2020-03-16 2:42 ` Madhu
2020-03-16 9:25 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eacebbcb-0f62-7eeb-968d-767cc0a775b6@gmx.at \
--to=rudalics@gmx.at \
--cc=39977@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=enometh@meer.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).