GNU bug report logs - #11417
24.0.96; infinite looping in xdisp.c

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 6 May 2012 04:28:02 UTC

Severity: normal

Found in version 24.0.96

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11417 in the body.
You can then email your comments to 11417 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 06 May 2012 04:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 06 May 2012 04:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.96; infinite looping in xdisp.c
Date: Sun, 06 May 2012 12:24:34 +0800
[Message part 1 (text/plain, inline)]
I have yet to find a minimal example to reproduce this. I know the
following few facts. It must be run under tty and seems to related to
overlays. It was triggered by flymake in some python files. The contents
of those files are only partly displayed by Emacs (see screenshots
attached). My Emacs was built on 2012-04-28.

(gdb) 
Run till exit from #0  0x000000010003d316 in move_it_in_display_line_to (it=0x7fff5fbfb248, to_charpos=411, to_x=-1, op=12) at xdisp.c:7990
0x000000010003f702 in move_it_to (it=0x7fff5fbfb248, to_charpos=411, to_x=-1, to_y=-1, to_vpos=1, op=12) at xdisp.c:8536
8536		      skip = move_it_in_display_line_to (it, to_charpos, to_x, op);
Value returned is $2 = MOVE_POS_MATCH_OR_ZV
(gdb) 
Run till exit from #0  0x000000010003f702 in move_it_to (it=0x7fff5fbfb248, to_charpos=411, to_x=-1, to_y=-1, to_vpos=1, op=12) at xdisp.c:8536
move_it_vertically_backward (it=0x7fff5fbfce20, dy=0) at xdisp.c:8816
8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
(gdb) next
8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
(gdb) 
8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
(gdb) 
8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
(gdb) 
8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
(gdb) 
8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
(gdb) 
8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
(gdb) 
8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
(gdb) 
8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));

[python-bugged.png (image/png, attachment)]
[python-good.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 06 May 2012 05:46:02 GMT) Full text and rfc822 format available.

Message #8 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sun, 06 May 2012 13:43:36 +0800
Leo <sdl.web <at> gmail.com> writes:

> I have yet to find a minimal example to reproduce this. I know the
> following few facts. It must be run under tty and seems to related to
> overlays. It was triggered by flymake in some python files. The contents
> of those files are only partly displayed by Emacs (see screenshots
> attached). My Emacs was built on 2012-04-28.

There have only been a couple of changes to xdisp.c recently, so if this
problem only started occurring not long ago, try reverting r107894
and/or r107846 and see if it goes away.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 06 May 2012 16:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sun, 06 May 2012 19:18:45 +0300
> From: Leo <sdl.web <at> gmail.com>
> Date: Sun, 06 May 2012 12:24:34 +0800
> 
> I have yet to find a minimal example to reproduce this. I know the
> following few facts. It must be run under tty and seems to related to
> overlays. It was triggered by flymake in some python files. The contents
> of those files are only partly displayed by Emacs (see screenshots
> attached). My Emacs was built on 2012-04-28.

From which branch did you build your Emacs?  Trunk or emacs-24?

> Run till exit from #0  0x000000010003d316 in move_it_in_display_line_to (it=0x7fff5fbfb248, to_charpos=411, to_x=-1, op=12) at xdisp.c:7990
> 0x000000010003f702 in move_it_to (it=0x7fff5fbfb248, to_charpos=411, to_x=-1, to_y=-1, to_vpos=1, op=12) at xdisp.c:8536
> 8536		      skip = move_it_in_display_line_to (it, to_charpos, to_x, op);
> Value returned is $2 = MOVE_POS_MATCH_OR_ZV
> (gdb) 
> Run till exit from #0  0x000000010003f702 in move_it_to (it=0x7fff5fbfb248, to_charpos=411, to_x=-1, to_y=-1, to_vpos=1, op=12) at xdisp.c:8536
> move_it_vertically_backward (it=0x7fff5fbfce20, dy=0) at xdisp.c:8816
> 8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
> (gdb) next
> 8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
> (gdb) 
> 8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
> (gdb) 
> 8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
> (gdb) 
> 8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
> (gdb) 
> 8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
> (gdb) 
> 8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));
> (gdb) 
> 8804	      move_it_to (&it2, start_pos, -1, -1, it2.vpos + 1,
> (gdb) 
> 8816		       && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n')));

First, please provide the entire backtrace from here to main, and also
the Lisp backtrace (from the "xbacktrace" command).  You will need to
make sure GDB reads the src/.gdbinit file for "xbacktrace" to work,
and also for several other commands below.

Second, I need to see some of the variables involved in this:

 (gdb) p start_pos
 (gdb) p it2.vpos
 (gdb) p it2.current
 (gdb) p it2.string
 (gdb) xtype
 (gdb) p it2.method

Finally, can you describe what should be displayed on the portion of
the screen that is around the character position (shown by "p it2.current"
above) where Emacs loops?  The following command should display
detailed information about the screen line that includes the above buffer
position:

 (gdb) pgrowx (it2.w->desired_matrix->rows+N)

where N is the zero-based number of the screen line.  If you cannot
easily figure out the value of N, try the above command for successive
values starting from zero, until you see the first screen line that is
not displayed.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Mon, 07 May 2012 16:20:02 GMT) Full text and rfc822 format available.

Message #14 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 08 May 2012 00:17:14 +0800
[Message part 1 (text/plain, inline)]
On 2012-05-07 00:18 +0800, Eli Zaretskii wrote:
> First, please provide the entire backtrace from here to main, and also
> the Lisp backtrace (from the "xbacktrace" command).  You will need to
> make sure GDB reads the src/.gdbinit file for "xbacktrace" to work,
> and also for several other commands below.

I built it from emacs-24 branch.

I run gdb in emacs/src and attach to the process that is hanging. Then
source .gdbinit and I got:

DISPLAY = /tmp/launch-VtT4mU/org.x:0
TERM = xterm-color
[0] cancel
[1] all

