Subject: Re: bug#44502:

From: [email-masked]
Date: Thu, 11 Aug 2022 21:19:06 +0300

Howdy Eli!

>> Date: Wed, 10 Aug 2022 16:26:38 +0300
>> From: andrei.elkin--- via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> Hello dear Colleagues!
>> 
>> For couple of times I hit a stack whose top part perfectly fits to the
>> reported in this bug.
>> Mine:
>> gdb) bt
>> #0  0x00007ffff256c817 in raise (sig=<optimized out>) at raise.c:51
>> #1  0x0000555555732728 in terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:437
>> #2 0x00005555557e5e2e in die (msg=0x55555593c747 "EQ (window,
>> selected_window)", file=0x55555593c4dc "window.c", line=557) at
>> alloc.c:7486
>> #3 0x000055555564f2cb in select_window (window=..., norecord=...,
>> inhibit_point_swap=false) at window.c:557
>> #4  0x000055555564f45b in Fselect_window (window=..., norecord=...) at window.c:634
>> #5  0x00005555555f0389 in gui_consider_frame_title (frame=...) at xdisp.c:12801
>> #6  0x00005555555f09be in prepare_menu_bars () at xdisp.c:12914
>
> Please do:
>
>  (gdb) frame 3
>  (gdb) print window
>  (gdb) xwindow
>  (gdb) print XWINDOW(window)->contents
>  (gdb) xbuffer
>  (gdb) print selected_window
>  (gdb) xwindow
>  (gdb) print XWINDOW(selected_window)->contents
>  (gdb) xbuffer
>
> and post here everything GDB prints as result.

(gdb) f 3
#3  0x000055555564f2cb in select_window (window=XIL(0x55555b038855), norecord=XIL(0x30), inhibit_point_swap=false) at window.c:557
557	      eassert (EQ (window, selected_window));
(gdb) p window
$4 = XIL(0x55555b038855)
(gdb) xwindow
$5 = (struct window *) 0x55555b038850
124x1+0+80
(gdb) print XWINDOW(window)->contents
$6 = XIL(0x7fffea1bd07d)
(gdb) xbuffer
$7 = (struct buffer *) 0x7fffea1bd078
0x7fffea4aedc1 " *Minibuf-0*"
(gdb) print selected_window
$8 = XIL(0x55555b038645)
(gdb) xwindow
$9 = (struct window *) 0x55555b038640
124x80+0+0
(gdb) print XWINDOW(selected_window)->contents
$10 = XIL(0x5555577f9475)
(gdb) xbuffer
$11 = (struct buffer *) 0x5555577f9470
0x555559788ff0 "magit: A<10.6>"

>
> If GDB says it doesn't know about commands xwindow and xbuffer, you
> need to do this:
>
>  (gdb) source /path/to/emacs/src/.gdbinit
>
>> My emacs version:
>> 
>> $ git log -1 --oneline 
>> 7ffcba4213 
>
> On which branch of the Git repository?

emacs-28

> Thanks.

I promise to be more diligent with replies tomorrow (has been a busy
today, sorry).

Cheers,

Andrei