From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY Date: Tue, 09 Sep 2014 16:12:21 +0300 Message-ID: <83oaupaqfe.fsf@gnu.org> References: <834mwjck0x.fsf@gnu.org> <540D7776.8090904@gmx.at> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1410268409 20911 80.91.229.3 (9 Sep 2014 13:13:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2014 13:13:29 +0000 (UTC) Cc: 18422@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 09 15:13:20 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XRLEW-0007uP-8G for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 15:13:20 +0200 Original-Received: from localhost ([::1]:49640 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRLEV-0004F1-OA for geb-bug-gnu-emacs@m.gmane.org; Tue, 09 Sep 2014 09:13:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36276) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRLEM-0004CU-3u for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 09:13:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRLEF-0003Zy-66 for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 09:13:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRLEF-0003ZM-2N for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 09:13:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XRLEE-0001cW-FC for bug-gnu-emacs@gnu.org; Tue, 09 Sep 2014 09: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: Tue, 09 Sep 2014 13:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18422 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18422-submit@debbugs.gnu.org id=B18422.14102683426171 (code B ref 18422); Tue, 09 Sep 2014 13:13:02 +0000 Original-Received: (at 18422) by debbugs.gnu.org; 9 Sep 2014 13:12:22 +0000 Original-Received: from localhost ([127.0.0.1]:34554 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRLDZ-0001bS-0A for submit@debbugs.gnu.org; Tue, 09 Sep 2014 09:12:21 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:47216) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRLDW-0001bB-5s for 18422@debbugs.gnu.org; Tue, 09 Sep 2014 09:12:19 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NBM00L00XRC9G00@a-mtaout21.012.net.il> for 18422@debbugs.gnu.org; Tue, 09 Sep 2014 16:12:11 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NBM00L3MY0B4J70@a-mtaout21.012.net.il>; Tue, 09 Sep 2014 16:12:11 +0300 (IDT) In-reply-to: <540D7776.8090904@gmx.at> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93180 Archived-At: > Date: Mon, 08 Sep 2014 11:31:34 +0200 > From: martin rudalics > > 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?