From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#27668: 26.0.50; Crash with display-line-numbers t Date: Fri, 14 Jul 2017 13:45:04 +0200 Organization: not if I can help it Message-ID: <87k23bqm2n.fsf@gmail.com> References: <87k23d7ovv.fsf@gmail.com> <83inixiv0m.fsf@gnu.org> <877ezd7luq.fsf@gmail.com> <83bmopitky.fsf@gnu.org> <87vamx65x0.fsf@gmail.com> <837ezdiq3z.fsf@gnu.org> <871spl5x5h.fsf@gmail.com> <834luhiinr.fsf@gnu.org> <8760ewviyt.fsf@gmail.com> <83pod4gv0i.fsf@gnu.org> <87r2xkl246.fsf@gmail.com> <83mv88gqzi.fsf@gnu.org> <87mv88kxps.fsf@gmail.com> <83eftkgn06.fsf@gnu.org> <87iniwku3y.fsf@gmail.com> <83zic7fnrv.fsf@gnu.org> <87d1931jiy.fsf@gmail.com> <83vamvfit1.fsf@gnu.org> Reply-To: bug-gnu-emacs@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500033277 12904 195.159.176.226 (14 Jul 2017 11:54:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2017 11:54:37 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: 27668@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 14 13:54:33 2017 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 1dVzAv-0002pv-BW for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 13:54:25 +0200 Original-Received: from localhost ([::1]:37242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVzB0-0008Ud-KQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 07:54:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVz2q-0000nY-Uj for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:46:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVz2n-0004nw-RO for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:46:04 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35135) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVz2n-0004np-Ob for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVz2n-0006G9-J3 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:46:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87k23d7ovv.fsf@gmail.com> Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Jul 2017 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27668 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150003272824007 (code B ref -1); Fri, 14 Jul 2017 11:46:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jul 2017 11:45:28 +0000 Original-Received: from localhost ([127.0.0.1]:37812 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVz2F-0006F8-U5 for submit@debbugs.gnu.org; Fri, 14 Jul 2017 07:45:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVz2E-0006Et-Gf for submit@debbugs.gnu.org; Fri, 14 Jul 2017 07:45:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVz28-0004OF-Bh for submit@debbugs.gnu.org; Fri, 14 Jul 2017 07:45:21 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVz28-0004O8-7t for submit@debbugs.gnu.org; Fri, 14 Jul 2017 07:45:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVz26-00008h-SP for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:45:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVz23-0004MG-PA for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:45:18 -0400 Original-Received: from [195.159.176.226] (port=42973 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVz23-0004Lf-HE for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 07:45:15 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dVz1u-0000C8-Fx for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 13:45:06 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-Lines: 66 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:NTFTcjMElycnhtiv/5oOFTX7Yr4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:134546 Archived-At: Eli Zaretskii writes: >> From: Robert Pluim >> > In this frame #5, in redisplay_window, which of the conditions in the > following 'if' clause are true? > > /* Try to redisplay starting at same place as before. > If point has not moved off frame, accept the results. */ > if (!current_matrix_up_to_date_p > /* Don't use try_window_reusing_current_matrix in this case > because a window scroll function can have changed the > buffer. */ > || !NILP (Vwindow_scroll_functions) > || MINI_WINDOW_P (w) > || !(used_current_matrix_p > = try_window_reusing_current_matrix (w))) > { > IF_DEBUG (debug_method_add (w, "1")); > if (try_window (window, startp, TRY_WINDOW_CHECK_MARGINS) < 0) > > It cannot be MINI_WINDOW_P, so it's either current_matrix_up_to_date_p > is false, or your window-scroll-functions is non-nil, or we called > try_window_reusing_current_matrix. In the latter case, I'd expect my > recent change to fix the problem, so I guess that function wasn't > called, and some other condition caused us to call try_window. Or > maybe I'm missing something here. > (gdb) p used_current_matrix_p $1 = false (gdb) p Vwindow_scroll_functions $2 = XIL(0) (gdb) p w $3 = (gdb) p current_matrix_up_to_date_p $4 = false Would you like me to try an unoptimised build? CFLAGS=-O0 -ggdb or similar? >> I was looking at a commit in Magit, and had just hit enter in a diff >> hunk to view the source file containing the change, so it's happening >> when we switch from non-line-number to line-number mode. > > How do you "switch from non-line-number to line-number mode"? I tried > several ways I could think about, but couldn't reproduce the issue. I > wonder what's different in your case that you hit this problem so > frequently. > Basically, I have a buffer where display-line-numbers is nil, then I either switch to a buffer where it's t or visit a file where the mode-hook sets it to t. In this case I was looking at a diff hunk, where Magit does all sorts of highlighting and font-locking, and it visits the underlying file for you when you hit RET > Did the previous times also happened when switching from a Magit > buffer to a buffer under display-line-numbers? No, previous times were when calling C-x C-f from a buffer with display-line-numbers t Regards Robert