[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: RE: weird defadvice bug with byte-compilation]
From: |
Eli Zaretskii |
Subject: |
Re: address@hidden: RE: weird defadvice bug with byte-compilation] |
Date: |
Fri, 16 Dec 2005 22:14:27 +0200 |
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. */
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], (continued)
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/12
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/13
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/14
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/14
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/14
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/15
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/16
- Re: address@hidden: RE: weird defadvice bug with byte-compilation],
Eli Zaretskii <=
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/16
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Eli Zaretskii, 2005/12/17
- Re: address@hidden: RE: weird defadvice bug with byte-compilation], Richard M. Stallman, 2005/12/17