GNU bug report logs - #9739
24.0.90; abort at find_row_edges xdisp.c:18714

Previous Next

Package: emacs;

Reported by: lihaitao <at> gmail.com

Date: Wed, 12 Oct 2011 17:28:02 UTC

Severity: important

Merged with 9738

Found in version 24.0.90

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

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Haitao Li <lihaitao <at> gmail.com>
Cc: 9739 <at> debbugs.gnu.org
Subject: Re: bug#9739: 24.0.90; abort at find_row_edges xdisp.c:18714
Date: Wed, 12 Oct 2011 22:16:16 +0200
> From: Haitao Li <lihaitao <at> gmail.com>
> Date: Thu, 13 Oct 2011 03:07:57 +0800
> Cc: 9739 <at> debbugs.gnu.org
> 
> BTW, I just found the crash first happened on this revision. It works
> okay on the version before that. (Sorry for not using bzr version
> number.)
> 
> commit 00d451f4f7f9b9fef08a36c9d61b6f803480d1ba
> Author: Eli Zaretskii
> Date:   Tue Sep 20 20:13:45 2011 +0300
> 
>    Fix bug #9549 with longlines-show-hard-newlines.
> 
>     src/xdisp.c (set_cursor_from_row): If the row ends in a newline from
>     a display string, extend search for cursor position to end of row.
>     (find_row_edges): If the row ends in a newline from a display
>     string, increment its MATRIX_ROW_END_CHARPOS by one.
>     Handle the case of a display string with multiple newlines.

Yes, the code that aborts was introduced in that revision.

I think I fixed the crash, please try the latest bzr.  Or apply the
patch below.

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2011-10-12 19:08:04 +0000
+++ src/ChangeLog	2011-10-12 20:07:59 +0000
@@ -1,3 +1,9 @@
+2011-10-12  Eli Zaretskii  <eliz <at> gnu.org>
+
+	* xdisp.c (find_row_edges): Handle the case where ROW comes from a
+	display string and the previous row comes from the same string and
+	is empty.  (Bug#9739)  (Bug#9738)
+
 2011-10-12  Stefan Monnier  <monnier <at> iro.umontreal.ca>
 
 	* doc.c (get_doc_string): Encode file name (bug#9735).

=== modified file 'src/xdisp.c'
--- src/xdisp.c	2011-10-12 15:12:52 +0000
+++ src/xdisp.c	2011-10-12 20:07:59 +0000
@@ -18646,7 +18646,12 @@ find_row_edges (struct it *it, struct gl
 		    seen_this_string = 1;
 		}
 	      else
-		abort ();
+		/* If all the glyphs of the previous row were inserted
+		   by redisplay, it means the previous row was
+		   produced from a single newline, which is only
+		   possible if that newline came from the same string
+		   as the one which produced this ROW.  */
+		seen_this_string = 1;
 	    }
 	  else
 	    {
@@ -18662,7 +18667,7 @@ find_row_edges (struct it *it, struct gl
 		    seen_this_string = 1;
 		}
 	      else
-		abort ();
+		seen_this_string = 1;
 	    }
 	}
       /* Take note of each display string that covers a newline only






This bug report was last modified 13 years and 228 days ago.

Previous Next


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