Non-debugging symbols:
[2]    -[CIContext abort]
[3]    -[CIContextImpl abort]
[4]    abort
> Argument required (one or more choice numbers).
Breakpoint 1 at 0x100156fcf: file sysdep.c, line 859.

So commands such as xbt, xtype and pgrowx not working properly. The rest
is as attached. The portion of the line from it2.current should show:

from distutils.core import setup, Extension 

[debug.log (text/plain, attachment)]
[Message part 3 (text/plain, inline)]
> Second, I need to see some of the variables involved in this:
>
>  (gdb) p start_pos
>  (gdb) p it2.vpos
>  (gdb) p it2.current
>  (gdb) p it2.string
>  (gdb) xtype
>  (gdb) p it2.method
>
> Finally, can you describe what should be displayed on the portion of
> the screen that is around the character position (shown by "p it2.current"
> above) where Emacs loops?  The following command should display
> detailed information about the screen line that includes the above buffer
> position:
>
>  (gdb) pgrowx (it2.w->desired_matrix->rows+N)
>
> where N is the zero-based number of the screen line.  If you cannot
> easily figure out the value of N, try the above command for successive
> values starting from zero, until you see the first screen line that is
> not displayed.
>
> Thanks.

Thanks.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Mon, 07 May 2012 17:30:02 GMT) Full text and rfc822 format available.

Message #17 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Mon, 07 May 2012 20:25:05 +0300
> From:  Leo <sdl.web <at> gmail.com>
> Cc: 11417 <at> debbugs.gnu.org
> Date: Tue, 08 May 2012 00:17:14 +0800
> 
> I run gdb in emacs/src and attach to the process that is hanging. Then
> source .gdbinit and I got:
> 
> DISPLAY = /tmp/launch-VtT4mU/org.x:0
> TERM = xterm-color
> [0] cancel
> [1] all
> 
> Non-debugging symbols:
> [2]    -[CIContext abort]
> [3]    -[CIContextImpl abort]
> [4]    abort
> > Argument required (one or more choice numbers).

You should type 1 or 4 at this point.  If that doesn't help, simply
delete the offending line, viz.

    break abort

> So commands such as xbt, xtype and pgrowx not working properly.

Too bad, I really need to see the glyph row that corresponds to the
problematic screen line, and perhaps the one before and after it
(that's what the pgrowx command does).  Please see if you can provide
that information, after you succeed in reading .gdbinit.

> The rest is as attached. The portion of the line from it2.current
> should show:
> 
> from distutils.core import setup, Extension 

Which part(s) of this come from an overlay string?  This info:

> (gdb) p it2.current
> $7 = {
>   pos = {
>     charpos = 411, 
>     bytepos = 411
>   }, 
>   overlay_string_index = 0, 
>   string_pos = {
>     charpos = 1, 
>     bytepos = 1
>   }, 
>   dpvec_index = -1
> }
> (gdb) p it2.method
> $9 = GET_FROM_STRING

indicates that it2 bumped into a string while iterating over the
buffer.  Once the x* commands work for you, you can display that
string as follows:

  (gdb) p it2.string
  (gdb) xstring

I need to know at which buffer positions there are overlay strings in
the offending line and in its neighbors.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Mon, 07 May 2012 18:42:02 GMT) Full text and rfc822 format available.

Message #20 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 08 May 2012 02:39:21 +0800
[Message part 1 (text/plain, inline)]
On 2012-05-08 01:25 +0800, Eli Zaretskii wrote:
> You should type 1 or 4 at this point.  If that doesn't help, simply
> delete the offending line, viz.
>
>     break abort

That worked. Please see the new log attached. Thanks.

[debug2.log (text/plain, inline)]
(gdb) bt
#0  move_it_vertically_backward (it=0x7fff5fbfce20, dy=0) at xdisp.c:8804
#1  0x00000001000409ad in move_it_by_lines (it=0x7fff5fbfce20, dvpos=0) at xdisp.c:8985
#2  0x00000001001a0ce7 in Fvertical_motion (lines=0, window=4305481917) at indent.c:2087
#3  0x000000010009ddb8 in window_scroll_line_based (window=4305481917, n=27, whole=1, noerror=0) at window.c:4667
#4  0x000000010009c251 in window_scroll (window=4305481917, n=1, whole=1, noerror=0) at window.c:4204
#5  0x000000010009e138 in scroll_command (n=4320145466, direction=1) at window.c:4758
#6  0x000000010009e1ff in Fscroll_up (arg=4320145466) at window.c:4779
#7  0x0000000100204987 in Ffuncall (nargs=2, args=0x7fff5fbfde90) at eval.c:3002
#8  0x0000000100272e01 in exec_byte_code (bytestr=4299304921, vector=4299304957, maxdepth=12, args_template=4320145466, nargs=0, args=0x0) at bytecode.c:785
#9  0x0000000100205868 in funcall_lambda (fun=4299304861, nargs=1, arg_vector=0x7fff5fbfe528) at eval.c:3233
#10 0x0000000100204d89 in Ffuncall (nargs=2, args=0x7fff5fbfe520) at eval.c:3051
#11 0x00000001001fc548 in Fcall_interactively (function=4320366570, record_flag=4320145466, keys=4305468733) at callint.c:852
#12 0x0000000100204a0b in Ffuncall (nargs=4, args=0x7fff5fbfead8) at eval.c:3009
#13 0x0000000100203e39 in call3 (fn=4320271882, arg1=4320366570, arg2=4320145466, arg3=4320145466) at eval.c:2802
#14 0x00000001001433a9 in Fcommand_execute (cmd=4320366570, record_flag=4320145466, keys=4320145466, special=4320145466) at keyboard.c:10451
#15 0x000000010012adf5 in command_loop_1 () at keyboard.c:1620
#16 0x0000000100200155 in internal_condition_case (bfun=0x10012a300 <command_loop_1>, handlers=4320201674, hfun=0x100129800 <cmd_error>) at eval.c:1515
#17 0x0000000100129df8 in command_loop_2 (ignore=4320145466) at keyboard.c:1189
#18 0x00000001001ff985 in internal_catch (tag=4320197690, func=0x100129dc0 <command_loop_2>, arg=4320145466) at eval.c:1272
#19 0x0000000100129d77 in command_loop () at keyboard.c:1159
#20 0x0000000100129189 in recursive_edit_1 () at keyboard.c:766
#21 0x00000001001293d0 in Frecursive_edit () at keyboard.c:830
#22 0x0000000100126c78 in main (argc=3, argv=0x7fff5fbff638) at emacs.c:1739

