From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bill Atkins Newsgroups: gmane.emacs.devel Subject: dump-emacs not compatible with toolbar-mode Date: Tue, 9 Aug 2005 23:13:34 -0400 Message-ID: <66b7e34b050809201369b8c03c@mail.gmail.com> References: <66b7e34b050807121011b801fc@mail.gmail.com> <66b7e34b05080821192d448e82@mail.gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1123644819 5552 80.91.229.2 (10 Aug 2005 03:33:39 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 10 Aug 2005 03:33:39 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 10 05:33:38 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1E2hKh-0006ng-7A for ged-emacs-devel@m.gmane.org; Wed, 10 Aug 2005 05:32:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2hNm-0000Kp-TK for ged-emacs-devel@m.gmane.org; Tue, 09 Aug 2005 23:35:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E2hJR-0007BZ-Qa for emacs-devel@gnu.org; Tue, 09 Aug 2005 23:31:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E2hJJ-00077I-Nz for emacs-devel@gnu.org; Tue, 09 Aug 2005 23:31:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E2hJI-0006vn-SG for emacs-devel@gnu.org; Tue, 09 Aug 2005 23:31:20 -0400 Original-Received: from [64.233.184.207] (helo=wproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E2hG9-0000eS-Nj for emacs-devel@gnu.org; Tue, 09 Aug 2005 23:28:05 -0400 Original-Received: by wproxy.gmail.com with SMTP id i23so45878wra for ; Tue, 09 Aug 2005 20:13:34 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SWsCdj53+S5UAI27ntRVWR8DiRA+O7oKQ4Ya4hQc2yHbUvHWWaRr0koEMBPudxrAM92e596WwJr/UcTIodHY4123PN9aY11Z10GaAJIbI27k4HgiX0gub9LluTcCykqiXgShEmQZxnRZ9AkjEO4q/gd8+UUeh4M6eSm+EZDO4ZE= Original-Received: by 10.54.144.9 with SMTP id r9mr161699wrd; Tue, 09 Aug 2005 20:13:34 -0700 (PDT) Original-Received: by 10.54.99.9 with HTTP; Tue, 9 Aug 2005 20:13:33 -0700 (PDT) Original-To: rms@gnu.org, emacs-devel@gnu.org In-Reply-To: Content-Disposition: inline X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:41837 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.xp= m")) 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. --=20 Bill Atkins