From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#9006: 24.0.50; Abort in unshow_buffer/kill-buffer Date: Wed, 06 Jul 2011 21:19:21 +0200 Message-ID: <87oc17xlmu.fsf@escher.fritz.box> References: <877h7wxqjv.fsf@escher.fritz.box> <4E1429F3.1010305@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309981450 26200 80.91.229.12 (6 Jul 2011 19:44:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2011 19:44:10 +0000 (UTC) Cc: 9006@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 06 21:44:04 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QeY0y-00030c-1u for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2011 21:44:04 +0200 Original-Received: from localhost ([::1]:56971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeY0x-0005dM-3x for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Jul 2011 15:44:03 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeXdm-0007WM-V9 for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2011 15:20:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeXdk-0006h3-Cx for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2011 15:20:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeXdj-0006gg-Vz for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2011 15:20:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QeXdj-0003DB-69; Wed, 06 Jul 2011 15:20:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2011 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9006 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9006-submit@debbugs.gnu.org id=B9006.130997997112294 (code B ref 9006); Wed, 06 Jul 2011 19:20:02 +0000 Original-Received: (at 9006) by debbugs.gnu.org; 6 Jul 2011 19:19:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeXdC-0003CF-Mg for submit@debbugs.gnu.org; Wed, 06 Jul 2011 15:19:31 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QeXdA-0003By-U0 for 9006@debbugs.gnu.org; Wed, 06 Jul 2011 15:19:29 -0400 Original-Received: (qmail invoked by alias); 06 Jul 2011 19:19:22 -0000 Original-Received: from i59F57271.versanet.de (EHLO escher.home) [89.245.114.113] by mail.gmx.net (mp018) with SMTP; 06 Jul 2011 21:19:22 +0200 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX18QTlgu4eEQjnIbujMoLUjegIhRLUuV9x8Wx9qgy/ DThUKnLhv/TuZb Original-Received: by escher.home (Postfix, from userid 1000) id 65C585F8CF; Wed, 6 Jul 2011 21:19:21 +0200 (CEST) In-Reply-To: <4E1429F3.1010305@gmx.at> (martin rudalics's message of "Wed, 06 Jul 2011 11:25:07 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 06 Jul 2011 15:20:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:48111 Archived-At: On Wed, 06 Jul 2011 11:25:07 +0200 martin rudalics wrote: >> I was editing a mail in Gnus when Emacs aborted; full backtrace is >> below. This happened with all my initialization and customizations, and >> going by the Lisp backtrace, seems to involve a third-party library I >> use, tabbar.el. I had a similar crash yesterday, when I wasn't running >> under gdb. In both case Emacs had been running for over 12 hours and >> seemed quite sluggish. Just before the abort I had been deleting text, >> moving point, and Emacs got less and less responsive, so I typed C-g and >> that's when the abort happened. >> >> #0 abort () at /home/steve/bzr/emacs/quickfixes/src/emacs.c:375 >> No locals. >> #1 0x080a7257 in unshow_buffer (w=0x97ecc40) >> at /home/steve/bzr/emacs/quickfixes/src/window.c:1397 >> buf = 184854789 >> b = 0xb04a900 > > There's a comment about a similar case in xdisp.c > > /* Make the echo area buffer current. Note that for display > purposes, it is not necessary that the displayed window's buffer > == current_buffer, except for text property lookup. So, let's > only set that buffer temporarily here without doing a full > Fset_window_buffer. We must also change w->pointm, though, > because otherwise an assertions in unshow_buffer fails, and Emacs > aborts. */ > > but I can't find a useful hint in the backtrace. I don't even > understand why a buffer should get killed here. I assume that's because of with-temp-buffer: (defmacro with-temp-buffer (&rest body) "Create a temporary buffer, and evaluate BODY there like `progn'. See also `with-temp-file' and `with-output-to-string'." (declare (indent 0) (debug t)) (let ((temp-buffer (make-symbol "temp-buffer"))) `(let ((,temp-buffer (generate-new-buffer " *temp*"))) ;; FIXME: kill-buffer can change current-buffer in some odd cases. (with-current-buffer ,temp-buffer (unwind-protect (progn ,@body) (and (buffer-name ,temp-buffer) (kill-buffer ,temp-buffer))))))) which is called from tabbar-line-format: (with-temp-buffer (let ((truncate-partial-width-windows nil) (inhibit-modification-hooks t) deactivate-mark ;; Prevent deactivation of the mark! start) (setq truncate-lines nil buffer-undo-list t) (apply 'insert (tabbar-line-buttons tabset)) (setq start (point)) (while (and (cdr elts) ;; Always show the selected tab! (progn (delete-region start (point-max)) (goto-char (point-max)) (apply 'insert elts) (goto-char (point-min)) (> (vertical-motion 1) 0))) (tabbar-scroll tabset 1) (setq elts (cdr elts))))) The Lisp backtrace shows vertical-motion being called just before kill-buffer, which makes Emacs abort. I induced the abort again, under the same conditions as described above, and got exactly the same backtrace. I'll leave the process running for a few hours before I have to shut down the machine, in case anyone can offer debugging suggestions. Steve Berman