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#17281: 24.4.50; emacs hangs in next-line Date: Thu, 17 Apr 2014 12:03:03 +0300 Message-ID: <83wqeoib08.fsf@gnu.org> References: <20140417061037.GB23131@pille.home> <834n1sjuo1.fsf@gnu.org> <20140417072523.GC23131@pille.home> <83y4z4idx6.fsf@gnu.org> <20140417082931.GD23131@pille.home> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1397725468 3317 80.91.229.3 (17 Apr 2014 09:04:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2014 09:04:28 +0000 (UTC) Cc: 17281@debbugs.gnu.org To: "Stefan-W. Hahn" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 17 11:04:21 2014 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 1WaiF2-00015C-G2 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Apr 2014 11:04:20 +0200 Original-Received: from localhost ([::1]:58693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaiF2-0006IV-37 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Apr 2014 05:04:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaiEu-0006IK-At for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 05:04:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WaiEl-0003Sl-BC for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 05:04:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WaiEl-0003Sf-7q for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 05:04:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WaiEk-0004DG-Om for bug-gnu-emacs@gnu.org; Thu, 17 Apr 2014 05:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Apr 2014 09:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17281 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17281-submit@debbugs.gnu.org id=B17281.139772538516121 (code B ref 17281); Thu, 17 Apr 2014 09:04:02 +0000 Original-Received: (at 17281) by debbugs.gnu.org; 17 Apr 2014 09:03:05 +0000 Original-Received: from localhost ([127.0.0.1]:50303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WaiDp-0004Bx-0J for submit@debbugs.gnu.org; Thu, 17 Apr 2014 05:03:05 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:38960) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WaiDj-0004BK-JS for 17281@debbugs.gnu.org; Thu, 17 Apr 2014 05:03:01 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0N4600J003LBLR00@a-mtaout20.012.net.il> for 17281@debbugs.gnu.org; Thu, 17 Apr 2014 12:02:52 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N4600JZK3SQFT30@a-mtaout20.012.net.il>; Thu, 17 Apr 2014 12:02:50 +0300 (IDT) In-reply-to: <20140417082931.GD23131@pille.home> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:88080 Archived-At: > Date: Thu, 17 Apr 2014 10:29:31 +0200 > From: "Stefan-W. Hahn" > Cc: 17281@debbugs.gnu.org > > Mail von Eli Zaretskii, Thu, 17 Apr 2014 at 11:00:05 +0300: > > > Date: Thu, 17 Apr 2014 09:25:23 +0200 > > > From: "Stefan-W. Hahn" > > > Cc: 17281@debbugs.gnu.org > > > > > Then it's a different bug. Are you sure it didn't happen before the > > above commit? I seem to be able to reproduce it as far back as Mar 15 > > (I have no easy way of trying older versions, due to changes in Lisp > > files involved in this recipe). > > I tried it back till 17. Dec 2013, but not all versions are compileable. > All tried vesions have the same problem. > > I even tried to debug it and I came to line-pixel-height (xdisp.c), which > calls start-display(). I made a debug output in line-pixel-height before the > call to start_display() and after. In the problematic case I never saw the > debug output after start_display(). The infloop was indeed inside line-pixel-height. Please try the patch below, which I just committed to the emacs-24 branch. It fixes your recipe, so I hope the original use case with emacsclient will also be fixed. === modified file 'src/xdisp.c' --- src/xdisp.c 2014-04-12 11:21:47 +0000 +++ src/xdisp.c 2014-04-17 08:58:59 +0000 @@ -1262,12 +1262,23 @@ Value is the height in pixels of the lin struct it it; struct text_pos pt; struct window *w = XWINDOW (selected_window); + struct buffer *old_buffer = NULL; + Lisp_Object result; + if (XBUFFER (w->contents) != current_buffer) + { + old_buffer = current_buffer; + set_buffer_internal_1 (XBUFFER (w->contents)); + } SET_TEXT_POS (pt, PT, PT_BYTE); start_display (&it, w, pt); it.vpos = it.current_y = 0; last_height = 0; - return make_number (line_bottom_y (&it)); + result = make_number (line_bottom_y (&it)); + if (old_buffer) + set_buffer_internal_1 (old_buffer); + + return result; } /* Return the default pixel height of text lines in window W. The