I am using Ubuntu 12.04 and GNU Emacs 23.3.1.
I just tried the bookmarks+ library (http://www.emacswiki.org/emacs/BookmarkPlus) I downloaded the files from that site, e.g. bookmarks+.el
from http://www.emacswiki.org/emacs/download/bookmark%2b.el
I put the files in my ~/emacs
directory, and I put
(setq load-path
(append (list nil "~/emacs")
load-path))
(require 'bookmark+)
in my ~/.emacs
startup file. To debug I have deleted everything else in my ~/.emacs
..
To make it simple, lets say I now start Emacs as follows:
bash$ emacs ~/.emacs &
Then I add a single bookmark using C-x p m, and then enter C-x r l to bring up the bookmarks buffer, and I get the follwing screen shot:
Now there are several ways to make Emacs crash:
.emacs
buffer, and then press C-x b again..When it crashes the frame is grayed and nothing happens, whereas in the Gnome terminal I get the error message
*** glibc detected *** emacs: realloc(): invalid next size: 0x000000000228e1a0 ***
If you have the same problem after trying a different Emacs build (order not too important, and items are not necessarily related -- i.e., try one or more of these things):
Remove nil
from your sexp that updates load-path
. And remove ~/.emacs
, unless it is a directory. load-path
should be a list of directory names. And it should include the directory where the Bookmark+ files are located. Typically, you do (add-to-list 'load-path "/some/directory")
to add a directory to load-path
.
For your testing, unless you have already done so, remove your bookmarks file. IOW start from zero, as you tried to do by emptying your .emacs
. Start with no bookmarks.
What happens if you do the same things (e.g. C-x r l
followed by C-x b
) without loading Bookmark+, i.e., using the vanilla Emacs bookmark code?
Remove any byte-compiled Bookmark+ files, so you use *.el
files, not *.elc
. Then set debug-on-error
to t
. (But if Emacs is crashing then you probably won't get a Lisp backtrace.)
Try M-x debug-on-entry switch-to-buffer
(or whatever other function you think the crash might occur in), and then step through the debugger using d
(or skip through parts you don't care about, using c
). For the most clarity (detail), load the Lisp source file that defines the function that you pass to debug-on-entry
. E.g., if it is switch-to-buffer
then in recent Emacs builds the file would be window.el
. Do C-h f switch-to-buffer
(or whatever function) to see just what file to load. Load the file using load-file
or load-library
(with an explicit .el
suffix), not require
, so you load the *.el
.
Every Emacs crash indicates an Emacs bug (Emacs should never crash). If the crash creates a file emacs_backtrace.txt
in the current directory then use M-x report-emacs-bug
and include that file in your bug report.
If debugging this helps narrow down the cause of the crash, then consider using M-x report-emacs-bug
to report the narrowed-down recipe to reproduce the crash.