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: Thu, 13 Jul 2017 18:33:08 +0200 Organization: not if I can help it Message-ID: <87fue047qz.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> <83r2xkgv9u.fsf@gnu.org> Reply-To: bug-gnu-emacs@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1499964443 32163 195.159.176.226 (13 Jul 2017 16:47:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 13 Jul 2017 16:47:23 +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 Thu Jul 13 18:47:15 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 1dVhGj-0007r2-6L for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 18:47:13 +0200 Original-Received: from localhost ([::1]:33022 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVhGo-000090-5D for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Jul 2017 12:47:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVh42-0004D8-Qg for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:34:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVh3y-00050R-Rh for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:34:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:34607) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVh3y-00050N-O5 for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dVh3y-0006Yg-I9 for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:34: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: Thu, 13 Jul 2017 16:34:02 +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.149996362325185 (code B ref -1); Thu, 13 Jul 2017 16:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Jul 2017 16:33:43 +0000 Original-Received: from localhost ([127.0.0.1]:37284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVh3f-0006Y9-Jo for submit@debbugs.gnu.org; Thu, 13 Jul 2017 12:33:43 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVh3d-0006Xw-SK for submit@debbugs.gnu.org; Thu, 13 Jul 2017 12:33:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVh3X-0004ca-Ol for submit@debbugs.gnu.org; Thu, 13 Jul 2017 12:33:36 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59237) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVh3X-0004cQ-M7 for submit@debbugs.gnu.org; Thu, 13 Jul 2017 12:33:35 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVh3W-0003Ir-ET for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:33:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVh3Q-0004Xe-JD for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:33:34 -0400 Original-Received: from [195.159.176.226] (port=59647 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVh3Q-0004Wb-Bv for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 12:33:28 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dVh3F-0000OT-VQ for bug-gnu-emacs@gnu.org; Thu, 13 Jul 2017 18:33:17 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: bug-gnu-emacs@gnu.org Original-Lines: 71 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:AuL9Q8TG2qSMTk4AnHtHDvWrCP4= 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:134511 Archived-At: Eli Zaretskii writes: >> From: Robert Pluim >> Date: Thu, 13 Jul 2017 10:28:42 +0200 >> It's always approximately twice the correct one. In the two cases I >> have so far it's 67:138 and 47:98. That's a ratio of n:(2n + 4) in >> both cases. > > It's nice that a clear pattern emerges, but I still cannot see how > that could happen... > > I think next thing to try is to see where does the used[1] count > becomes too large. I suggest to run Emacs under GDB with the > following breakpoint on a line immediately after the call to > PRODUCE_GLYPHS in display_line: > > (gdb) break xdisp.c:21374 if it->glyph_row->used[1] > 90 > OK, I can try that. > This assumes that you're windows are never wider than 90 columns; if > that's not true, enlarge the number as needed to prevent the > breakpoint from breaking in legitimate cases. When this breaks, > please show the backtrace. > > Another idea is to set the following breakpoint inside > maybe_produce_line_number: > > (gdb) break xdisp.c:21010 if it->glyph_row !=3D 0 && it->glyph_row->use= d[1] > 0 > > Line 21010 is this: > > short *u =3D it->glyph_row ? &it->glyph_row->used[TEXT_AREA] : NULL; > > There's a hidden assumption in the code that maybe_produce_line_number > is called when no glyphs were produced for the screen line yet. Maybe > that assumption is wrong. > I'll try that if method 1 doesn't get me anywhere. > Btw, what version of GCC do you use? It's the standard system gcc for Ubuntu 16.04: $ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 5.4.0-6ubu= ntu1~16.04.4' --with-bugurl=3Dfile:///usr/share/doc/gcc-5/README.Bugs --ena= ble-languages=3Dc,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=3D/usr --= program-suffix=3D-5 --enable-shared --enable-linker-build-id --libexecdir= =3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D= /usr/lib --enable-nls --with-sysroot=3D/ --enable-clocale=3Dgnu --enable-li= bstdcxx-debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3D= new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --en= able-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt= =3Dgtk --enable-gtk-cairo --with-java-home=3D/usr/lib/jvm/java-1.5.0-gcj-5-= amd64/jre --enable-java-home --with-jvm-root-dir=3D/usr/lib/jvm/java-1.5.0-= gcj-5-amd64 --with-jvm-jar-dir=3D/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd6= 4 --with-arch-directory=3Damd64 --with-ecj-jar=3D/usr/share/java/eclipse-ec= j.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32= =3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multi= lib --with-tune=3Dgeneric --enable-checking=3Drelease --build=3Dx86_64-linu= x-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linux-gnu Thread model: posix gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)=20