From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#11367: 24.0.95.1 Crash: Windows 7 using egg Date: Sun, 29 Apr 2012 20:30:31 +0300 Message-ID: <83397m78eg.fsf@gnu.org> References: <8362cj7fj4.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: dough.gmane.org 1335720722 15334 80.91.229.3 (29 Apr 2012 17:32:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2012 17:32:02 +0000 (UTC) Cc: 11367-done@debbugs.gnu.org To: michael@kleehammer.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Apr 29 19:32:01 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SOXya-0005ti-ER for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2012 19:32:00 +0200 Original-Received: from localhost ([::1]:49163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOXyZ-0001q5-Gi for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2012 13:31:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53394) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOXyW-0001pI-DY for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2012 13:31:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SOXyS-0004Yr-9u for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2012 13:31:55 -0400 Original-Received: from [140.186.70.43] (port=56949 helo=debbugs.gnu.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SOXyS-0004YH-71 for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2012 13:31:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SOXza-0004Ej-Kg for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2012 13:33:02 -0400 Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Apr 2012 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 11367 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 11367@debbugs.gnu.org, eliz@gnu.org Original-Received: via spool by 11367-done@debbugs.gnu.org id=D11367.133572074016235 (code D ref 11367); Sun, 29 Apr 2012 17:33:02 +0000 Original-Received: (at 11367-done) by debbugs.gnu.org; 29 Apr 2012 17:32:20 +0000 Original-Received: from localhost ([127.0.0.1]:57982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SOXyt-0004Dn-TP for submit@debbugs.gnu.org; Sun, 29 Apr 2012 13:32:20 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:61417) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SOXyq-0004Da-Qw for 11367-done@debbugs.gnu.org; Sun, 29 Apr 2012 13:32:18 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0M39003003B60R00@a-mtaout21.012.net.il> for 11367-done@debbugs.gnu.org; Sun, 29 Apr 2012 20:30:26 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.21.156]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0M390031X4MK3810@a-mtaout21.012.net.il>; Sun, 29 Apr 2012 20:30:21 +0300 (IDT) In-reply-to: <8362cj7fj4.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:59626 Archived-At: > Date: Sat, 28 Apr 2012 23:44:15 +0300 > From: Eli Zaretskii > Cc: 11367@debbugs.gnu.org >=20 > > From: Michael Kleehammer > > Date: Sat, 28 Apr 2012 14:27:00 -0500 > >=20 > > > I see I will need to install msysgit and debug this locally. = =A0Last > > > request: > > > > > > =A0(gdb) p (g-2)->object > >=20 > > $13 =3D 60228101 > >=20 > > > =A0(gdb) xtype > >=20 > > Lisp_Vectorlike > > PVEC_BUFFER > >=20 > > > =A0(gdb) p it3.object > >=20 > > $14 =3D 84618657 > >=20 > > > =A0(gdb) xtype > >=20 > > Lisp_String >=20 > Thanks. I've reproduced the problem, and will debug it (probably > tomorrow; gray hair says it's unwise to try fixing redisplay after > 11PM ;-). I think I fixed this (revision 107922 on the emacs-24 branch). The diffs are below, in case you want (and are able) to try them now. Thanks. =3D=3D=3D modified file 'src/ChangeLog' --- src/ChangeLog=092012-04-24 02:58:26 +0000 +++ src/ChangeLog=092012-04-29 17:19:08 +0000 @@ -1,3 +1,10 @@ +2012-04-29 Eli Zaretskii + +=09* xdisp.c (pos_visible_p): If already at a newline from the +=09display string before the 'while' loop, don't walk back the glyph= s +=09from it3.glyph_row. Solves assertion violation when the display +=09string begins with a newline (egg.el). (Bug#11367) + 2012-04-24 Chong Yidong =20 =09* xselect.c (x_convert_selection): Initialize a pointer (Bug#1131= 5). =3D=3D=3D modified file 'src/xdisp.c' --- src/xdisp.c=092012-04-23 16:22:23 +0000 +++ src/xdisp.c=092012-04-29 17:19:08 +0000 @@ -1375,6 +1375,7 @@ pos_visible_p (struct window *w, EMACS_I =09=09 Lisp_Object startpos, endpos; =09=09 EMACS_INT start, end; =09=09 struct it it3; +=09=09 int it3_moved; =20 =09=09 /* Find the first and the last buffer positions =09=09 covered by the display string. */ @@ -1431,6 +1432,15 @@ pos_visible_p (struct window *w, EMACS_I =09=09 begins. */ =09=09 start_display (&it3, w, top); =09=09 move_it_to (&it3, -1, 0, top_y, -1, MOVE_TO_X | MOVE_TO_Y); +=09=09 /* If it3_moved stays zero after the 'while' loop +=09=09 below, that means we already were at a newline +=09=09 before the loop (e.g., the display string begins +=09=09 with a newline), so we don't need to (and cannot) +=09=09 inspect the glyphs of it3.glyph_row, because +=09=09 PRODUCE_GLYPHS will not produce anything for a +=09=09 newline, and thus it3.glyph_row stays at its +=09=09 stale content it got at top of the window. */ +=09=09 it3_moved =3D 0; =09=09 /* Finally, advance the iterator until we hit the =09=09 first display element whose character position is =09=09 CHARPOS, or until the first newline from the @@ -1442,6 +1452,7 @@ pos_visible_p (struct window *w, EMACS_I =09=09 if (IT_CHARPOS (it3) =3D=3D charpos =09=09=09 || ITERATOR_AT_END_OF_LINE_P (&it3)) =09=09=09break; +=09=09 it3_moved =3D 1; =09=09 set_iterator_to_next (&it3, 0); =09=09 } =09=09 top_x =3D it3.current_x - it3.pixel_width; @@ -1452,7 +1463,8 @@ pos_visible_p (struct window *w, EMACS_I =09=09 display string, move back over the glyphs =09=09 produced from the string, until we find the =09=09 rightmost glyph not from the string. */ -=09=09 if (IT_CHARPOS (it3) !=3D charpos && EQ (it3.object, string)= ) +=09=09 if (it3_moved +=09=09 && IT_CHARPOS (it3) !=3D charpos && EQ (it3.object, stri= ng)) =09=09 { =09=09 struct glyph *g =3D it3.glyph_row->glyphs[TEXT_AREA] =09=09=09=09=09+ it3.glyph_row->used[TEXT_AREA];