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 16:47:56 +0200 Organization: not if I can help it Message-ID: <874luf3wir.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> <87k23bqm2n.fsf@gmail.com> <83o9snf8qx.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 1500043753 23839 195.159.176.226 (14 Jul 2017 14:49:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2017 14:49:13 +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 16:49:08 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 1dW1tz-0005wt-QL for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 16:49:08 +0200 Original-Received: from localhost ([::1]:38391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW1u5-0004JM-Bz for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Jul 2017 10:49:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW1tz-0004J4-A5 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:49:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dW1tu-0000dW-Ea for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:49:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dW1tu-0000dS-BA for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dW1tt-0006CK-O2 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:49:02 -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 14:49: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.150004370023766 (code B ref -1); Fri, 14 Jul 2017 14:49:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Jul 2017 14:48:20 +0000 Original-Received: from localhost ([127.0.0.1]:39163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dW1tD-0006BG-UB for submit@debbugs.gnu.org; Fri, 14 Jul 2017 10:48:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dW1tB-0006B0-QG for submit@debbugs.gnu.org; Fri, 14 Jul 2017 10:48:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dW1t5-0000Pm-Oo for submit@debbugs.gnu.org; Fri, 14 Jul 2017 10:48:12 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36515) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dW1t5-0000Pg-LJ for submit@debbugs.gnu.org; Fri, 14 Jul 2017 10:48:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dW1t4-0003CW-Gy for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:48:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dW1sz-0000Of-Q6 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:48:10 -0400 Original-Received: from [195.159.176.226] (port=37201 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dW1sz-0000ON-Jv for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 10:48:05 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dW1sr-0002GR-W5 for bug-gnu-emacs@gnu.org; Fri, 14 Jul 2017 16:47:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-Lines: 52 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:efG3eOFNemiuud+79E3w3Qu8aEM= 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:134561 Archived-At: Eli Zaretskii writes: >> From: Robert Pluim >> Would you like me to try an unoptimised build? CFLAGS=-O0 -ggdb or >> similar? > > It cannot hurt, so please do. Maybe this will give some valuable > hints. (Please use "-gdwarf-4 -g3" instead of -ggdb, it should > provide a better debug info.) Btw, I already did an optimized build, > but was unable to reproduce the problem there as well. > I'll try that next, I think you're on the right track. > When the assertion in maybe_produce_line_number is hit, what are the > values of it->vpos and it->glyph_row->y? Are they always the same > values? If they are, maybe we could put a watchpoint on the > corresponding glyph row and see who changes it. They're both always 0. 21012 eassert (it->glyph_row == NULL || it->glyph_row->used[TEXT_AREA] == 0); (gdb) p it->vpos $5 = 0 (gdb) p it->glyph_row->y $6 = 0 > The problem seems to be that display_line starts producing glyphs in a > glyph row which wasn't cleared, i.e. its used[1] counter is non-zero. > The call to prepare_desired_row at the beginning of display_line is > supposed to do that, but only if the row->enabled_p flag is reset. > This flag should be reset for all the glyph rows of the window's > desired_matrix, because redisplay calls clear_glyph_matrix for > w->desired_matrix, directly and indirectly, in many places. Somehow > in your case either those calls to clear_glyph_matrix are bypassed or > some code sets the enabled_p flag at some point and doesn't reset it > before the call to try_window on line 16991 of xdisp.c. I'm trying to > establish where does this happen and why. > > Just to make sure I'm on the right track: if you make the change > below, does the problem go away? > Yes. Without the patch I ran my eww recipe three times, it crashed three times. With the patch, I ran it three times in 3 separate instances of emacs, no crash so far (and I tried a bunch of the magit related operations as well for good measure, and I'm using the resulting emacs to send this). Regards Robert