I know I have said this before, but it looks like I may have finally squashed that 
infamous handle bug. For those not already familiar with this demon, it would cause 
any PicoGUI object with a handle to randomly disappear. That's what made the date 
dialog crash when clicked a lot, and that's what makes my wallclock (Yes, I have a 
picogui-powered clock) crash every day or so.

I was working with the handle code, adding the pgDup function. (Duplicates a handle) 
Looking through the code for mkhandle() I found that it wasn't initializing some of 
the handlenode's members. Specifically, the 'group' member. The 'group' handle is used 
to set sort of an autodestruct for a handle, for example so that bitmaps loaded with a 
theme will be freed when the theme is deleted. Setting this group handle to any random 
value in effect sets a timebomb. Whenever any present or future handle matching the 
group handle is deleted, the new handle will be deleted as well. This perfectly 
matches the symptoms I have seen from the handle bug.

Still, this isn't the first time I think I have fixed it. I loaded the latest pgserver 
into my clock, so I guess time will tell if it has been fixed.

--
Only you can prevent creeping featurism!


_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to