From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#12867: 24.3.50; easy-to-repro crash involving mode line Date: Sun, 11 Nov 2012 19:52:09 -0800 Message-ID: <77CAAFE4D0CE4DD98476C996E3158648@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1352692372 32699 80.91.229.3 (12 Nov 2012 03:52:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 12 Nov 2012 03:52:52 +0000 (UTC) To: 12867@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 12 04:53:02 2012 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 1TXl52-0001r4-5W for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Nov 2012 04:53:00 +0100 Original-Received: from localhost ([::1]:52740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXl4q-0001wM-Ht for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Nov 2012 22:52:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXl4l-0001w1-FS for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:52:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXl4i-0000t3-D5 for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:52:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXl4i-0000sy-9E for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:52:40 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TXl53-0004AD-V8 for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Nov 2012 03:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12867 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.135269237715992 (code B ref -1); Mon, 12 Nov 2012 03:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Nov 2012 03:52:57 +0000 Original-Received: from localhost ([127.0.0.1]:34149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXl4y-00049s-2X for submit@debbugs.gnu.org; Sun, 11 Nov 2012 22:52:57 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49437) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TXl4v-00049l-9L for submit@debbugs.gnu.org; Sun, 11 Nov 2012 22:52:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXl4W-0000qm-9Y for submit@debbugs.gnu.org; Sun, 11 Nov 2012 22:52:31 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:34067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXl4W-0000qi-6A for submit@debbugs.gnu.org; Sun, 11 Nov 2012 22:52:28 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:59758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXl4T-0001tD-3c for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:52:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXl4Q-0000pk-1a for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:52:25 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:43065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXl4P-0000pe-Qr for bug-gnu-emacs@gnu.org; Sun, 11 Nov 2012 22:52:21 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qAC3qJRC013852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 Nov 2012 03:52:20 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qAC3qJHP001804 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 12 Nov 2012 03:52:19 GMT Original-Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qAC3qJdv013945 for ; Sun, 11 Nov 2012 21:52:19 -0600 Original-Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 11 Nov 2012 19:52:18 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac3AiRbsg/NbCl64R0iWk34OavPNpw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-Spam-Score: -6.1 (------) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:66786 Archived-At: emacs -Q (defun foo () (set (make-local-variable 'mode-line-position) '("%99l (line)")) (set (make-local-variable 'mode-line-format) '(("" mode-name mode-line-position)))) M-: (foo) No problem. The line number is shown at the far right, padded on the left (see bug #12866). You might need to widen the window/frame to see it. But no problem. Now change 99 to 999 and repeat M-: (foo). Still no problem. Now, no matter how big you make the window or how small you make the font, the line number has probably moved off the screen at the right, so you no longer see it. Good (what I wanted). Now change the value to 9999. Crash. Background, FWIW: I want to use the fact that a %l construct in the mode line enables you to do something dynamic when the cursor moves to another line. This works very well, except for one thing (besides the corner-case crash reported here): you must SHOW the line number. By "show the line number", I mean: 1. The %l construct must be present in the `mode-line-format'. 2. Its resulting line-number text must not have property `invisible'. Dunno why, but that's what seems to be the case. So, since my use of this dynamic display does not really have anything to do with showing the line number, and I do not want to show it, I looked for another way to remove it. I first moved it off to the right a bit, so it didn't get in the way too much. Then I discovered that even though the text must not be `invisible' (why?) it is fine if the text is off the screen to the right. As a final step, I tried using a very large padding number, just for good measure. That produced the crash. Besides fixing the crash, it would be great if I did not have to resort to such an ugly hack in the first place. Presumably, this feature of dynamic line-sensitive updating is buried in the bowels of Emacs C code, so not available to Lisp users to tweak. Must this feature really be tied to an actual display of the line number? If so, can't we at least make that text invisible? Regardless, it would also be good if this feature (line-sensitive updating) were documented. I could find nothing that even hinted at it. [As Emacs 24 crashes sooner or later, seemingly randomly, for each session I have, it is a pleasure to be able to report a simple-to-reproduce crash, for once.] In GNU Emacs 24.3.50.1 (i386-mingw-nt5.1.2600) of 2012-11-05 on MS-W7-DANI Bzr revision: 110809 lekktu@gmail.com-20121105172930-a5gn0bwi4lndchhw Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -I../../libs/libXpm-3.5.10/include -I../../libs/libXpm-3.5.10/src -I../../libs/libpng-1.2.37-lib/include -I../../libs/zlib-1.2.5 -I../../libs/giflib-4.1.4-1-lib/include -I../../libs/jpeg-6b-4-lib/include -I../../libs/tiff-3.8.2-1-lib/include -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2 -I../../libs/gnutls-3.0.9-w32-bin/include -I../../libs/libiconv-1.9.2-1-lib/include'