Lisp Backtrace:
"scroll-up" (0x5fbfde98)
"scroll-up-command" (0x5fbfe528)
"call-interactively" (0x5fbfeae0)
(gdb) xbacktrace 
"scroll-up" (0x5fbfde98)
"scroll-up-command" (0x5fbfe528)
"call-interactively" (0x5fbfeae0)
(gdb) p start_pos
$5 = 411
(gdb) p it2.vpos
$6 = 0
(gdb) p it2.current
$7 = {
  pos = {
    charpos = 411, 
    bytepos = 411
  }, 
  overlay_string_index = 0, 
  string_pos = {
    charpos = 1, 
    bytepos = 1
  }, 
  dpvec_index = -1
}
(gdb) p it2.string
$8 = 4334539281
(gdb) xstring
$9 = (struct Lisp_String *) 0x1025bd210
"!"
(gdb) xtype 
Argument to arithmetic operation not a number or boolean.
(gdb) p it2.method
$10 = GET_FROM_STRING
(gdb) pgrowx (it2.w->desired_matrix->rows+16)
TEXT: 114 glyphs
  0    0: CHAR[ ] pos=380 blev=0,btyp=L w=1 a+d=0+0
  1    1: CHAR[ ] pos=381 blev=0,btyp=L w=1 a+d=0+0
  2    2: CHAR[ ] pos=382 blev=0,btyp=L w=1 a+d=0+0
  3    3: CHAR[ ] pos=383 blev=0,btyp=L w=1 a+d=0+0
  4    4: CHAR[h] pos=384 blev=0,btyp=L w=1 a+d=0+0
  5    5: CHAR[a] pos=385 blev=0,btyp=L w=1 a+d=0+0
  6    6: CHAR[s] pos=386 blev=0,btyp=L w=1 a+d=0+0
  7    7: CHAR[_] pos=387 blev=0,btyp=L w=1 a+d=0+0
  8    8: CHAR[s] pos=388 blev=0,btyp=L w=1 a+d=0+0
  9    9: CHAR[e] pos=389 blev=0,btyp=L w=1 a+d=0+0
 10   10: CHAR[t] pos=390 blev=0,btyp=L w=1 a+d=0+0
 11   11: CHAR[u] pos=391 blev=0,btyp=L w=1 a+d=0+0
 12   12: CHAR[p] pos=392 blev=0,btyp=L w=1 a+d=0+0
 13   13: CHAR[t] pos=393 blev=0,btyp=L w=1 a+d=0+0
 14   14: CHAR[o] pos=394 blev=0,btyp=L w=1 a+d=0+0
 15   15: CHAR[o] pos=395 blev=0,btyp=L w=1 a+d=0+0
 16   16: CHAR[l] pos=396 blev=0,btyp=L w=1 a+d=0+0
 17   17: CHAR[s] pos=397 blev=0,btyp=L w=1 a+d=0+0
 18   18: CHAR[ ] pos=398 blev=0,btyp=L w=1 a+d=0+0
 19   19: CHAR[=] pos=399 blev=0,btyp=L w=1 a+d=0+0
 20   20: CHAR[ ] pos=400 blev=0,btyp=L w=1 a+d=0+0
 21   21: CHAR[F] pos=401 blev=0,btyp=L w=1 a+d=0+0 face=13
 22   22: CHAR[a] pos=402 blev=0,btyp=L w=1 a+d=0+0 face=13
 23   23: CHAR[l] pos=403 blev=0,btyp=L w=1 a+d=0+0 face=13
 24   24: CHAR[s] pos=404 blev=0,btyp=L w=1 a+d=0+0 face=13
 25   25: CHAR[e] pos=405 blev=0,btyp=L w=1 a+d=0+0 face=13
 26   26: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 27   27: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 28   28: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 29   29: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 30   30: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 31   31: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 32   32: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 33   33: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 34   34: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 35   35: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 36   36: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 37   37: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 38   38: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 39   39: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 40   40: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 41   41: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 42   42: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 43   43: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 44   44: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 45   45: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 46   46: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 47   47: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 48   48: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 49   49: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 50   50: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 51   51: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 52   52: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 53   53: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 54   54: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 55   55: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 56   56: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 57   57: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 58   58: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 59   59: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 60   60: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 61   61: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 62   62: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 63   63: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 64   64: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 65   65: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 66   66: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 67   67: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 68   68: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 69   69: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 70   70: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 71   71: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 72   72: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 73   73: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 74   74: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 75   75: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 76   76: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 77   77: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 78   78: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 79   79: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 80   80: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 81   81: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 82   82: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 83   83: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 84   84: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 85   85: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 86   86: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 87   87: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 88   88: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 89   89: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 90   90: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 91   91: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 92   92: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 93   93: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 94   94: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 95   95: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 96   96: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 97   97: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 98   98: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 99   99: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
