[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dump-emacs not compatible with toolbar-mode

From: Bill Atkins
Subject: dump-emacs not compatible with toolbar-mode
Date: Tue, 9 Aug 2005 23:13:34 -0400

There is a bug that arises when using dump-emacs to preload your
Emacs.  It seems that if the function find-image is called at any time
before the dump, starting the dumped image will result in an error and
startup will halt.

I just checked out a fresh copy of Emacs and built it a few hours ago,
to make sure the problem is not limited to my own snapshot.

Here is the command line I'm using to dump the image:

     ./src/emacs -q --batch --load bug_trap --execute "(dump-emacs
\"resmacs\" \"src/emacs\")"

Here are the contents of the bug_trap file:
(setq debug-on-error t)

(find-image '((:type xpm :file "toolbar/new.xpm" :ascent center)))

Since certain packages call find-image directly or indirectly, there
are other ways to trigger the error.  For instance, loading
php-mode.el or time.el before dumping will yield identical results.

Here is a backtrace of the error (this results from running "./resmacs -q"):

 Debugger entered--Lisp error: (error "Invalid image specification")
  image-mask-p((image :type xpm :file "/home/bill/emacs/lisp/toolbar/new.xpm"))
  tool-bar-local-item-from-menu(find-file "new" (keymap) nil)
  apply(tool-bar-local-item-from-menu find-file "new" (keymap) nil nil)
  tool-bar-add-item-from-menu(find-file "new")

Again, this error _only_ occurs if find-image gets called before the
dump.  Also, the error does not occur in -nw mode; it only appears
when run in X.

I'd be happy to provide any clarification.  Unfortunately, I'm not
familiar enough with Emacs' internals to provide a patch.

Bill Atkins

reply via email to

[Prev in Thread] Current Thread [Next in Thread]