From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44047: current HEAD has been crashing on startup Date: Mon, 26 Oct 2020 17:12:39 +0200 Message-ID: <83h7qhf2c8.fsf@gnu.org> References: <83v9f8srih.fsf@gnu.org> <83wnzmpa5d.fsf@gnu.org> <835z76p2hp.fsf@gnu.org> <83a6wgoq4j.fsf@gnu.org> <83k0vjmurb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39609"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44047@debbugs.gnu.org To: stittl@cuug.ab.ca Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 26 16:13:36 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kX4Bi-000AAK-Uf for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 16:13:35 +0100 Original-Received: from localhost ([::1]:52936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX4Bh-0002BD-U4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 26 Oct 2020 11:13:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kX4BC-0001u3-Gu for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 11:13:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57470) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kX4BC-0005r5-6l for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 11:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kX4BC-0007QN-1i for bug-gnu-emacs@gnu.org; Mon, 26 Oct 2020 11:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Oct 2020 15:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44047 X-GNU-PR-Package: emacs Original-Received: via spool by 44047-submit@debbugs.gnu.org id=B44047.160372517328522 (code B ref 44047); Mon, 26 Oct 2020 15:13:02 +0000 Original-Received: (at 44047) by debbugs.gnu.org; 26 Oct 2020 15:12:53 +0000 Original-Received: from localhost ([127.0.0.1]:40783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX4B3-0007Py-Do for submit@debbugs.gnu.org; Mon, 26 Oct 2020 11:12:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kX4B2-0007Pl-EF for 44047@debbugs.gnu.org; Mon, 26 Oct 2020 11:12:52 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56325) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kX4Aw-0005qZ-Ss; Mon, 26 Oct 2020 11:12:46 -0400 Original-Received: from [176.228.60.248] (port=1197 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kX4Aw-0002zO-4l; Mon, 26 Oct 2020 11:12:46 -0400 In-Reply-To: <83k0vjmurb.fsf@gnu.org> (message from Eli Zaretskii on Wed, 21 Oct 2020 19:03:20 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191584 Archived-At: Ping! Any news on this? > Date: Wed, 21 Oct 2020 19:03:20 +0300 > From: Eli Zaretskii > Cc: 44047@debbugs.gnu.org > > > Date: Tue, 20 Oct 2020 16:19:26 -0600 (MDT) > > From: Liam Stitt > > 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. > > > >