* bug#39977: 28.0.50; Unhelpful stack trace
@ 2020-03-07 17:43 Madhu
2020-03-07 18:50 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: Madhu @ 2020-03-07 17:43 UTC (permalink / raw)
To: 39977
[-- Attachment #1: Type: text/plain, Size: 539 bytes --]
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
[-- Attachment #2: bt --]
[-- Type: text/plain, Size: 2581 bytes --]
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)
[-- Attachment #3: bt full, xbacktrace --]
[-- Type: text/plain, Size: 82605 bytes --]
(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)
[-- Attachment #4: Type: text/plain, Size: 5439 bytes --]
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))
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
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
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-07 18:50 UTC (permalink / raw)
To: Madhu; +Cc: 39977
> From: Madhu <enometh@meer.net>
> 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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-07 18:50 ` Eli Zaretskii
@ 2020-03-13 9:55 ` Eli Zaretskii
2020-03-13 16:28 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-13 9:55 UTC (permalink / raw)
To: enometh, martin rudalics; +Cc: 39977
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@gnu.org>
> Cc: 39977@debbugs.gnu.org
>
> > From: Madhu <enometh@meer.net>
> > 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
>
>
>
>
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-13 9:55 ` Eli Zaretskii
@ 2020-03-13 16:28 ` martin rudalics
2020-03-13 19:43 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-13 16:28 UTC (permalink / raw)
To: Eli Zaretskii, enometh; +Cc: 39977
> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-13 16:28 ` martin rudalics
@ 2020-03-13 19:43 ` Eli Zaretskii
2020-03-14 8:48 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-13 19:43 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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?
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-13 19:43 ` Eli Zaretskii
@ 2020-03-14 8:48 ` martin rudalics
2020-03-14 10:10 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-14 8:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
>> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-14 8:48 ` martin rudalics
@ 2020-03-14 10:10 ` Eli Zaretskii
2020-03-14 10:37 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-14 10:10 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-14 10:10 ` Eli Zaretskii
@ 2020-03-14 10:37 ` martin rudalics
2020-03-14 18:55 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-14 10:37 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-14 10:37 ` martin rudalics
@ 2020-03-14 18:55 ` martin rudalics
2020-03-14 20:09 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-14 18:55 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-14 18:55 ` martin rudalics
@ 2020-03-14 20:09 ` Eli Zaretskii
2020-03-15 17:49 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-14 20:09 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> From: martin rudalics <rudalics@gmx.at>
> Cc: enometh@meer.net, 39977@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?
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-14 20:09 ` Eli Zaretskii
@ 2020-03-15 17:49 ` martin rudalics
2020-03-15 18:41 ` Eli Zaretskii
2020-03-16 2:42 ` Madhu
0 siblings, 2 replies; 43+ messages in thread
From: martin rudalics @ 2020-03-15 17:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: frame.c.diff --]
[-- Type: text/x-patch; name="frame.c.diff", Size: 1578 bytes --]
diff --git a/src/frame.c b/src/frame.c
index 88d6f22fc0..ef42f230ef 100644
--- 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 = frame;
}
+ if (!FRAME_LIVE_P (f))
+ /* Return nil if for some reason FRAME has become dead now
+ (Bug#39977). */
+ return Qnil;
+
selected_frame = frame;
if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
last_nonminibuf_frame = 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 = EQ (minibuf_window, selected_window);
sf = 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 = 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);
^ permalink raw reply related [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-15 17:49 ` martin rudalics
@ 2020-03-15 18:41 ` Eli Zaretskii
2020-03-16 9:24 ` martin rudalics
2020-03-16 2:42 ` Madhu
1 sibling, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-15 18:41 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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?
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-15 18:41 ` Eli Zaretskii
@ 2020-03-16 9:24 ` martin rudalics
2020-03-16 15:33 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-16 9:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
>> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-16 9:24 ` martin rudalics
@ 2020-03-16 15:33 ` Eli Zaretskii
2020-03-17 9:38 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-16 15:33 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-16 15:33 ` Eli Zaretskii
@ 2020-03-17 9:38 ` martin rudalics
2020-03-17 15:51 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-17 9:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-17 9:38 ` martin rudalics
@ 2020-03-17 15:51 ` Eli Zaretskii
2020-03-17 17:31 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-17 15:51 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-17 15:51 ` Eli Zaretskii
@ 2020-03-17 17:31 ` martin rudalics
2020-03-17 17:45 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-17 17:31 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
[-- Attachment #1: Type: text/plain, Size: 383 bytes --]
> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: selected_frame.diff --]
[-- Type: text/x-patch; name="selected_frame.diff", Size: 3608 bytes --]
diff --git a/src/frame.c b/src/frame.c
index 88d6f22fc0..ef42f230ef 100644
--- 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 = frame;
}
+ if (!FRAME_LIVE_P (f))
+ /* Return nil if for some reason FRAME has become dead now
+ (Bug#39977). */
+ return Qnil;
+
selected_frame = frame;
if (! FRAME_MINIBUF_ONLY_P (XFRAME (selected_frame)))
last_nonminibuf_frame = 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 = EQ (minibuf_window, selected_window);
sf = 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 = 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
--- 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 = frame;
+ selected_window = 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_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 (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 = old_frame_selected_window;
- selected_frame = old_selected_frame;
- selected_window = old_selected_window;
+ if (WINDOW_LIVE_P (old_frame_selected_window))
+ XFRAME (new_frame)->selected_window = old_frame_selected_window;
+ if (FRAME_LIVE_P (XFRAME (old_selected_frame)))
+ {
+ selected_frame = old_selected_frame;
+ selected_window = old_selected_window;
+ }
+
if (n > 0)
w->must_be_updated_p = true;
return n;
^ permalink raw reply related [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-17 17:31 ` martin rudalics
@ 2020-03-17 17:45 ` Eli Zaretskii
2020-03-17 18:39 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-17 17:45 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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?
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-17 17:45 ` Eli Zaretskii
@ 2020-03-17 18:39 ` martin rudalics
2020-03-17 19:41 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-17 18:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
> Why?
So that SELECTED_FRAME does not abort.
martin
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-17 18:39 ` martin rudalics
@ 2020-03-17 19:41 ` Eli Zaretskii
2020-03-18 9:12 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-17 19:41 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-17 19:41 ` Eli Zaretskii
@ 2020-03-18 9:12 ` martin rudalics
2020-03-18 14:53 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-18 9:12 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-18 9:12 ` martin rudalics
@ 2020-03-18 14:53 ` Eli Zaretskii
2020-03-18 18:48 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-18 14:53 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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).
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-18 14:53 ` Eli Zaretskii
@ 2020-03-18 18:48 ` martin rudalics
2020-03-18 19:36 ` Eli Zaretskii
2020-03-19 3:48 ` Madhu
0 siblings, 2 replies; 43+ messages in thread
From: martin rudalics @ 2020-03-18 18:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-18 18:48 ` martin rudalics
@ 2020-03-18 19:36 ` Eli Zaretskii
2020-03-19 8:55 ` martin rudalics
2020-03-19 3:48 ` Madhu
1 sibling, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-18 19:36 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-18 19:36 ` Eli Zaretskii
@ 2020-03-19 8:55 ` martin rudalics
2020-03-19 14:33 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-19 8:55 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
>> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-19 8:55 ` martin rudalics
@ 2020-03-19 14:33 ` Eli Zaretskii
2020-03-21 9:32 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-19 14:33 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-19 14:33 ` Eli Zaretskii
@ 2020-03-21 9:32 ` martin rudalics
2020-03-21 13:15 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-21 9:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
>> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-21 9:32 ` martin rudalics
@ 2020-03-21 13:15 ` Eli Zaretskii
2020-03-22 18:20 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-21 13:15 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-21 13:15 ` Eli Zaretskii
@ 2020-03-22 18:20 ` martin rudalics
2020-03-23 14:48 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-22 18:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
[-- Attachment #1: Type: text/plain, Size: 2699 bytes --]
>> 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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: SELECTD_FRAME.diff --]
[-- Type: text/x-patch; name="SELECTD_FRAME.diff", Size: 1951 bytes --]
--- a/src/frame.c
+++ b/src/frame.c
@@ -1843,6 +1843,36 @@ other_frames (struct frame *f, bool invisible, bool force)
return false;
}
+
+/** Select some live frame. */
+bool
+select_some_frame (void)
+{
+ 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))
+ {
+ /* 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 = frame;
+ if (!WINDOW_LIVE_P (FRAME_SELECTED_WINDOW (f)))
+ FRAME_SELECTED_WINDOW (f) = Fframe_first_window (frame);
+ selected_window = 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)
extern Lisp_Object Vframe_list;
+bool select_some_frame (void);
+
/* Value is a pointer to the selected frame. If the selected frame
isn't live, abort. */
#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))
\f
/***********************************************************************
^ permalink raw reply related [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-22 18:20 ` martin rudalics
@ 2020-03-23 14:48 ` Eli Zaretskii
2020-03-24 9:45 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-23 14:48 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-23 14:48 ` Eli Zaretskii
@ 2020-03-24 9:45 ` martin rudalics
2020-03-28 8:23 ` Eli Zaretskii
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-24 9:45 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
>> (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
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-24 9:45 ` martin rudalics
@ 2020-03-28 8:23 ` Eli Zaretskii
2020-03-28 18:38 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-03-28 8:23 UTC (permalink / raw)
To: martin rudalics; +Cc: enometh, 39977
> Cc: enometh@meer.net, 39977@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 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?
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-28 8:23 ` Eli Zaretskii
@ 2020-03-28 18:38 ` martin rudalics
2020-04-03 16:32 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-03-28 18:38 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
[-- Attachment #1: Type: text/plain, Size: 4199 bytes --]
>> >> (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
[-- Attachment #2: restore_selected_window.diff --]
[-- Type: text/x-patch, Size: 5609 bytes --]
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;
^ permalink raw reply related [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
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
0 siblings, 2 replies; 43+ messages in thread
From: martin rudalics @ 2020-04-03 16:32 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: enometh, 39977
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
> Attached find a patch which should solve the more grave problems caused
> by a function deleting the previously selected frame or window.
Fixing a few more things as attached.
martin
[-- Attachment #2: restore_selected_window.diff --]
[-- Type: text/x-patch, Size: 6145 bytes --]
diff --git a/src/xdisp.c b/src/xdisp.c
index a4de2698ca..82556ca280 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);
@@ -12592,23 +12591,68 @@ update_menu_bar (struct frame *f, bool save_match_data, bool hooks_run)
Tab-bars
***********************************************************************/
-#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 its frame's
+ selected window and set the selected frame to its frame. */
+ {
+ selected_window = window;
+ selected_frame = XWINDOW (window)->frame;
+ FRAME_SELECTED_WINDOW (XFRAME (selected_frame)) = window;
+ }
+ 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. */
{
- selected_frame = frame;
- selected_window = XFRAME (frame)->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 ();
}
}
-#endif /* HAVE_WINDOW_SYSTEM */
+/* 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. If that
+ frame is the selected frame, make WINDOW the selected window as
+ well. */
+ {
+ Lisp_Object frame = XWINDOW (window)->frame;
+
+ FRAME_SELECTED_WINDOW (XFRAME (frame)) = window;
+ if (EQ (frame, selected_frame))
+ selected_window = window;
+ }
+}
/* Update the tab-bar item list for frame F. This has to be done
before we start to fill in any display lines. Called from
@@ -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;
^ permalink raw reply related [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-04-03 16:32 ` martin rudalics
@ 2020-04-10 11:51 ` Madhu
2020-09-30 15:06 ` Lars Ingebrigtsen
1 sibling, 0 replies; 43+ messages in thread
From: Madhu @ 2020-04-10 11:51 UTC (permalink / raw)
To: rudalics; +Cc: 39977
* martin rudalics <e0a053fb-7752-3d55-ef8c-d05b44d2fdc3@gmx.at>
Wrote on Fri, 3 Apr 2020 18:32:18 +0200
> Fixing a few more things as attached.
I've been running this patch for a while and believe it handles the
situation I reported adequately.
(PS I was incorrect in an earlier report above about a particular
patch working)
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
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
1 sibling, 1 reply; 43+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-30 15:06 UTC (permalink / raw)
To: martin rudalics; +Cc: 39977, enometh
martin rudalics <rudalics@gmx.at> writes:
>> Attached find a patch which should solve the more grave problems caused
>> by a function deleting the previously selected frame or window.
>
> Fixing a few more things as attached.
Madhu <enometh@meer.net> writes:
> * martin rudalics <e0a053fb-7752-3d55-ef8c-d05b44d2fdc3@gmx.at>
> Wrote on Fri, 3 Apr 2020 18:32:18 +0200
>> Fixing a few more things as attached.
>
> I've been running this patch for a while and believe it handles the
> situation I reported adequately.
This was the final message in this long thread (in April). As far as I
can see, Martin's patch was not applied. I haven't read the entire
thread, but were there other problems here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-09-30 15:06 ` Lars Ingebrigtsen
@ 2020-09-30 15:31 ` Eli Zaretskii
2020-09-30 17:29 ` martin rudalics
0 siblings, 1 reply; 43+ messages in thread
From: Eli Zaretskii @ 2020-09-30 15:31 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: enometh, 39977
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, enometh@meer.net, 39977@debbugs.gnu.org
> Date: Wed, 30 Sep 2020 17:06:52 +0200
>
> martin rudalics <rudalics@gmx.at> writes:
>
> >> Attached find a patch which should solve the more grave problems caused
> >> by a function deleting the previously selected frame or window.
> >
> > Fixing a few more things as attached.
>
> Madhu <enometh@meer.net> writes:
>
> > * martin rudalics <e0a053fb-7752-3d55-ef8c-d05b44d2fdc3@gmx.at>
> > Wrote on Fri, 3 Apr 2020 18:32:18 +0200
> >> Fixing a few more things as attached.
> >
> > I've been running this patch for a while and believe it handles the
> > situation I reported adequately.
>
> This was the final message in this long thread (in April). As far as I
> can see, Martin's patch was not applied. I haven't read the entire
> thread, but were there other problems here?
I think Martin's patch should be installed, but let's wait for Martin
to chime in.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-09-30 15:31 ` Eli Zaretskii
@ 2020-09-30 17:29 ` martin rudalics
2020-10-01 0:01 ` Lars Ingebrigtsen
0 siblings, 1 reply; 43+ messages in thread
From: martin rudalics @ 2020-09-30 17:29 UTC (permalink / raw)
To: Eli Zaretskii, Lars Ingebrigtsen; +Cc: enometh, 39977
> I think Martin's patch should be installed, but let's wait for Martin
> to chime in.
AFAICT I wrote that shortly before two of my OS installations crashed
almost simultaneously and I lost some of my work including this. So I
might have run Emacs with that patch applied for a couple of weeks at
most. I hope though that my reasoning was mostly correct back then and
since IIUC Madhu confirmed that it fixes his use case it should be safe
to install (WITHOUT WARRANTY).
martin
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-09-30 17:29 ` martin rudalics
@ 2020-10-01 0:01 ` Lars Ingebrigtsen
2020-10-01 4:37 ` Madhu
0 siblings, 1 reply; 43+ messages in thread
From: Lars Ingebrigtsen @ 2020-10-01 0:01 UTC (permalink / raw)
To: martin rudalics; +Cc: 39977, enometh
martin rudalics <rudalics@gmx.at> writes:
> AFAICT I wrote that shortly before two of my OS installations crashed
> almost simultaneously and I lost some of my work including this. So I
> might have run Emacs with that patch applied for a couple of weeks at
> most. I hope though that my reasoning was mostly correct back then and
> since IIUC Madhu confirmed that it fixes his use case it should be safe
> to install (WITHOUT WARRANTY).
OK, I've now applied the patch to Emacs 28 after some very light testing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-18 18:48 ` martin rudalics
2020-03-18 19:36 ` Eli Zaretskii
@ 2020-03-19 3:48 ` Madhu
1 sibling, 0 replies; 43+ messages in thread
From: Madhu @ 2020-03-19 3:48 UTC (permalink / raw)
To: rudalics; +Cc: 39977
* 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)
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-15 17:49 ` martin rudalics
2020-03-15 18:41 ` Eli Zaretskii
@ 2020-03-16 2:42 ` Madhu
2020-03-16 9:25 ` martin rudalics
1 sibling, 1 reply; 43+ messages in thread
From: Madhu @ 2020-03-16 2:42 UTC (permalink / raw)
To: rudalics; +Cc: 39977
[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.
^ permalink raw reply [flat|nested] 43+ messages in thread
* bug#39977: 28.0.50; Unhelpful stack trace
2020-03-16 2:42 ` Madhu
@ 2020-03-16 9:25 ` martin rudalics
0 siblings, 0 replies; 43+ messages in thread
From: martin rudalics @ 2020-03-16 9:25 UTC (permalink / raw)
To: Madhu; +Cc: 39977
> 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
^ permalink raw reply [flat|nested] 43+ messages in thread
end of thread, other threads:[~2020-10-01 4:37 UTC | newest]
Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.