all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 9006@debbugs.gnu.org
Subject: bug#9006: 24.0.50; Abort in unshow_buffer/kill-buffer
Date: Wed, 06 Jul 2011 21:19:21 +0200	[thread overview]
Message-ID: <87oc17xlmu.fsf@escher.fritz.box> (raw)
In-Reply-To: <4E1429F3.1010305@gmx.at> (martin rudalics's message of "Wed, 06 Jul 2011 11:25:07 +0200")

On Wed, 06 Jul 2011 11:25:07 +0200 martin rudalics <rudalics@gmx.at> 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





  reply	other threads:[~2011-07-06 19:19 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 23:20 bug#9006: 24.0.50; Abort in unshow_buffer/kill-buffer Stephen Berman
2011-07-06  9:25 ` martin rudalics
2011-07-06 19:19   ` Stephen Berman [this message]
2011-07-07  8:23     ` martin rudalics
2011-07-07  9:32       ` Stephen Berman
2011-07-07 15:47         ` martin rudalics
2011-07-08 23:03           ` Stephen Berman
2011-07-09  8:44             ` martin rudalics
2011-07-09 11:57               ` Stephen Berman
2011-07-09 13:01                 ` martin rudalics
2011-07-09 16:27                   ` Stephen Berman
2011-07-09 16:54                     ` Stephen Berman
2011-07-10  8:59                       ` martin rudalics
2011-07-10 10:25                         ` Stephen Berman
2011-07-10 13:30                           ` martin rudalics
2011-07-10 20:31                             ` Stephen Berman
2011-07-11 19:14                               ` martin rudalics
2011-07-11 20:04                                 ` Stephen Berman
2011-07-12  8:36                                   ` martin rudalics
2011-07-12  8:51                                     ` Stephen Berman
2011-07-13  6:53                                     ` Stephen Berman
2011-07-13  7:24                                       ` Eli Zaretskii
2011-07-13  8:00                                         ` Stephen Berman
2011-07-13 10:03                                           ` Eli Zaretskii
2011-07-13 11:40                                             ` Stephen Berman
2011-07-13  8:37                                       ` martin rudalics
2011-07-13 10:05                                         ` Eli Zaretskii
2011-07-13 11:54                                           ` martin rudalics
2011-07-13 12:20                                             ` Stephen Berman
2011-07-13 11:39                                         ` Stephen Berman
2011-07-14  8:35                                       ` martin rudalics
2011-07-15 21:05                                         ` Stephen Berman
2011-07-10  8:58                     ` martin rudalics
2011-07-09 12:44               ` Stephen Berman
2011-07-09 13:01                 ` martin rudalics
2011-07-09 17:31               ` Eli Zaretskii
2011-07-10  8:59                 ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87oc17xlmu.fsf@escher.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=9006@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.