100  100: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
101  101: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
102  102: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
103  103: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
104  104: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
105  105: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
106  106: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
107  107: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
108  108: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
109  109: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
110  110: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
111  111: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
112  112: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
113  113: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
(gdb) pgrowx (it2.w->desired_matrix->rows+17)
TEXT: 114 glyphs
  0    0: CHAR[ ] pos=407 blev=0,btyp=L w=1 a+d=0+0
  1    1: CHAR[ ] pos=408 blev=0,btyp=L w=1 a+d=0+0
  2    2: CHAR[ ] pos=409 blev=0,btyp=L w=1 a+d=0+0
  3    3: CHAR[ ] pos=410 blev=0,btyp=L w=1 a+d=0+0
  4    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  5    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  6    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  7    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  8    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  9    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 10    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 11    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 12    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 13    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 14    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 15    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 16    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 17    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 18    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 19    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 20    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 21    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 22    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 23    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 24    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 25    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 26    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 27    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 28    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 29    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 30    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 31    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 32    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 33    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 34    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 35    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 36    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 37    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 38    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 39    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 40    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 41    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 42    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 43    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 44    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 45    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 46    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 47    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 48    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 49    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 50    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 51    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 52    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 53    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 54    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 55    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 56    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 57    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 58    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 59    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 60    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 61    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 62    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 63    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 64    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 65    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 66    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 67    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 68    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 69    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 70    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 71    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 72    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 73    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 74    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 75    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 76    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 77    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 78    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 79    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 80    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 81    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 82    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 83    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 84    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 85    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 86    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 87    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 88    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 89    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 90    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 91    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 92    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 93    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 94    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 95    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 96    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 97    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 98    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 99    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
100    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
101    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
102    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
103    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
104    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
105    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
106    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
107    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
108    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
109    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
110    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
111    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
112    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
113    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
(gdb) pgrowx (it2.w->desired_matrix->rows+18)
TEXT: 114 glyphs
  0    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  1    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  2    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  3    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  4    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  5    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  6    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  7    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  8    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  9    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 10    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 11    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 12    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 13    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 14    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 15    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 16    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 17    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 18    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 19    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 20    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 21    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 22    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 23    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 24    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 25    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 26    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 27    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 28    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 29    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 30    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 31    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 32    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 33    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 34    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 35    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 36    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 37    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 38    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 39    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 40    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 41    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 42    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 43    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 44    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 45    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 46    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 47    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 48    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 49    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 50    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 51    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 52    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 53    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 54    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 55    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 56    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 57    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 58    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 59    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 60    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 61    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 62    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 63    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 64    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 65    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 66    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 67    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 68    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 69    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 70    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 71    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 72    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 73    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 74    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 75    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 76    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 77    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 78    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 79    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 80    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 81    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 82    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 83    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 84    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 85    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 86    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 87    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 88    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 89    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 90    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 91    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 92    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 93    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 94    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 95    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 96    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 97    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 98    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 99    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
100    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
101    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
102    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
103    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
104    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
105    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
106    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
107    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
108    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
109    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
110    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
111    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
112    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
113    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
(gdb) 

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Mon, 07 May 2012 19:26:02 GMT) Full text and rfc822 format available.

Message #23 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Mon, 07 May 2012 22:21:13 +0300
> From:  Leo <sdl.web <at> gmail.com>
> Cc: 11417 <at> debbugs.gnu.org
> Date: Tue, 08 May 2012 02:39:21 +0800
> 
> That worked. Please see the new log attached. Thanks.

Thanks.

Hmm...  Something doesn't fit here.  The text in the desired_matrix is
different from what you said it should be.  And there's no overlay
string anywhere in sight.  Perhaps the desired matrix is not up to
date.  Can you try the same with current_matrix?  That is

  pgrowx (it2.w->current_matrix->rows+16)

etc.

Btw, is position 411 end of buffer, by any chance?

It looks more and more like I will need a reproducible test case to
debug this...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Mon, 07 May 2012 19:46:01 GMT) Full text and rfc822 format available.

Message #26 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 08 May 2012 03:42:37 +0800
On 2012-05-08 03:21 +0800, Eli Zaretskii wrote:
> Hmm...  Something doesn't fit here.  The text in the desired_matrix is
> different from what you said it should be.  And there's no overlay
> string anywhere in sight.  Perhaps the desired matrix is not up to
> date.  Can you try the same with current_matrix?  That is
>
>   pgrowx (it2.w->current_matrix->rows+16)
>
> etc.

(gdb)   pgrowx (it2.w->current_matrix->rows+16)
TEXT: 114 glyphs
  0    0: CHAR[ ] pos=380 blev=0,btyp=L w=1 a+d=0+0
  1    1: CHAR[ ] pos=381 blev=0,btyp=L w=1 a+d=0+0
  2    2: CHAR[ ] pos=382 blev=0,btyp=L w=1 a+d=0+0
  3    3: CHAR[ ] pos=383 blev=0,btyp=L w=1 a+d=0+0
  4    4: CHAR[h] pos=384 blev=0,btyp=L w=1 a+d=0+0
  5    5: CHAR[a] pos=385 blev=0,btyp=L w=1 a+d=0+0
  6    6: CHAR[s] pos=386 blev=0,btyp=L w=1 a+d=0+0
  7    7: CHAR[_] pos=387 blev=0,btyp=L w=1 a+d=0+0
  8    8: CHAR[s] pos=388 blev=0,btyp=L w=1 a+d=0+0
  9    9: CHAR[e] pos=389 blev=0,btyp=L w=1 a+d=0+0
 10   10: CHAR[t] pos=390 blev=0,btyp=L w=1 a+d=0+0
 11   11: CHAR[u] pos=391 blev=0,btyp=L w=1 a+d=0+0
 12   12: CHAR[p] pos=392 blev=0,btyp=L w=1 a+d=0+0
 13   13: CHAR[t] pos=393 blev=0,btyp=L w=1 a+d=0+0
 14   14: CHAR[o] pos=394 blev=0,btyp=L w=1 a+d=0+0
 15   15: CHAR[o] pos=395 blev=0,btyp=L w=1 a+d=0+0
 16   16: CHAR[l] pos=396 blev=0,btyp=L w=1 a+d=0+0
 17   17: CHAR[s] pos=397 blev=0,btyp=L w=1 a+d=0+0
 18   18: CHAR[ ] pos=398 blev=0,btyp=L w=1 a+d=0+0
 19   19: CHAR[=] pos=399 blev=0,btyp=L w=1 a+d=0+0
 20   20: CHAR[ ] pos=400 blev=0,btyp=L w=1 a+d=0+0
 21   21: CHAR[F] pos=401 blev=0,btyp=L w=1 a+d=0+0 face=13
 22   22: CHAR[a] pos=402 blev=0,btyp=L w=1 a+d=0+0 face=13
 23   23: CHAR[l] pos=403 blev=0,btyp=L w=1 a+d=0+0 face=13
 24   24: CHAR[s] pos=404 blev=0,btyp=L w=1 a+d=0+0 face=13
 25   25: CHAR[e] pos=405 blev=0,btyp=L w=1 a+d=0+0 face=13
 26   26: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 27   27: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 28   28: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 29   29: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 30   30: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 31   31: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 32   32: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 33   33: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 34   34: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 35   35: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 36   36: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 37   37: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 38   38: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 39   39: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 40   40: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 41   41: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 42   42: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 43   43: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 44   44: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 45   45: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 46   46: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 47   47: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 48   48: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 49   49: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 50   50: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 51   51: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 52   52: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 53   53: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 54   54: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 55   55: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 56   56: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 57   57: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 58   58: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 59   59: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 60   60: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 61   61: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 62   62: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 63   63: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 64   64: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 65   65: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 66   66: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 67   67: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 68   68: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 69   69: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 70   70: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 71   71: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 72   72: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 73   73: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 74   74: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 75   75: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 76   76: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 77   77: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 78   78: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 79   79: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 80   80: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 81   81: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 82   82: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 83   83: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 84   84: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 85   85: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 86   86: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 87   87: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 88   88: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 89   89: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 90   90: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 91   91: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 92   92: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 93   93: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 94   94: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 95   95: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 96   96: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 97   97: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 98   98: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
 99   99: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
