unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Magne Ingebrigtsen <larsi@gnus.org>
Cc: 10304@debbugs.gnu.org
Subject: bug#10304: 24.0.92: display bug
Date: Sat, 17 Jan 2015 13:34:17 +0200	[thread overview]
Message-ID: <83vbk5zlmu.fsf@gnu.org> (raw)
In-Reply-To: <m3sifbbo2q.fsf@gnus.org>

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: 10304@debbugs.gnu.org
> Date: Fri, 16 Jan 2015 00:50:53 +0100
> 
> Eli Zaretskii <eliz@gnu.org> 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)
     {





  reply	other threads:[~2015-01-17 11:34 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 15:30 bug#14704: 24.3.50; cl-lib breaks built-in Emacs version Sebastian Wiesner
2013-06-24 15:48 ` Juanma Barranquero
2013-06-24 17:51   ` Sebastian Wiesner
2013-06-24 17:56     ` Juanma Barranquero
2013-06-24 18:26       ` Sebastian Wiesner
2013-06-24 18:38         ` Eli Zaretskii
2013-06-24 18:57           ` Sebastian Wiesner
2013-06-24 19:20             ` Eli Zaretskii
2013-06-24 20:02               ` Glenn Morris
2013-06-24 20:08                 ` Eli Zaretskii
2013-06-24 20:21                   ` Dmitry Gutov
2013-06-24 20:25                     ` Eli Zaretskii
2013-06-24 20:30                       ` Juanma Barranquero
2013-06-25 14:43                         ` Eli Zaretskii
2013-06-24 21:19                       ` Jambunathan K
2013-06-25  2:43                         ` Eli Zaretskii
2013-06-25  2:35                       ` Stefan Monnier
2013-06-25 14:39                         ` Eli Zaretskii
2013-06-25 15:50                           ` Stefan Monnier
2013-06-25  6:17                   ` Michael Albinus
2013-06-25 15:00                     ` Eli Zaretskii
2013-06-25 15:24                       ` Michael Albinus
2013-06-25 16:03                         ` bug#10304: " Eli Zaretskii
2013-06-25 18:27                           ` bug#10304: display bug (was: bug#14704: 24.3.50; cl-lib breaks built-in Emacs version) Michael Albinus
2013-06-25 18:58                             ` Eli Zaretskii
2013-06-25 19:13                               ` bug#10304: display bug Michael Albinus
2011-12-15 13:51                                 ` bug#10304: 24.0.92: display but Yagnesh Raghava Yakkala
2011-12-15 13:58                                   ` Yagnesh Raghava Yakkala
2012-01-07  1:20                                   ` Lars Magne Ingebrigtsen
2012-01-07  8:48                                     ` Eli Zaretskii
2012-01-26  0:09                                       ` Lars Ingebrigtsen
2013-01-02  2:36                                       ` bug#10304: 24.0.92: display bug Lars Magne Ingebrigtsen
2013-01-02 18:23                                         ` Eli Zaretskii
2013-01-02 18:42                                           ` Lars Magne Ingebrigtsen
2013-01-02 21:42                                             ` Andreas Schwab
2013-01-05  8:38                                         ` Lars Magne Ingebrigtsen
2013-01-05  8:51                                           ` Eli Zaretskii
2013-01-05  9:16                                             ` Lars Magne Ingebrigtsen
2013-01-05  9:17                                             ` Lars Magne Ingebrigtsen
2013-01-05  9:49                                               ` Eli Zaretskii
2013-01-05 10:11                                                 ` Lars Magne Ingebrigtsen
2013-01-05 11:29                                           ` Eli Zaretskii
2013-01-05 11:38                                             ` Lars Magne Ingebrigtsen
2013-01-05 13:43                                               ` Eli Zaretskii
2013-01-05 17:36                                               ` Eli Zaretskii
2013-01-08  5:11                                                 ` Lars Magne Ingebrigtsen
2013-01-08  5:43                                                   ` Eli Zaretskii
2013-01-08 11:19                                                     ` Michael Albinus
2013-01-08 21:21                                                       ` Eli Zaretskii
2013-01-08 21:29                                                         ` Michael Albinus
2013-01-08 21:39                                                           ` Eli Zaretskii
2013-01-13 18:08                                                     ` Eli Zaretskii
2013-01-16 15:06                                                       ` Michael Albinus
2014-11-14 15:45                                                     ` Lars Magne Ingebrigtsen
2014-11-14 15:56                                                       ` Eli Zaretskii
2014-11-14 15:57                                                         ` Lars Magne Ingebrigtsen
2014-11-15 15:35                                                           ` Lars Magne Ingebrigtsen
2014-11-15 15:41                                                           ` Lars Magne Ingebrigtsen
2014-11-29 15:42                                                             ` Eli Zaretskii
     [not found]                                                               ` <m3oarmyoiz.fsf@stories.gnus.org>
2014-12-27 14:20                                                                 ` Eli Zaretskii
2015-01-15 23:50                                                                   ` Lars Magne Ingebrigtsen
2015-01-17 11:34                                                                     ` Eli Zaretskii [this message]
2015-05-07  4:31                                                                       ` Eli Zaretskii
2015-05-11 13:06                                                                         ` Lars Magne Ingebrigtsen
2015-05-11 15:18                                                                           ` Eli Zaretskii
2013-06-27 13:20                                   ` bug#10304: " Michael Albinus
2013-06-27 17:11                                     ` Eli Zaretskii
2013-06-27 18:25                                       ` Michael Albinus
2013-07-09 10:39                                       ` Michael Albinus
2013-07-09 17:16                                         ` Eli Zaretskii
2013-07-10 17:04                                         ` Eli Zaretskii
2013-07-10 18:03                                           ` Michael Albinus
2013-06-24 20:18         ` bug#14704: 24.3.50; cl-lib breaks built-in Emacs version Juanma Barranquero
2013-06-25  2:11         ` Stefan Monnier
2013-06-24 18:16     ` Eli Zaretskii
2013-06-24 18:40       ` Sebastian Wiesner
2013-06-24 17:39 ` Glenn Morris
2013-06-24 17:52   ` Sebastian Wiesner
2013-06-25 16:27 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83vbk5zlmu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=10304@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).