From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24109: 24.5; Long lines in message mode make Emacs irresponsive Date: Wed, 31 Aug 2016 17:37:55 +0300 Message-ID: <83poopknr0.fsf@gnu.org> References: <20160830123848.qxgg3hcawx4yqw4j@eab16011nb> <838tvenum4.fsf@gnu.org> <87wpiydzl7.fsf@wavexx.thregr.org> <83r396mdfr.fsf@gnu.org> <87lgzduwnm.fsf@wavexx.thregr.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1472654362 13011 195.159.176.226 (31 Aug 2016 14:39:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 31 Aug 2016 14:39:22 +0000 (UTC) Cc: 24109@debbugs.gnu.org, djcb@djcbsoftware.nl, Christophe.Troestler@umons.ac.be To: Yuri D'Elia Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Aug 31 16:39:16 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf6fa-0002Xt-W4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Aug 2016 16:39:15 +0200 Original-Received: from localhost ([::1]:54459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf6fY-00088Z-MB for geb-bug-gnu-emacs@m.gmane.org; Wed, 31 Aug 2016 10:39:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf6fT-00088U-8S for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 10:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf6fO-00033i-9a for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 10:39:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf6fO-00033d-67 for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 10:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bf6fO-00009u-3m for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2016 10:39: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: Wed, 31 Aug 2016 14:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24109 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24109-submit@debbugs.gnu.org id=B24109.1472654313574 (code B ref 24109); Wed, 31 Aug 2016 14:39:02 +0000 Original-Received: (at 24109) by debbugs.gnu.org; 31 Aug 2016 14:38:33 +0000 Original-Received: from localhost ([127.0.0.1]:45555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf6er-000098-QN for submit@debbugs.gnu.org; Wed, 31 Aug 2016 10:38:33 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf6em-00008o-JY for 24109@debbugs.gnu.org; Wed, 31 Aug 2016 10:38:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf6eg-0002s4-Ff for 24109@debbugs.gnu.org; Wed, 31 Aug 2016 10:38:19 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf6eN-0002nt-LP; Wed, 31 Aug 2016 10:37:59 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2923 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bf6eL-00014a-M0; Wed, 31 Aug 2016 10:37:58 -0400 In-reply-to: <87lgzduwnm.fsf@wavexx.thregr.org> (message from Yuri D'Elia on Wed, 31 Aug 2016 11:15:25 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:122801 Archived-At: > From: Yuri D'Elia > Cc: 24109@debbugs.gnu.org, djcb@djcbsoftware.nl, Christophe.Troestler@umons.ac.be, rudalics@gmx.at > Date: Wed, 31 Aug 2016 11:15:25 +0200 > > > What should NOT happen is that the values of it.current.pos stay > > constant, or cycle endlessly between the same values. If you can look > > at that, please do. > > I set a breakpoint and dumped the value of it->current.pos. > It seems to cycle every 54 iterations. Attached. Thanks. Next, we need to establish whether try_window loops in its loop indefinitely, or its caller calls it in an infinite loop. The main loop in try_window is this: /* Display all lines of W. */ while (it.current_y < it.last_visible_y) { if (display_line (&it)) last_text_row = it.glyph_row - 1; if (f->fonts_changed && !(flags & TRY_WINDOW_IGNORE_FONTS_CHANGE)) return 0; } Please see if the loop terminates, by setting a breakpoint on the 'return 0' statement and on the line after the loop. If it terminates, it means try_window does its job correctly, and we will need to look in the caller, redisplay_window, for the reasons of this infloop. > >> Is there some way to conveniently dump the entire buffer state to a file > >> so we can debug this by reloading the content without having the mail > >> client in the way? > > > > Not that I know of. > > Then, debugging this will be super-annoying :/ Not necessarily, it could be a very simple problem. Besides, even if there was such a feature, the full state that affects the display is huge: it should include, in addition to the text itself, all the text properties, all the face definitions, all the overlays -- and some of these are dynamically calculated as part of redisplay. Even if you could give me that, I'm not sure I could have spotted the root cause there.