GNOME Bugzilla – Bug 57012
gtk_curve_set_curve_type () failed for GTK_CURVE_TYPE_FREE and GTK_CURVE_TYPE_LINEAR
Last modified: 2010-06-27 01:50:04 UTC
#include <gtk/gtk.h> int main (int argc, char** argv) { GtkWidget *widget; GtkCurveType type; gtk_init (&argc, &argv); widget = gtk_curve_new (); gtk_curve_set_curve_type (GTK_CURVE(widget), GTK_CURVE_TYPE_FREE); gtk_widget_destroy (widget); }; The example of result this code work: GtkCurve (pid:16598): GLib-ERROR **: gmem.c:140:g_malloc(): failed to allocate 4294967276 bytes aborting... Trace/breakpoint trap (core dumped) The result for GTK_CURVE_TYPE_LINEAR is similar, but it works for GTK_CURVE_TYPE_SPLINE
The problem here is setting the curve type before the widget is allocated something reasonable. (And not catching width = GTK_WIDGET (c)->allocation.width - RADIUS * 2; becoming negative.)
Putting "GtkCurve doesn't work when not displayed on the screen" bugs on the 2.0.1 milestone. We actually plan to move GtkCurve out of GTK+ in the future, it's strange in a lot of little ways, and it's not a particularly useful widget.
*** Bug 70195 has been marked as a duplicate of this bug. ***
*** Bug 75925 has been marked as a duplicate of this bug. ***
Moving non-critical or hard to fix bugs to 2.0.2
Move open bugs from milestones 2.0.[012] -- > 2.0.3, since 2.0.2 is already out.
*** Bug 92771 has been marked as a duplicate of this bug. ***
*** Bug 110485 has been marked as a duplicate of this bug. ***
Mass changing gtk+ bugs with target milestone of 2.4.2 to target 2.4.4, as Matthias said he was trying to do himself on IRC and was asking for help with. If you see this message, it means I was successful at fixing the borken-ness in bugzilla :) Sorry for the spam; just query on this message and delete all emails you get with this message, since there will probably be a lot.
GtkCurve has been deprecated for a while; this means that it's not actively maintained. Patches welcome, but just remember that GtkCurve is going to be removed from GTK+ 3.0, along with all the other API deprecated during the 2.x series.
GtkCurve has been removed from GTK+ 2.90