Subject: bug#59147: 29.0.50; dispnew.c:1456: Emacs fatal error: assertion failed: row >= 0 && row < matrix->nrows

From: Eli Zaretskii <[email-masked]>
Date: Wed, 09 Nov 2022 15:21:31 +0200

> From: Gregor Zattler <[email-masked]>
> Date: Wed, 09 Nov 2022 13:37:13 +0100
> 
> Dear Emacs and notmuch developers, lately Emacs often
> hangs/crashes/stops while I'm working.  I cannot reproduce
> with emacs -Q, because I need at least org-mode and notmuch
> for work.
> 
> Anyway, here is a (x)backtrace from an unoptimized, rather
> current build, please tell me, if this is helpful or if I
> should not send such backtraces (I myself cannot read them,
> I'm happy to answer questions, in this case the Emacs
> process is still in gdb till max tomorrow 08:00 UTC, then I
> have to shutdown the laptop):
> 
> dispnew.c:1456: Emacs fatal error: assertion failed: row >= 0 && row < matrix->nrows
> 
> Thread 1 "emacs" hit Breakpoint 1, terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:421
> 421     {
> (gdb) bt
> #0  terminate_due_to_signal (sig=6, backtrace_limit=2147483647) at emacs.c:421
> #1  0x000055555581cae5 in die (msg=0x55555598b4e8 "row >= 0 && row < matrix->nrows", file=0x55555598b293 "dispnew.c", line=1456) at alloc.c:7692
> #2  0x000055555559d310 in matrix_row (matrix=0x55555d44d470, row=8) at dispnew.c:1456

What does the below produce:

  (gdb) frame 2
  (gdb) p matrix->nrows