|
From: | David Ponce |
Subject: | Re: NT Emacs crashes when selecting a menubar item |
Date: | Mon, 29 Jul 2002 20:16:35 +0200 |
User-agent: | Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1b) Gecko/20020728 |
Is this comment in w32menu.c inaccurate? /* Now GC cannot happen during the lifetime of the widget_value, so it's safe to store data from a Lisp_String, as long as local copies are made when the actual menu is created. Windows takes care of this for normal string items, but not for owner-drawn items or additional item-info. */
Yes I think it is inaccurate. IMO, GC cannot happen after the build of the widget_value tree is completed.
Yes GC seems to happen inside that range when building the widget_value tree. When it happens it can change the address of strings (when compacting the string pool)If it is inaccurate, why is that? How is it that GC happens in between creation of the widget value and its use in add_menu_item? Note that GC ought to be inhibited within set_frame_menubar from this line inhibit_garbage_collection (); to this line unbind_to (specpdl_count, Qnil); Does the GC happen inside that range, or after? Either way, it's a bug; the question is what bug.
that are stored in already allocated widget_values. I suppose it explains this comment "/* Don't set wv->name here; GC during the loop might relocate it. */" which appears inside that range.
[Prev in Thread] | Current Thread | [Next in Thread] |