100  100: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
101  101: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
102  102: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
103  103: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
104  104: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
105  105: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
106  106: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
107  107: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
108  108: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
109  109: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
110  110: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
111  111: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
112  112: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
113  113: CHAR[ ] pos=0 blev=0,btyp=B w=1 a+d=0+0
(gdb)   pgrowx (it2.w->current_matrix->rows+17)
TEXT: 114 glyphs
  0    0: CHAR[ ] pos=407 blev=0,btyp=L w=1 a+d=0+0
  1    1: CHAR[ ] pos=408 blev=0,btyp=L w=1 a+d=0+0
  2    2: CHAR[ ] pos=409 blev=0,btyp=L w=1 a+d=0+0
  3    3: CHAR[ ] pos=410 blev=0,btyp=L w=1 a+d=0+0
  4    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  5    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  6    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  7    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  8    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  9    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 10    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 11    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 12    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 13    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 14    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 15    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 16    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 17    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 18    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 19    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 20    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 21    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 22    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 23    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 24    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 25    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 26    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 27    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 28    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 29    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 30    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 31    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 32    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 33    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 34    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 35    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 36    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 37    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 38    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 39    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 40    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 41    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 42    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 43    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 44    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 45    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 46    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 47    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 48    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 49    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 50    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 51    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 52    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 53    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 54    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 55    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 56    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 57    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 58    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 59    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 60    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 61    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 62    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 63    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 64    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 65    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 66    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 67    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 68    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 69    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 70    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 71    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 72    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 73    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 74    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 75    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 76    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 77    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 78    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 79    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 80    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 81    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 82    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 83    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 84    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 85    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 86    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 87    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 88    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 89    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 90    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 91    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 92    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 93    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 94    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 95    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 96    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 97    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 98    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 99    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
100    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
101    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
102    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
103    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
104    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
105    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
106    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
107    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
108    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
109    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
110    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
111    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
112    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
113    4: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
(gdb)   pgrowx (it2.w->current_matrix->rows+18)
TEXT: 114 glyphs
  0    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  1    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  2    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  3    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  4    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  5    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  6    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  7    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  8    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
  9    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 10    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 11    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 12    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 13    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 14    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 15    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 16    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 17    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 18    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 19    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 20    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 21    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 22    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 23    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 24    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 25    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 26    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 27    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 28    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 29    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 30    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 31    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 32    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 33    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 34    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 35    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 36    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 37    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 38    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 39    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 40    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 41    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 42    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 43    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 44    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 45    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 46    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 47    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 48    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 49    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 50    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 51    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 52    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 53    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 54    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 55    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 56    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 57    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 58    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 59    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 60    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 61    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 62    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 63    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 64    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 65    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 66    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 67    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 68    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 69    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 70    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 71    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 72    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 73    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 74    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 75    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 76    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 77    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 78    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 79    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 80    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 81    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 82    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 83    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 84    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 85    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 86    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 87    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 88    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 89    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 90    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 91    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 92    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 93    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 94    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 95    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 96    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 97    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 98    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
 99    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
100    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
101    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
102    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
103    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
104    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
105    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
106    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
107    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
108    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
109    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
110    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
111    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
112    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
113    0: CHAR[ ] pos=-1 blev=0,btyp=UNDEF w=0 a+d=0+0
(gdb) 

>
> Btw, is position 411 end of buffer, by any chance?

No 411 is not the end of buffer. (point-max) returns 6251.

> It looks more and more like I will need a reproducible test case to
> debug this...

It will take some time to get a reproducible case, which I'll try in a
few days.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Tue, 08 May 2012 03:40:01 GMT) Full text and rfc822 format available.

Message #29 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 08 May 2012 11:37:10 +0800
I also am puzzled by where the display string "!" causing the problem
comes from.  The only appearance of a "!" in Flymake is applied to the
mode-line, not as a display string within the buffer text.  Neither
Flymake nor Python mode seem to use overlay display strings.

Do you have any idea what "!" is used for in your buffer?

Could you check the value of it->object, it->n_overlay_strings, and
it->overlay_strings[0]?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Tue, 08 May 2012 17:31:01 GMT) Full text and rfc822 format available.

