-------- Original Message --------
Subject: Re: [Q21.4] XEmacs crashes and patch
Date: Wed, 02 Jan 2013 16:10:54 -0500
From: steven Mitchell <smitchel(a)bnin.net>
To: Vin Shelton <acs(a)alumni.princeton.edu>
On 01/02/2013 01:08 PM, Vin Shelton wrote:
Dear Steven, Benson and Byrel -
On Wed, Dec 26, 2012 at 11:50 AM, Benson Mitchell
<benson.mitchell+xemacs(a)gmail.com> wrote:
> On Sat, Dec 22, 2012 at 9:12 PM, steven Mitchell <smitchel(a)bnin.net> wrote:
>> whenever you put a nil value with a keyword in a menu, add-submenu would
>> corrupt the menu structure, so that the next time the menu was accessed,
>> it would crash (this is in Xwindows; crash was that XEmacs to just totally
>> closed and went away.
>>
This was slightly wrong; the corruption occurs when you try to add an
item to a menu with a nil value.
Do you have a better test case that exhibits the behavior?
Try:
(progn
(add-submenu '("Test Toplevel") '("Test Parent" :included
nil ["1"
(insert "1")]))
(add-submenu '("Test Toplevel" "Test Parent") '("Test
Child" ["1"
(insert "1")]))
(assoc "Test Toplevel" current-menubar))
The second add-submenu will corrupt the menu structure. (Note that the
second menu is added right before the nil, instead of at the end of the
first menu.) This will trigger a crash the next time the menus are accessed.
Note that this is a fairly useless construction; I only found the bug by
forgetting to quote my :included predicate (which returned nil at
insertion-time.) It isn't a big deal to normal running, but really
impedes debugging errors like that. (Restarting XEmacs gets old fast!)
Best,
Byrel Mitchell
Thanks!
Vin Shelton
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta