After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 92771 - gtk_curve_set_curve_type bug
gtk_curve_set_curve_type bug
Status: RESOLVED DUPLICATE of bug 57012
Product: gtk+
Classification: Platform
Component: .General
1.2.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-09-08 10:27 UTC by tim
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description tim 2002-09-08 10:29:51 UTC
Package: gtk+
Version: 1.2.6, 1.2.10, 2.0.2 (probably all)

gtk_curve_set_curve_type inherently assumes the widget is
mapped/realized (has width and height > 0) and thus crashes 
when called before mapping/realizing.

assert-failure-provoking code for gtk+-1.2:

/* 
 * makes GLib abort with the message 'could not allocate -20 bytes'.
 */

#include <gtk/gtk.h>

int main (int argc, char ** argv)
{
        GtkWidget * c;
        
        gtk_init (&argc, &argv);
        
        c = gtk_curve_new();
        gtk_curve_set_curve_type (c,
		(GtkCurveType) GTK_CURVE_TYPE_LINEAR);

        return 0;
}




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-09-08 06:29 -------

The original reporter (tim@quitte.de) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, gtk-bugs@gtk.org.

Comment 1 Owen Taylor 2002-09-10 15:06:33 UTC

*** This bug has been marked as a duplicate of 57012 ***