I should also mention that this happens even if the particular image to be loaded is not toolbar/new.xpm. I use that in bug_trap simply because that's what Emacs was choking on. Once Emacs is running, though, it can load new.xpm and any other valid XPM I've tried without issue.
On 8/9/05, Bill Atkins <[EMAIL PROTECTED]> wrote: > 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") > tool-bar-setup() > tool-bar-mode(1) > command-line() > normal-top-level() > -------- > > 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 > -- Bill Atkins _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel