gEDA-user: CVS gschem crash in recent_files_add

Ben Jackson ben at ben.com
Sun Jun 3 16:02:17 EDT 2007


recent_files_add starts at global_window_current and walks back through
'prev' as far as it can.  In my crash, global_window_current looks fine,
its 'prev' looks fine (like a suitable pointer) but the contents of THAT
are garbage, which causes a crash in a GTK sanity check.

This seems to be due to s_toplevel_init() creating exactly that:  A
toplevel with the only initialized fields being wid, next, prev.

I don't really know what was intended, but I see a few solutions:

1)  Have recent_files_add ignore wid==-1 toplevels, or

2)  If people are doing this everywhere, just change s_toplevel_init
to call g_new0().

I just tested (1), I will probably throw in (2) just to be safe.

-- 
Ben Jackson AD7GD
<ben at ben.com>
http://www.ben.com/


More information about the geda-user mailing list