GNU bug report logs - #18422
24.3.93; Assertion violation when resizing mini-window on a TTY

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Sun, 7 Sep 2014 19:24:01 UTC

Severity: normal

Found in version 24.3.93

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 18422 <at> debbugs.gnu.org
Subject: bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY
Date: Tue, 09 Sep 2014 16:12:21 +0300
> Date: Mon, 08 Sep 2014 11:31:34 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> 
> One possible fix would be:
> 
> === modified file 'lisp/window.el'
> --- lisp/window.el	2014-08-29 10:39:17 +0000
> +++ lisp/window.el	2014-09-08 08:45:23 +0000
> @@ -2388,6 +2388,8 @@
>   	;; why we do not do that.
>   	(window--resize-this-window root (- delta) nil nil t)
>   	(set-window-new-pixel window (+ height delta))
> +	(set-window-new-total window (/ (window-new-pixel window)
> +					(frame-char-height frame)))
>   	;; The following routine catches the case where we want to resize
>   	;; a minibuffer-only frame.
>   	(when (resize-mini-window-internal window)
> 
> 
> 
> But I'm afraid that other windows might be affected as well so I'd
> prefer to do this instead:
> 
> === modified file 'src/dispnew.c'
> --- src/dispnew.c	2014-09-08 06:00:58 +0000
> +++ src/dispnew.c	2014-09-08 09:04:18 +0000
> @@ -1708,7 +1708,7 @@
>       }
>   #endif /* HAVE_WINDOW_SYSTEM */
> 
> -  return WINDOW_TOTAL_LINES (w);
> +  return WINDOW_PIXEL_HEIGHT (w);
>   }
> 
> 
> @@ -1734,7 +1734,7 @@
>       }
>   #endif /* HAVE_WINDOW_SYSTEM */
> 
> -  return w->total_cols;
> +  return WINDOW_PIXEL_WIDTH (w);
>   }

I already tried this before reporting the bug.  It doesn't work,
because we then hit these assertions in fake_current_matrices:

	  eassert (m->matrix_h == WINDOW_TOTAL_LINES (w));
	  eassert (m->matrix_w == WINDOW_TOTAL_COLS (w));

In general, I think it's a bad idea to have bogus values in
WINDOW_TOTAL_LINES and WINDOW_TOTAL_COLS, they are not documented to
be invalid under any circumstances, so the code relies on them.

What exactly frightens you in your first proposal?  Perhaps we should
install my patch on the emacs-24 branch and your window.el patch on
the trunk?




This bug report was last modified 10 years and 250 days ago.

Previous Next


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