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#10304: 24.0.92: display bug Date: Sat, 17 Jan 2015 13:34:17 +0200 Message-ID: <83vbk5zlmu.fsf@gnu.org> References: <8762hihrj7.fsf@live.com> <8362gnhp9b.fsf@gnu.org> <8338yfamvk.fsf@gnu.org> <83wqvr8rci.fsf@gnu.org> <83ehhw8c15.fsf@gnu.org> <831tp5ixns.fsf@gnu.org> <838uiuau85.fsf@gnu.org> <83k31dkwcs.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1421494516 17380 80.91.229.3 (17 Jan 2015 11:35:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 17 Jan 2015 11:35:16 +0000 (UTC) Cc: 10304@debbugs.gnu.org To: Lars Magne Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 17 12:35:15 2015 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 1YCRes-0000UO-Vc for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2015 12:35:15 +0100 Original-Received: from localhost ([::1]:58889 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCRes-0000Z5-58 for geb-bug-gnu-emacs@m.gmane.org; Sat, 17 Jan 2015 06:35:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCRem-0000Wl-2A for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 06:35:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCReg-00015T-BF for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 06:35:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCReg-000151-71 for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 06:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YCRef-00062v-L3 for bug-gnu-emacs@gnu.org; Sat, 17 Jan 2015 06:35:01 -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, 17 Jan 2015 11:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10304 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 10304-submit@debbugs.gnu.org id=B10304.142149447823207 (code B ref 10304); Sat, 17 Jan 2015 11:35:01 +0000 Original-Received: (at 10304) by debbugs.gnu.org; 17 Jan 2015 11:34:38 +0000 Original-Received: from localhost ([127.0.0.1]:59723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCReE-000629-05 for submit@debbugs.gnu.org; Sat, 17 Jan 2015 06:34:37 -0500 Original-Received: from mtaout23.012.net.il ([80.179.55.175]:42122) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YCRe5-00061m-0S for 10304@debbugs.gnu.org; Sat, 17 Jan 2015 06:34:32 -0500 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NIB00800JCIUA00@a-mtaout23.012.net.il> for 10304@debbugs.gnu.org; Sat, 17 Jan 2015 13:34:18 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NIB0087PK55SP40@a-mtaout23.012.net.il>; Sat, 17 Jan 2015 13:34:18 +0200 (IST) In-reply-to: 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:98437 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: 10304@debbugs.gnu.org > Date: Fri, 16 Jan 2015 00:50:53 +0100 > > Eli Zaretskii writes: > > > I'd like to prepare an additional patch which will allow you to > > collect more data that might reveal why Emacs behaves like that. In > > order to test the patch, is it possible for you to give me > > instructions for how to display that article, starting from "emacs -Q"? > > That was easier than I had thought. I had forgotten about this entry > point to Gnus. > > `eval'-ing this from "emacs -Q" should work: > > (gnus-fetch-group "nntp+news.gmane.org:gwene.com.wordpress.arnoldzwicky" '(3401)) > > although you will be queried about the self-signed certificate. Thanks, that was easy enough. Granted, I don't see any redisplay problems with that article, like you do. Below please find a new patch to add trace data. This is _instead_ of the previous patch, not in addition to it, and it's relative to the current master (I hope the problem is still visible with the current master). After applying the patch, please again do whatever is needed to reproduce the problem, and please tell me which part(s) of the trace are emitted when the display becomes corrupted. Before invoking "M-x trace-redisplay", please disable blink-cursor-mode (as it triggers too many unnecessary redisplay cycles that muddy the water), and also delete ("C-x 0") the summary window, so that redisplay has less windows to refresh (which will again make the signal to noise ratio of the trace better). Thanks. Here's the patch: diff --git a/src/dispnew.c b/src/dispnew.c index a643d58..c41584d 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -3606,6 +3606,8 @@ struct glyph_row * TEXT_AREA, desired_row->used[TEXT_AREA]); /* Clear to end of window. */ + TRACE ((stderr, "clear_end_of_line1(%d..): vpos = %d Y = %d\n", + desired_row->used[TEXT_AREA], vpos, desired_row->y)); rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1); changed_p = 1; @@ -3642,6 +3644,8 @@ struct glyph_row * i = 0; x = desired_row->x; + TRACE ((stderr, "detect common glyphs for row at vpos = %d\n", vpos)); + /* Loop over glyphs that current and desired row may have in common. */ while (i < stop) @@ -3743,6 +3747,8 @@ struct glyph_row * } output_cursor_to (w, vpos, start_hpos, desired_row->y, start_x); + TRACE ((stderr, "write different glyphs %d..%d at vpos = %d\n", + start_hpos, i, vpos)); rif->write_glyphs (w, updated_row, start, TEXT_AREA, i - start_hpos); changed_p = 1; @@ -3753,6 +3759,8 @@ struct glyph_row * if (i < desired_row->used[TEXT_AREA]) { output_cursor_to (w, vpos, i, desired_row->y, x); + TRACE ((stderr, "write the rest %d..%d at vpos = %d\n", + i, desired_row->used[TEXT_AREA], vpos)); rif->write_glyphs (w, updated_row, desired_glyph, TEXT_AREA, desired_row->used[TEXT_AREA] - i); changed_p = 1; @@ -3769,6 +3777,7 @@ struct glyph_row * || ((desired_row->used[TEXT_AREA] == current_row->used[TEXT_AREA]) && MATRIX_ROW_EXTENDS_FACE_P (current_row))); + TRACE ((stderr, "nothing to clear at vpos = %d\n", vpos)); } else if (MATRIX_ROW_EXTENDS_FACE_P (current_row)) { @@ -3776,6 +3785,8 @@ struct glyph_row * if (i >= desired_row->used[TEXT_AREA]) output_cursor_to (w, vpos, i, desired_row->y, desired_row->pixel_width); + TRACE ((stderr, "clear_end_of_line2(%d..): vpos = %d Y = %d\n", + i, vpos, desired_row->y)); rif->clear_end_of_line (w, updated_row, TEXT_AREA, -1); changed_p = 1; } @@ -3804,6 +3815,8 @@ struct glyph_row * } else xlim = current_row->pixel_width; + TRACE ((stderr, "clear_end_of_line3(%d..): vpos = %d Y = %d\n", + i, vpos, desired_row->y)); rif->clear_end_of_line (w, updated_row, TEXT_AREA, xlim); changed_p = 1; } diff --git a/src/xdisp.c b/src/xdisp.c index f006f8e..b70ee7a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -27178,6 +27178,9 @@ and buffer to use as the context for the formatting (defaults from_y = WINDOW_TO_FRAME_PIXEL_Y (w, max (min_y, w->output_cursor.y)); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, to_y); + TRACE ((stderr, "clear_frame_area: [%d - %d] [%d - %d]\n", + from_x, to_x, from_y, to_y)); + /* Prevent inadvertently clearing to end of the X window. */ if (to_x > from_x && to_y > from_y) {