From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#18422: 24.3.93; Assertion violation when resizing mini-window on a TTY Date: Wed, 10 Sep 2014 10:03:27 +0200 Message-ID: <541005CF.1050504@gmx.at> References: <834mwjck0x.fsf@gnu.org> <540D7776.8090904@gmx.at> <83oaupaqfe.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1410336290 31060 80.91.229.3 (10 Sep 2014 08:04:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2014 08:04:50 +0000 (UTC) Cc: 18422@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Sep 10 10:04:42 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 1XRctM-0008U4-2m for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Sep 2014 10:04:40 +0200 Original-Received: from localhost ([::1]:54169 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRctL-0000gA-Mb for geb-bug-gnu-emacs@m.gmane.org; Wed, 10 Sep 2014 04:04:39 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRcst-00007K-Aq for bug-gnu-emacs@gnu.org; Wed, 10 Sep 2014 04:04:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRcsl-0007m6-AE for bug-gnu-emacs@gnu.org; Wed, 10 Sep 2014 04:04:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRcsl-0007m2-7I for bug-gnu-emacs@gnu.org; Wed, 10 Sep 2014 04:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XRcsk-00007s-Ta for bug-gnu-emacs@gnu.org; Wed, 10 Sep 2014 04:04:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Sep 2014 08:04: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.1410336224433 (code B ref 18422); Wed, 10 Sep 2014 08:04:02 +0000 Original-Received: (at 18422) by debbugs.gnu.org; 10 Sep 2014 08:03:44 +0000 Original-Received: from localhost ([127.0.0.1]:35938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRcsS-00006u-0r for submit@debbugs.gnu.org; Wed, 10 Sep 2014 04:03:44 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:57773) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XRcsP-00006d-PW for 18422@debbugs.gnu.org; Wed, 10 Sep 2014 04:03:42 -0400 Original-Received: from [188.22.44.68] ([188.22.44.68]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MId0S-1XTpnh2h1k-002Geq; Wed, 10 Sep 2014 10:03:33 +0200 In-Reply-To: <83oaupaqfe.fsf@gnu.org> X-Provags-ID: V03:K0:hhkHg+LotIt651IujjpJQFyCrqzK+LyzsswlZtlvbep0FbR8tbN AlMcgr/RQrpmdtfGNrwoomNzcp7UhBxi4TIQzDsp9SwooUOwODryBDHDqzQK8BOjo6g6QcH 7XPisRTz6SJV6SPcAU6lOWFpwT5J4/Q9IwlUpoRZsEdRScy1ho66+wJRCTxN2hPHFOMSzFc L0qWjPjZ3ykC8vCPJJM3g== X-UI-Out-Filterresults: notjunk:1; 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:93230 Archived-At: > 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)); We would have to use pixel sizes there too and maybe elsewhere. > 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. Agreed. The "total" values are bogus from the moment a function like `resize-mini-window-internal' is executed until `window--pixel-to-total' is executed. Unfortunately, I currently adjust the frame glyphs right in between. I should either move the adjust_frame_glyphs call to Fwindow_resize_apply_total or set the new total sizes before calling window_resize_apply and have the latter call window_resize_apply_total. > 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? I'm afraid that the current bug is only the tip of an iceberg. We should close the window of vulnerability sketched above. On the emacs-24 branch. Neither of the two schemes from the previous paragraph is entirely trivial so using pixel values instead of character values would put us more on the safe side. Eventually, I intend to remove the total_lines/total_cols fields from the frame structure and have FRAME_TOTAL_COLS and FRAME_TOTAL_LINES calculate the values directly from the pixel sizes. I refrained from doing this already because I'm never sure how these values should get rounded. martin