Hi all:
I'm using the GtkCurce to draw line and each time I run the program I get the following error:
GLib-ERROR **: gmem.c: 135: failed to allocate 4294967276 bytes
aborting...
I'm running GTK 2.6.4 and Glib 2.6.4 on a Debian woody.Here is the code which reproduces the problem:
#include <gtk/gtk.h>
int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *curve;
gfloat points[] = {0, 0, 0.5, 0.5, 1, 1};
gtk_init(&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
curve = gtk_curve_new ();
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
gtk_container_add (GTK_CONTAINER (window), curve);
gtk_widget_show (curve);
gtk_widget_show (window);
gtk_curve_set_range (GTK_CURVE(curve), 0, 1, 0, 1);
gtk_curve_set_vector (GTK_CURVE(curve), 3, points);
gtk_curve_set_curve_type(GTK_CURVE(curve), GTK_CURVE_TYPE_SPLINE);
gtk_main ();
return(0);
}
int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *curve;
gfloat points[] = {0, 0, 0.5, 0.5, 1, 1};
gtk_init(&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
curve = gtk_curve_new ();
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
gtk_container_add (GTK_CONTAINER (window), curve);
gtk_widget_show (curve);
gtk_widget_show (window);
gtk_curve_set_range (GTK_CURVE(curve), 0, 1, 0, 1);
gtk_curve_set_vector (GTK_CURVE(curve), 3, points);
gtk_curve_set_curve_type(GTK_CURVE(curve), GTK_CURVE_TYPE_SPLINE);
gtk_main ();
return(0);
}
I have no idea how to resolve the problem.Any help will be most appreciated.Thanks.
免费试玩2006中国最佳网络游戏--梦幻西游
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list