From: Eli Zaretskii <eliz@gnu.org>
To: stittl@cuug.ab.ca
Cc: 44047@debbugs.gnu.org
Subject: bug#44047: current HEAD has been crashing on startup
Date: Mon, 26 Oct 2020 17:12:39 +0200 [thread overview]
Message-ID: <83h7qhf2c8.fsf@gnu.org> (raw)
In-Reply-To: <83k0vjmurb.fsf@gnu.org> (message from Eli Zaretskii on Wed, 21 Oct 2020 19:03:20 +0300)
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.
>
>
>
>
next prev parent reply other threads:[~2020-10-26 15:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-17 17:06 bug#44047: current HEAD has been crashing on startup Liam Stitt
2020-10-17 17:15 ` Eli Zaretskii
2020-10-19 1:10 ` Liam Stitt
2020-10-19 14:23 ` Eli Zaretskii
2020-10-19 16:28 ` Liam Stitt
2020-10-19 17:08 ` Eli Zaretskii
2020-10-20 4:39 ` Liam Stitt
2020-10-20 15:48 ` Eli Zaretskii
2020-10-20 22:19 ` Liam Stitt
2020-10-21 16:03 ` Eli Zaretskii
2020-10-26 15:12 ` Eli Zaretskii [this message]
2020-11-01 13:48 ` Liam Stitt
2020-11-01 15:34 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h7qhf2c8.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=44047@debbugs.gnu.org \
--cc=stittl@cuug.ab.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).