Message #32 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> gnu.org>
Cc: sdl.web <at> gmail.com, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 08 May 2012 20:26:40 +0300
> From: Chong Yidong <cyd <at> gnu.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  11417 <at> debbugs.gnu.org
> Date: Tue, 08 May 2012 11:37:10 +0800
> 
> I also am puzzled by where the display string "!" causing the problem
> comes from.  The only appearance of a "!" in Flymake is applied to the
> mode-line, not as a display string within the buffer text.  Neither
> Flymake nor Python mode seem to use overlay display strings.
> 
> Do you have any idea what "!" is used for in your buffer?
> 
> Could you check the value of it->object, it->n_overlay_strings, and
> it->overlay_strings[0]?

I think Leo's time and energy will be better spent looking for a
reproducible test case.  Then debugging will be much more efficient.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Thu, 10 May 2012 09:19:01 GMT) Full text and rfc822 format available.

Message #35 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Chong Yidong <cyd <at> gnu.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Thu, 10 May 2012 17:15:40 +0800
[Message part 1 (text/plain, inline)]
On 2012-05-08 11:37 +0800, Chong Yidong wrote:
> I also am puzzled by where the display string "!" causing the problem
> comes from.  The only appearance of a "!" in Flymake is applied to the
> mode-line, not as a display string within the buffer text.  Neither
> Flymake nor Python mode seem to use overlay display strings.
>
> Do you have any idea what "!" is used for in your buffer?

Just realised this was triggered by me patching flymake to support
fringe indicator.

> Could you check the value of it->object, it->n_overlay_strings, and
> it->overlay_strings[0]?

On 2012-05-09 01:26 +0800, Eli Zaretskii wrote:
> I think Leo's time and energy will be better spent looking for a
> reproducible test case.  Then debugging will be much more efficient.

OK, I have prepared a test case. It requires python and the package
pyflakes¹ which is used by flymake. Normally one can install pyflakes by
using:

    pip install pyflakes
OR
    easy_install pyflakes

in a terminal.

Decompress the attached tar ball and go into the directory 11417/ in a
terminal and launch emacs like this:

 emacs -nw -q -L . -l bug.el setup.py

You should see a buffer with contents partially displayed. Move around
in that buffer by typing C-v, M-v, C-n or C-p until it freezes (it
usually takes me no more than 3 key strokes).

