[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#44047: current HEAD has been crashing on startup
From: |
Eli Zaretskii |
Subject: |
bug#44047: current HEAD has been crashing on startup |
Date: |
Mon, 26 Oct 2020 17:12:39 +0200 |
Ping! Any news on this?
> Date: Wed, 21 Oct 2020 19:03:20 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 44047@debbugs.gnu.org
>
> > Date: Tue, 20 Oct 2020 16:19:26 -0600 (MDT)
> > From: Liam Stitt <stittl@cuug.ab.ca>
> > cc: 44047@debbugs.gnu.org
> >
> > (gdb) frame 1
> > #1 0x0000555555597de8 in build_frame_matrix_from_leaf_window (
> > frame_matrix=0x555555d4a2b0, w=0x555555d42420) at dispnew.c:2531
> > 2531 fill_up_frame_row_with_spaces (frame_row,
> > window_matrix->matrix_x);
> > (gdb) print frame_matrix->rows
> > $1 = (struct glyph_row *) 0x0
> > (gdb) print frame_matrix->nrows
> > $2 = 0
>
> OK, so this is the problem: the frame glyph matrix has no glyph rows
> allocated to it. The question is how did that happen?
>
> To find out, please run Emacs under GDB, after setting a breakpoint in
> adjust_frame_glyphs_for_frame_redisplay:
>
> (gdb) break adjust_frame_glyphs_for_frame_redisplay
> (gdb) run -Q -nw
>
> When the breakpoint breaks, step through the code with the "next"
> command. The first couple of times when the function is called, it
> should return immediately, here:
>
> if (!FRAME_LIVE_P (f))
> return;
>
> In the call after those 2, it should allocate the glyph pools and the
> 2 glyph matrices, then call allocate_matrices_for_frame_redisplay, and
> return here:
>
> if (!FRAME_WINDOW_P (f) && pool_changed_p)
> SET_FRAME_GARBAGED (f);
> return;
>
> And in the next call, it should in addition allocate the glyph rows,
> here:
>
> else
> {
> adjust_glyph_matrix (NULL, f->desired_matrix, 0, 0, matrix_dim);
> adjust_glyph_matrix (NULL, f->current_matrix, 0, 0, matrix_dim);
> SET_FRAME_GARBAGED (f);
> }
>
> This last call's backtrace should look like this:
>
> (gdb) bt
> #0 adjust_frame_glyphs_for_frame_redisplay (f=0xf46948) at dispnew.c:2008
> #1 0x000000000041c905 in adjust_frame_glyphs (f=0xf46948) at dispnew.c:1828
> #2 0x000000000042cdfd in adjust_frame_size (f=0xf46948, new_width=80,
> new_height=37, inhibit=5, pretend=false, parameter=XIL(0x3690))
> at frame.c:819
> #3 0x0000000000427657 in change_frame_size_1 (f=0xf46948, new_width=80,
> new_height=37, pretend=false, delay=false, safe=true, pixelwise=false)
> at dispnew.c:5798
> #4 0x00000000004276aa in change_frame_size (f=0xf46948, new_width=80,
> new_height=37, pretend=false, delay=false, safe=true, pixelwise=false)
> at dispnew.c:5830
> #5 0x00000000004290e2 in init_display_interactive () at dispnew.c:6397
> #6 0x0000000000429561 in init_display () at dispnew.c:6449
> #7 0x00000000005a892b in main (argc=3, argv=0x7fffffffe538) at emacs.c:1995
>
> Does this happen to you as I described, or does something different
> happen?
>
> Also, each time allocate_matrices_for_frame_redisplay is called,
> please show the value of matrix_dim after the call:
>
> (gdb) p matrix_dim
>
> and also show the value of f->total_lines each time
> adjust_frame_glyphs_for_frame_redisplay is called:
>
> (gdb) p f->total_lines.
>
> Finally, the last time adjust_frame_glyphs_for_frame_redisplay is
> called, and goes on through all of its code, you should see non-NULL
> value of the frame's glyph_matrix's glyph_rows before the function
> returns. Here's what I see:
>
> (gdb) p f->desired_matrix->rows
> $11 = (struct glyph_row *) 0xf50140
> (gdb) p f->desired_matrix->nrows
> $12 = 38
>
> (In my case, the TTY window has height of 38 lines.)
>
> If what happens on your system matches the above description, then
> somehow the value of f->desired_matrix->rows is NULLified after this
> initialization. But if you get NULL as f->desired_matrix->rows in the
> last call to adjust_frame_glyphs_for_frame_redisplay, or if Emacs
> segfaults before it reaches that point, then something abnormal
> happens during initialization, and we will next look at that.
>
> Thanks.
>
>
>
>
- bug#44047: current HEAD has been crashing on startup, Liam Stitt, 2020/10/17
- bug#44047: current HEAD has been crashing on startup, Eli Zaretskii, 2020/10/17
- bug#44047: current HEAD has been crashing on startup, Liam Stitt, 2020/10/18
- bug#44047: current HEAD has been crashing on startup, Eli Zaretskii, 2020/10/19
- bug#44047: current HEAD has been crashing on startup, Liam Stitt, 2020/10/19
- bug#44047: current HEAD has been crashing on startup, Eli Zaretskii, 2020/10/19
- bug#44047: current HEAD has been crashing on startup, Liam Stitt, 2020/10/20
- bug#44047: current HEAD has been crashing on startup, Eli Zaretskii, 2020/10/20
- bug#44047: current HEAD has been crashing on startup, Liam Stitt, 2020/10/20
- bug#44047: current HEAD has been crashing on startup, Eli Zaretskii, 2020/10/21
- bug#44047: current HEAD has been crashing on startup,
Eli Zaretskii <=