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#16049: 24.3.50; xdisp.c infloop on Mac OS X 10.9 Date: Sat, 07 Dec 2013 11:16:30 +0200 Message-ID: <83zjodyqa9.fsf@gnu.org> References: <529F3E96.1070904@gmx.at> <3E956BE9-9DFC-4156-AE93-53DBD06FECC5@swipnet.se> <529F6F2A.6070904@gmx.at> <52A0248B.7030805@gmx.at> <89B5C332-6027-4395-BB1F-0A6FA17C430F@swipnet.se> <83eh5r2m9h.fsf@gnu.org> <9DC79E5A-5D6E-46C0-A349-C8CD803C5513@swipnet.se> <837gbj2gp0.fsf@gnu.org> <04BC6316-338E-4025-A9CC-006F576051C1@swipnet.se> <52A21DF3.6040709@gmx.at> <96DEDC77-CEB4-4226-9362-9F9CFD198945@swipnet.se> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT X-Trace: ger.gmane.org 1386407832 20571 80.91.229.3 (7 Dec 2013 09:17:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 7 Dec 2013 09:17:12 +0000 (UTC) Cc: colding@venalicium.dk, 16049@debbugs.gnu.org To: Jan =?UTF-8?Q?Dj=C3=A4rv?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 07 10:17:15 2013 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 1VpE0g-00046C-L4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Dec 2013 10:17:14 +0100 Original-Received: from localhost ([::1]:35095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpE0g-0001Q1-20 for geb-bug-gnu-emacs@m.gmane.org; Sat, 07 Dec 2013 04:17:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpE0Z-0001Pu-GZ for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2013 04:17:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VpE0U-0004jZ-My for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2013 04:17:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VpE0U-0004jV-Je for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2013 04:17:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VpE0U-0001Hr-10 for bug-gnu-emacs@gnu.org; Sat, 07 Dec 2013 04:17:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Dec 2013 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16049 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16049-submit@debbugs.gnu.org id=B16049.13864078044920 (code B ref 16049); Sat, 07 Dec 2013 09:17:01 +0000 Original-Received: (at 16049) by debbugs.gnu.org; 7 Dec 2013 09:16:44 +0000 Original-Received: from localhost ([127.0.0.1]:35549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VpE0B-0001HD-A6 for submit@debbugs.gnu.org; Sat, 07 Dec 2013 04:16:43 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:49162) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VpE08-0001H2-5e for 16049@debbugs.gnu.org; Sat, 07 Dec 2013 04:16:41 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MXF00I00IVP8U00@a-mtaout23.012.net.il> for 16049@debbugs.gnu.org; Sat, 07 Dec 2013 11:16:38 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MXF00I44J3Q7U70@a-mtaout23.012.net.il>; Sat, 07 Dec 2013 11:16:38 +0200 (IST) In-reply-to: <96DEDC77-CEB4-4226-9362-9F9CFD198945@swipnet.se> 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:81581 Archived-At: > From: Jan Djärv > Date: Sat, 7 Dec 2013 09:25:29 +0100 > Cc: Eli Zaretskii , > Jules Colding , > 16049@debbugs.gnu.org > > Next problem, infloop in move_it_vertically_backward, xdisp.c > > It just keeps going back to move_further_back: but no values are actually changed in the code inbetween. I don't know whats bad here, values looks fine to me. window_box_height is called > and returns 490, which is the pixel size. > > Backtrace: Here's one sign of the trouble: > nchars_per_row = 0 This is the number of canonical-width characters that fit in a full screen line, which obviously cannot be zero. It is computed at the beginning of move_it_vertically_backward like this: int nchars_per_row = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH (it->f); So now we look for the values of it->last_visible_x and it->first_visible_x. The contents of it are not available in "bt full", but there are locals it2 and it3, which use copies of the same metrics. And here we find this: first_visible_x = 2147483643, last_visible_x = 2147483642, which is obviously bogus, since those are supposed to be the pixel coordinates of the first screen-line pixel shown at the left edge of the window (usually zero, but can be positive when lines are truncated and the window is hscrolled), and of the last screen-line pixel shown at the right edge. So now the question is: how did those bogus values end up in the iterator structure? The code that initializes this iterator is here: if (it.current_y <= 0) { init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); <<<<<<<< move_it_vertically_backward (&it, 0); and in init_iterator we find this: /* Get the dimensions of the display area. The display area consists of the visible window area plus a horizontally scrolled part to the left of the window. All x-values are relative to the start of this total display area. */ if (base_face_id != DEFAULT_FACE_ID) { /* Mode lines, menu bar in terminal frames. */ it->first_visible_x = 0; it->last_visible_x = WINDOW_PIXEL_WIDTH (w); } else { it->first_visible_x = window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f); it->last_visible_x = (it->first_visible_x + window_box_width (w, TEXT_AREA)); /* If we truncate lines, leave room for the truncation glyph(s) at the right margin. Otherwise, leave room for the continuation glyph(s). Done only if the window has no fringes. Since we don't know at this point whether there will be any R2L lines in the window, we reserve space for truncation/continuation glyphs even if only one of the fringes is absent. */ if (WINDOW_RIGHT_FRINGE_WIDTH (it->w) == 0 || (it->bidi_p && WINDOW_LEFT_FRINGE_WIDTH (it->w) == 0)) { if (it->line_wrap == TRUNCATE) it->last_visible_x -= it->truncation_pixel_width; else it->last_visible_x -= it->continuation_pixel_width; } it->header_line_p = WINDOW_WANTS_HEADER_LINE_P (w); it->current_y = WINDOW_HEADER_LINE_HEIGHT (w) + w->vscroll; } So stepping through this code in init_iterator, when it is invoked from xdisp.c:16186 (16191 in the current trunk) should reveal the culprit. If init_iterator computes these values correctly, then setting a watchpoint on them should show who thrashes them.