Footnotes: 
¹  http://pypi.python.org/pypi/pyflakes/0.5.0
[11417.tgz (application/x-gtar, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Thu, 10 May 2012 17:46:01 GMT) Full text and rfc822 format available.

Message #38 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Thu, 10 May 2012 20:43:26 +0300
> From:  Leo <sdl.web <at> gmail.com>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 11417 <at> debbugs.gnu.org
> Date: Thu, 10 May 2012 17:15:40 +0800
> 
> 
> [1:text/plain Hide]
> 
> On 2012-05-08 11:37 +0800, Chong Yidong wrote:
> > I also am puzzled by where the display string "!" causing the problem
> > comes from.  The only appearance of a "!" in Flymake is applied to the
> > mode-line, not as a display string within the buffer text.  Neither
> > Flymake nor Python mode seem to use overlay display strings.
> >
> > Do you have any idea what "!" is used for in your buffer?
> 
> Just realised this was triggered by me patching flymake to support
> fringe indicator.

That was the crucial missing link in this mystery.

> OK, I have prepared a test case. It requires python and the package
> pyflakes¹ which is used by flymake. Normally one can install pyflakes by
> using:
> 
>     pip install pyflakes
> OR
>     easy_install pyflakes
> 
> in a terminal.
> 
> Decompress the attached tar ball and go into the directory 11417/ in a
> terminal and launch emacs like this:
> 
>  emacs -nw -q -L . -l bug.el setup.py
> 
> You should see a buffer with contents partially displayed. Move around
> in that buffer by typing C-v, M-v, C-n or C-p until it freezes (it
> usually takes me no more than 3 key strokes).

Thanks.  Now that I know how you patched flymake, I can reproduce this
with a much simpler recipe:

  emacs -Q -nw
  C-x C-f xdisp.c RET
  M-: (let ((ov (make-overlay 4928 4933 nil t t)) (fringe (propertize "!" 'display (list 'left-fringe 'question-mark)))) (overlay-put ov 'before-string fringe)) RET

(The last one is a single long line to type into the minibuffer.)

Redisplay only shows part of the screen after that, but Emacs doesn't
yet infloop.  Move a cursor a bit, and it will.

Of course, the choice of the file (xdisp.c) and the position where to
put the overlay are arbitrary.

This only happens in 'emacs -nw", a GUI session (which can actually
display the fringe bitmap) doesn't have any problems with this recipe.

I will work on fixing this.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Thu, 10 May 2012 18:29:01 GMT) Full text and rfc822 format available.

Message #41 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sdl.web <at> gmail.com, cyd <at> gnu.org
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Thu, 10 May 2012 21:26:09 +0300
> Date: Thu, 10 May 2012 20:43:26 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
> 
>   emacs -Q -nw
>   C-x C-f xdisp.c RET
>   M-: (let ((ov (make-overlay 4928 4933 nil t t)) (fringe (propertize "!" 'display (list 'left-fringe 'question-mark)))) (overlay-put ov 'before-string fringe)) RET
> 
> (The last one is a single long line to type into the minibuffer.)
> 
> Redisplay only shows part of the screen after that, but Emacs doesn't
> yet infloop.  Move a cursor a bit, and it will.

This happens in Emacs 23.4 as well.  But I don't think we can release
Emacs 24.1 with this infinite loop.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Fri, 11 May 2012 10:01:01 GMT) Full text and rfc822 format available.

Message #44 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Fri, 11 May 2012 18:00:23 +0800
On 2012-05-11 02:26 +0800, Eli Zaretskii wrote:
> This happens in Emacs 23.4 as well.  But I don't think we can release
> Emacs 24.1 with this infinite loop.

Thank you for pinning down the bug. I surely hope the bug is fixed for
the upcoming release.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sat, 12 May 2012 10:44:02 GMT) Full text and rfc822 format available.

Message #47 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: sdl.web <at> gmail.com, cyd <at> gnu.org
Cc: 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sat, 12 May 2012 13:45:05 +0300
> Date: Thu, 10 May 2012 20:43:26 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
> 
>   emacs -Q -nw
>   C-x C-f xdisp.c RET
>   M-: (let ((ov (make-overlay 4928 4933 nil t t)) (fringe (propertize "!" 'display (list 'left-fringe 'question-mark)))) (overlay-put ov 'before-string fringe)) RET
> 
> (The last one is a single long line to type into the minibuffer.)
> 
> Redisplay only shows part of the screen after that, but Emacs doesn't
> yet infloop.  Move a cursor a bit, and it will.
> 
> Of course, the choice of the file (xdisp.c) and the position where to
> put the overlay are arbitrary.
> 
> This only happens in 'emacs -nw", a GUI session (which can actually
> display the fringe bitmap) doesn't have any problems with this recipe.
> 
> I will work on fixing this.

The immediate cause of this bug is that the display iterator would
return zero at the end of the overlay string, and the display engine
would take that as a sign that it is done with redisplay, instead of
popping the stack and continuing to display the rest.

Unfortunately, fixing this and a couple of other blunders exposed by
the fix requires changes in places that are heavily used by the
display engine, and are not limited to left-fringe/right-fringe
display specs on a TTY alone.  See the diffs below.  They seem quite
simple, almost no-brainers, to me, but I've been wrong before when the
innermost bowels of the display engine are concerned.

So I'm not sure whether to apply this to the emacs-24 branch or the
trunk.  Here are the pros and cons for applying to the branch:

 . Pros:
   . The changes are by themselves quite simple.
   . They fix a number of problems that could bite us in other use cases:
     . the fact that left-fringe/right-fringe display property was
       incorrectly reported to the rest of the code as non-replacing,
       whereas in fact it was (the underlying text is not displayed);
     . incorrect condition in iterate_out_of_display_property for
       determining whether we are iterating a string or a buffer;
     . improper termination of display when there's more stuff on the
       iterator stack;
     . call to get_overlay_strings_1 without a check that we already
       have overlay strings loaded.

 . Cons:
   . This problem existed since v22.1, where left-fringe/right-fringe
     was first introduced.
   . Features that display bitmaps on the fringe generally need to
     treat the TTY case specially anyway.  This bug was exposed
     because Leo's code didn't.
   . Some of the changes touch very sensitive parts of the display
     engine on its lowest level: the iteration itself.
   . Prudence would suggest another pretest, should these changes be
     applied to the branch.

So I will await decision by Stefan and Chong before committing this.
In the meantime, Leo, please see that this fixes your problem, and
doesn't introduce any new ones.  TIA.

Here are the changes:

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2012-05-11 14:05:06 +0000
+++ src/xdisp.c	2012-05-12 10:03:08 +0000
@@ -839,6 +839,7 @@ static int try_cursor_movement (Lisp_Obj
 static int trailing_whitespace_p (EMACS_INT);
 static intmax_t message_log_check_duplicate (EMACS_INT, EMACS_INT);
 static void push_it (struct it *, struct text_pos *);
+static void iterate_out_of_display_property (struct it *);
 static void pop_it (struct it *);
 static void sync_frame_with_window_matrix_rows (struct window *);
 static void select_frame_for_redisplay (Lisp_Object);
@@ -3125,7 +3126,15 @@ handle_stop (struct it *it)
 		 overlays even if the actual buffer text is replaced.  */
 	      if (!handle_overlay_change_p
 		  || it->sp > 1
-		  || !get_overlay_strings_1 (it, 0, 0))
+		  /* Don't call get_overlay_strings_1 if we already
+		     have overlay strings loaded, because doing so
+		     will load them again and push the iterator state
+		     onto the stack one more time, which is not
+		     expected by the rest of the code that processes
+		     overlay strings.  */
+		  || (it->n_overlay_strings <= 0
+		      ? !get_overlay_strings_1 (it, 0, 0)
+		      : 0))
 		{
 		  if (it->ellipsis_p)
 		    setup_for_ellipsis (it, 0);
@@ -4681,7 +4690,19 @@ handle_single_display_spec (struct it *i
 	  if (!FRAME_WINDOW_P (it->f))
 	    /* If we return here, POSITION has been advanced
 	       across the text with this property.  */
-	    return 1;
+	    {
+	      /* Synchronize the bidi iterator with POSITION.  This is
+		 needed because we are not going to push the iterator
+		 on behalf of this display property, so there will be
+		 no pop_it call to do this synchronization for us.  */
+	      if (it->bidi_p)
+		{
+		  it->position = *position;
+		  iterate_out_of_display_property (it);
+		  *position = it->position;
+		}
+	      return 1;
+	    }
 	}
       else if (!frame_window_p)
 	return 1;
@@ -4692,7 +4713,15 @@ handle_single_display_spec (struct it *i
 	  || !(fringe_bitmap = lookup_fringe_bitmap (value)))
 	/* If we return here, POSITION has been advanced
 	   across the text with this property.  */
-	return 1;
+	{
+	  if (it && it->bidi_p)
+	    {
+	      it->position = *position;
+	      iterate_out_of_display_property (it);
+	      *position = it->position;
+	    }
+	  return 1;
+	}
 
       if (it)
 	{
@@ -5611,7 +5640,7 @@ push_it (struct it *it, struct text_pos 
 static void
 iterate_out_of_display_property (struct it *it)
 {
-  int buffer_p = BUFFERP (it->object);
+  int buffer_p = !STRINGP (it->string);
   EMACS_INT eob = (buffer_p ? ZV : it->end_charpos);
   EMACS_INT bob = (buffer_p ? BEGV : 0);
 
@@ -6780,6 +6809,16 @@ get_next_display_element (struct it *it)
 	       && FACE_FROM_ID (it->f, face_id)->box == FACE_NO_BOX);
 	}
     }
+  /* If we reached the end of the object we've been iterating (e.g., a
+     display string or an overlay string), and there's something on
+     IT->stack, proceed with what's on the stack.  It doesn't make
+     sense to return zero if there's unprocessed stuff on the stack,
+     because otherwise that stuff will never be displayed.  */
+  if (!success_p && it->sp > 0)
+    {
+      set_iterator_to_next (it, 0);
+      success_p = get_next_display_element (it);
+    }
 
   /* Value is 0 if end of buffer or string reached.  */
   return success_p;
@@ -6961,7 +7000,7 @@ set_iterator_to_next (struct it *it, int
          display vector entry (these entries may contain faces).  */
       it->face_id = it->saved_face_id;
 
-      if (it->dpvec + it->current.dpvec_index == it->dpend)
+      if (it->dpvec + it->current.dpvec_index >= it->dpend)
 	{
 	  int recheck_faces = it->ellipsis_p;
 
@@ -6999,6 +7038,26 @@ set_iterator_to_next (struct it *it, int
     case GET_FROM_STRING:
       /* Current display element is a character from a Lisp string.  */
       xassert (it->s == NULL && STRINGP (it->string));
+      /* Don't advance past string end.  These conditions are true
+	 when set_iterator_to_next is called at the end of
+	 get_next_display_element, in which case the Lisp string is
+	 already exhausted, and all we want is pop the iterator
+	 stack.  */
+      if (it->current.overlay_string_index >= 0)
+	{
+	  /* This is an overlay string, so there's no padding with
+	     spaces, and the number of characters in the string is
+	     where the string ends.  */
+	  if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string))
+	    goto consider_string_end;
+	}
+      else
+	{
+	  /* Not an overlay string.  There could be padding, so test
+	     against it->end_charpos . */
+	  if (IT_STRING_CHARPOS (*it) >= it->end_charpos)
+	    goto consider_string_end;
+	}
       if (it->cmp_it.id >= 0)
 	{
 	  int i;





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 13 May 2012 01:35:01 GMT) Full text and rfc822 format available.

Message #50 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Chong Yidong <cyd <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: sdl.web <at> gmail.com, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sun, 13 May 2012 09:34:19 +0800
Eli Zaretskii <eliz <at> gnu.org> writes:

> So I will await decision by Stefan and Chong before committing this.
> In the meantime, Leo, please see that this fixes your problem, and
> doesn't introduce any new ones.  TIA.

Please go ahead and install in emacs-24.  I will make another pretest.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 13 May 2012 08:56:02 GMT) Full text and rfc822 format available.

Message #53 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sun, 13 May 2012 16:54:56 +0800
On 2012-05-12 18:45 +0800, Eli Zaretskii wrote:
> So I will await decision by Stefan and Chong before committing this.
> In the meantime, Leo, please see that this fixes your problem, and
> doesn't introduce any new ones.  TIA.

Eli, much appreciated for working out the fix. The patch doesn't apply
cleanly on my tree so I'll wait until it is installed and do the test
ASAP.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 13 May 2012 15:37:02 GMT) Full text and rfc822 format available.

Message #56 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Chong Yidong <cyd <at> gnu.org>
Cc: sdl.web <at> gmail.com, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sun, 13 May 2012 18:37:31 +0300
> From: Chong Yidong <cyd <at> gnu.org>
> Cc: sdl.web <at> gmail.com,  11417 <at> debbugs.gnu.org
> Date: Sun, 13 May 2012 09:34:19 +0800
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > So I will await decision by Stefan and Chong before committing this.
> > In the meantime, Leo, please see that this fixes your problem, and
> > doesn't introduce any new ones.  TIA.
> 
> Please go ahead and install in emacs-24.

Done (revision 107993 on the emacs-24 branch).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Sun, 13 May 2012 15:37:02 GMT) Full text and rfc822 format available.

Message #59 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Sun, 13 May 2012 18:38:04 +0300
> From:  Leo <sdl.web <at> gmail.com>
> Cc: cyd <at> gnu.org,  11417 <at> debbugs.gnu.org
> Date: Sun, 13 May 2012 16:54:56 +0800
> 
> On 2012-05-12 18:45 +0800, Eli Zaretskii wrote:
> > So I will await decision by Stefan and Chong before committing this.
> > In the meantime, Leo, please see that this fixes your problem, and
> > doesn't introduce any new ones.  TIA.
> 
> Eli, much appreciated for working out the fix. The patch doesn't apply
> cleanly on my tree so I'll wait until it is installed and do the test
> ASAP.

You can update now.  I will keep the bug open until you test the fix.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#11417; Package emacs. (Tue, 15 May 2012 06:35:01 GMT) Full text and rfc822 format available.

Message #62 received at 11417 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: cyd <at> gnu.org, 11417 <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 15 May 2012 14:33:40 +0800
On 2012-05-13 23:38 +0800, Eli Zaretskii wrote:
> You can update now.  I will keep the bug open until you test the fix.
>
> Thanks.

I think the bug is fixed. Thank you very much.

Leo




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Tue, 15 May 2012 15:57:02 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Tue, 15 May 2012 15:57:02 GMT) Full text and rfc822 format available.

Message #67 received at 11417-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Leo <sdl.web <at> gmail.com>
Cc: cyd <at> gnu.org, 11417-done <at> debbugs.gnu.org
Subject: Re: bug#11417: 24.0.96; infinite looping in xdisp.c
Date: Tue, 15 May 2012 18:57:57 +0300
> From: Leo <sdl.web <at> gmail.com>
> Cc: 11417 <at> debbugs.gnu.org,  cyd <at> gnu.org
> Date: Tue, 15 May 2012 14:33:40 +0800
> 
> On 2012-05-13 23:38 +0800, Eli Zaretskii wrote:
> > You can update now.  I will keep the bug open until you test the fix.
> >
> > Thanks.
> 
> I think the bug is fixed. Thank you very much.

Thank you, closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Jun 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.