emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

redisplay abort if GLYPH_DEBUG turned on


From: Miles Bader
Subject: redisplay abort if GLYPH_DEBUG turned on
Date: Tue, 04 Jan 2005 13:32:22 +0900

The following change:

   2004-12-13  Kim F. Storm  <address@hidden>

           * xdisp.c (set_iterator_to_next): Reset stop_charpos after display
           vector.

   --- orig/src/xdisp.c     8 Dec 2004 22:06:31 -0000
   +++ mod/src/xdisp.c     13 Dec 2004 14:27:56 -0000
   @@ -5140,6 +5140,9 @@
             it->dpvec = NULL;
             it->current.dpvec_index = -1;

   +         /* Recheck faces after display vector */
   +         it->stop_charpos = 0;
   +
             /* Skip over characters which were displayed via IT->dpvec.  */
             if (it->dpvec_char_len < 0)
               reseat_at_next_visible_line_start (it, 1);

seems to cause an abort if you view the attached file (see end of
message) with GLYPH_DEBUG is turned on, in the xassert in
`next_element_from_buffer' [src/xdisp.c:5534]:

  /* Check this assumption, otherwise, we would never enter the
     if-statement, below.  */
  xassert (IT_CHARPOS (*it) >= BEGV
           && (IT_CHARPOS (*it) <= it->stop_charpos));


... because it->stop_charpos is 0.

Commenting out the change in `set_iterator_to_next' fixes the crash, but
I have no idea what the rules governing stop_charpos are, so it could be
the xassert that's wrong (nobody ever seems to turn on glyph debugging).

For the time being, I'm using the following patch in my local source
tree to avoid crashes:

--- orig/src/xdisp.c
+++ mod/src/xdisp.c
@@ -5532,7 +5532,7 @@
   /* Check this assumption, otherwise, we would never enter the
      if-statement, below.  */
   xassert (IT_CHARPOS (*it) >= BEGV
-          && IT_CHARPOS (*it) <= it->stop_charpos);
+          && (it->stop_charpos == 0 || IT_CHARPOS (*it) <= it->stop_charpos));
 
   if (IT_CHARPOS (*it) >= it->stop_charpos)
     {


Here's the file that causes a crash:

Attachment: em-crash
Description: Text file that causes an Emacs abort if GLYPH_DEBUG is turned on

Thanks,

-Miles
-- 
Next to fried food, the South has suffered most from oratory.
                        -- Walter Hines Page

reply via email to

[Prev in Thread] Current Thread [Next in Thread]