GNU bug report logs - #73022
31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size

Previous Next

Package: emacs;

Reported by: Daniel Clemente <n142857 <at> gmail.com>

Date: Wed, 4 Sep 2024 06:12:02 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Daniel Clemente <n142857 <at> gmail.com>
Cc: 73022 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#73022: 31.0.50; Crash in build_frame_matrix_from_leaf_window after C-x 2 and reducing terminal size
Date: Sun, 8 Sep 2024 16:36:24 +0200
> We're dealing with two type of assertion violations / crashes / backtraces:
> - in update_frame_line, that causes chcheckmagic to fail
> - in build_frame_matrix_from_leaf_window, assertion violation
>
> With the same build I mentioned in the top post (that is, without any
> code change), I can see both, after following the same instructions I
> posted.
> The update_frame_line happens much more frequently, therefore I
> thought that the update_frame_line was fixed in 71289; but it's not: I
> just reproduced the update_frame_line issue.

Good to know.

> So you can't be sure that the original assertion violation is gone.

Right.

> Your build may have crashed with the update_frame_line crash, before
> reaching the build_frame_matrix_from_leaf_window crash.

Right again.  But I think that with my initial patch, the likeliness of
the later has decreased.

> The best would be to solve both crashes :-)
>
> I don't know whether both crashes are related.

They are both caused by shrinking the frame size to something Emacs
doesn't like.  Note the

      if (width > 5 && height > 2)

check in handle_window_change_signal and the

  /* Don't allow too small height of text-mode frames, or else cm.c
     might abort in cmcheckmagic.  */
  if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal))
    {
      int min_height = (FRAME_MENU_BAR_LINES (f)
			+ FRAME_TAB_BAR_LINES (f)
			+ FRAME_WANTS_MODELINE_P (f)
			+ 2);	/* one text line and one echo-area line */

      if (retval < min_height)
	retval = min_height;
    }

in frame_windows_min_size.  People always were aware of the problem but
with split windows these values are of no use.

martin




This bug report was last modified 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.