From: Eli Zaretskii <eliz@gnu.org>
Cc: jasonr@gnu.org, emacs-devel@gnu.org
Subject: Re: [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation]
Date: Fri, 16 Dec 2005 22:14:27 +0200 [thread overview]
Message-ID: <uslssol3w.fsf@gnu.org> (raw)
In-Reply-To: <E1En4kd-0006ra-St@fencepost.gnu.org> (rms@gnu.org)
FWIW, I found that I can prevent this crash with the simple change
below. It registers the frame in Vframe_alist before the menu bar is
constructed, so if the latter signals an error, the frame whose menu
could not be built is nonetheless recorded in Vframe_alist, and thus
check_glyph_memory will free its glyph matrices.
The question is: is the crash an artifact of how check_glyph_memory
checks for glyph memory leaks, or does the crash indicate some deeper
problem? In other words, is it kosher for Fx_create_frame to be
entered recursively?
Note that the version of Fx_create_frame in xfns.c creates the menu
_after_ the frame is registered, and not as part of the window
creation in x_window. Jason, can you tell whether it is okay to move
the code that creates the menu on w32 from w32_window to
Fx_create_frame, and do that after the call to x_icon and x_make_gc?
Index: src/w32fns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w32fns.c,v
retrieving revision 1.261
diff -c -r1.261 w32fns.c
*** src/w32fns.c 14 Dec 2005 20:58:33 -0000 1.261
--- src/w32fns.c 16 Dec 2005 20:03:49 -0000
***************
*** 4299,4312 ****
tem = w32_get_arg (parameters, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
f->no_split = minibuffer_only || EQ (tem, Qt);
w32_window (f, window_prompting, minibuffer_only);
x_icon (f, parameters);
-
x_make_gc (f);
/* Now consider the frame official. */
FRAME_W32_DISPLAY_INFO (f)->reference_count++;
- Vframe_list = Fcons (frame, Vframe_list);
/* We need to do this after creating the window, so that the
icon-creation functions can say whose icon they're describing. */
--- 4299,4315 ----
tem = w32_get_arg (parameters, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
f->no_split = minibuffer_only || EQ (tem, Qt);
+ /* Do this before the call to w32_window, since that can call Feval
+ (e.g., to compute the frame's menu bar) and throw an error, which
+ will leave this frame unregistered. */
+ Vframe_list = Fcons (frame, Vframe_list);
+
w32_window (f, window_prompting, minibuffer_only);
x_icon (f, parameters);
x_make_gc (f);
/* Now consider the frame official. */
FRAME_W32_DISPLAY_INFO (f)->reference_count++;
/* We need to do this after creating the window, so that the
icon-creation functions can say whose icon they're describing. */
next prev parent reply other threads:[~2005-12-16 20:14 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-05 2:36 [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard Stallman
2005-12-07 18:55 ` Chong Yidong
2005-12-08 4:53 ` Richard M. Stallman
2005-12-08 16:14 ` Drew Adams
2005-12-09 13:17 ` Eli Zaretskii
2005-12-09 14:07 ` Chong Yidong
2005-12-09 18:37 ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-10 4:14 ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard M. Stallman
2005-12-11 18:17 ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-12 5:23 ` Richard M. Stallman
2005-12-12 5:40 ` [drew.adams@oracle.com: RE: weird defadvice bugwithbyte-compilation] Drew Adams
2005-12-13 3:14 ` Richard M. Stallman
2005-12-13 3:52 ` [drew.adams@oracle.com: RE: weird defadvicebugwithbyte-compilation] Drew Adams
2005-12-13 23:33 ` Richard M. Stallman
2005-12-14 1:05 ` [drew.adams@oracle.com: RE: weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 1:24 ` Johan Bockgård
2005-12-14 3:41 ` [drew.adams@oracle.com: Drew Adams
2005-12-14 3:45 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 17:17 ` [drew.adams@oracle.com: Johan Bockgård
2005-12-14 21:29 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-14 23:43 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Johan Bockgård
2005-12-15 1:46 ` [drew.adams@oracle.com:RE:weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-11 20:21 ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Eli Zaretskii
2005-12-11 21:35 ` [drew.adams@oracle.com: RE: weird defadvice bug withbyte-compilation] Drew Adams
2005-12-12 5:52 ` Eli Zaretskii
2005-12-12 6:11 ` [drew.adams@oracle.com: RE: weird defadvice bugwithbyte-compilation] Drew Adams
2005-12-12 6:44 ` [drew.adams@oracle.com: RE: weird defadvicebugwithbyte-compilation] Drew Adams
2005-12-12 21:22 ` Eli Zaretskii
2005-12-12 21:53 ` [drew.adams@oracle.com: RE: weirddefadvicebugwithbyte-compilation] Drew Adams
2005-12-13 4:30 ` Eli Zaretskii
2005-12-13 4:59 ` [drew.adams@oracle.com: Drew Adams
2005-12-12 5:23 ` [drew.adams@oracle.com: RE: weird defadvice bug with byte-compilation] Richard M. Stallman
2005-12-12 6:11 ` Eli Zaretskii
2005-12-13 3:14 ` Richard M. Stallman
2005-12-13 4:39 ` Eli Zaretskii
2005-12-13 23:33 ` Richard M. Stallman
2005-12-14 19:38 ` Eli Zaretskii
2005-12-15 2:09 ` Richard M. Stallman
2005-12-15 4:46 ` Eli Zaretskii
2005-12-16 1:51 ` Richard M. Stallman
2005-12-16 19:48 ` Eli Zaretskii
2005-12-16 20:14 ` Eli Zaretskii [this message]
2005-12-17 1:05 ` Richard M. Stallman
2005-12-17 8:29 ` Eli Zaretskii
2005-12-17 23:59 ` Richard M. Stallman
-- strict thread matches above, loose matches on Subject: below --
2005-11-28 4:46 Richard M. Stallman
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=uslssol3w.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
/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.