>> With the recent gschem code from CVS I'm getting a segmentation fault
>> when I try to use the 'Write image..." menu option or keyboard macro.
> Robert and I talked on IRC, it seems that the new gtk+ 2.10.x is
> doing something odd. I am in the process of updating my debian unstable
> system to see if I can reproduce this. Does anybody else out there have
> gtk+ 2.10.x and does this seg fault happen to you? Thanks,
I looked at this code when Robert first posted his bug report. I
haven't checked my machines for GTK 2.10.x, but here's the offending
code:
-------------------------- <code> ----------------------------
/* Get the current image type */
#if ((GTK_MAJOR_VERSION == 2) && (GTK_MINOR_VERSION < 6))
GSList *ptr;
/* If GTK < 2.6, get the description from the descriptions list */
ptr = g_slist_nth(image_type_descriptions,
gtk_combo_box_get_active(GTK_COMBO_BOX(combo)));
image_type_descr = (char *) (ptr->data);
#else
image_type_descr = gtk_combo_box_get_active_text(GTK_COMBO_BOX(combo));
#endif
image_type = x_image_get_type_from_description(image_type_descr);
------------------------- </code> ------------------------------
So the problem is that one or the other of these two code paths don't
return a value for image_type_descr, and the call to
x_image_get_type_from_description doesn't check for NULL before making
the call. It seems to me that image_type_descr should be checked
before using it. But I don't know what one should do if its value is
NULL.
I don't know any more than this.....
Stuart
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev