[Glade-users] Gtk Curve problem



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);
}

 
I have no idea how to resolve the problem.Any help will be most appreciated.Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20070508/819cbe6d/attachment.html 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]