Subject: bug#75056: 31.0.50; tty-child-frames with server / multiple clients possible hangs

From: martin rudalics <[email-masked]>
Date: Tue, 28 Jan 2025 19:10:37 +0100

>> But maybe it's only the
 >>
 >>    eassert (FRAME_VISIBLE_P (root));
 >>
 >> assertion there that would have to be adapted.
 >
 > I seem to have missed that, sorry I'm bit distracted ATM. Or was that
 > the one in combine_updates_for_frame with multi-tty? I think I committed
 > a workaround/fix for that to master. Also for the root frame always
 > returning t in frame-visible-p.

Forget it.  I was in the wrong branch.  Just to verify one thing: When
in a tty frame I do

(make-frame '((window-system . x)))

move to the graphical and back to the tty frame	I get a crash like

#0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at ../../src/emacs.c:432
#1  0x000000000069abc9 in die (msg=0x7e0a28 "!FRAME_WINDOW_P (XFRAME (w->frame))", file=0x7e029f "../../src/dispnew.c", line=3193) at ../../src/alloc.c:7989
#2  0x000000000042539b in window_to_frame_hpos (w=0xbcccb98, hpos=0) at ../../src/dispnew.c:3193
#3  0x000000000042b9e5 in tty_set_cursor () at ../../src/dispnew.c:5669
#4  0x000000000042bba5 in write_matrix (f=0xb83fd40, inhibit_id_p=false, set_cursor_p=true, updating_menu_p=false) at ../../src/dispnew.c:5712
#5  0x0000000000427483 in combine_updates_for_frame (f=0xb83fd40, inhibit_scrolling=false) at ../../src/dispnew.c:4012
#6  0x0000000000427622 in combine_updates (roots=XIL(0x7f4b28c21193)) at ../../src/dispnew.c:4052
#7  0x00000000004830cf in redisplay_internal () at ../../src/xdisp.c:17611
#8  0x0000000000480825 in redisplay () at ../../src/xdisp.c:16668
#9  0x00000000005f68ac in read_char (commandflag=1, map=XIL(0x7f4b28c2f623), prev_event=XIL(0), used_mouse_menu=0x7fff72a5a8ef, end_time=0x0) at ../../src/keyboard.c:2672
#10 0x000000000060a7da in read_key_sequence (keybuf=0x7fff72a5aaa0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false, disable_text_conversion_p=false) at ../../src/keyboard.c:10746
#11 0x00000000005f2c2d in command_loop_1 () at ../../src/keyboard.c:1424
#12 0x00000000006d1779 in internal_condition_case (bfun=0x5f27fe <command_loop_1>, handlers=XIL(0x90), hfun=0x5f1c80 <cmd_error>) at ../../src/eval.c:1607
#13 0x00000000005f23c5 in command_loop_2 (handlers=XIL(0x90)) at ../../src/keyboard.c:1163
#14 0x00000000006d0bcf in internal_catch (tag=XIL(0x12390), func=0x5f239b <command_loop_2>, arg=XIL(0x90)) at ../../src/eval.c:1286
#15 0x00000000005f2357 in command_loop () at ../../src/keyboard.c:1141
#16 0x00000000005f1722 in recursive_edit_1 () at ../../src/keyboard.c:749
#17 0x00000000005f194e in Frecursive_edit () at ../../src/keyboard.c:832
#18 0x00000000005ed1ac in main (argc=3, argv=0x7fff72a5b0d8) at ../../src/emacs.c:2628

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

Any ideas?

martin