[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: CVS gschem crash in recent_files_add
On Sun, 2007-06-03 at 13:02 -0700, Ben Jackson wrote:
> 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
That is the "correct" fix for the current code.
> 2) If people are doing this everywhere, just change s_toplevel_init
> to call g_new0().
Can't hurt.
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user