<div dir="ltr"><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>Hello,<br><br></div>I have written one program and I am seeing the following warning:<br><br>Gtk-CRITICAL **: gtk_widget_draw: assertion '!widget->priv->alloc_needed' failed<br>
<br>program is as follows:<br><br>main()<br>{<br>    GtkDrawingArea *statistics;<br>    cairo_surface_t *surface;<br>    cairo_t *cr;<br>    GtkWindow *main_window;<br><br><br>    gtk_init( NULL, NULL );<br>    statistics = (GtkDrawingArea*)gtk_drawing_area_new();<br>
    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 120, 120);<br>    cr = cairo_create ( surface );<br>    gtk_widget_draw( (GtkWidget*)statistics, cr );<br>    cairo_surface_write_to_png( surface, "one.png" );<br>
    main_window = (GtkWindow*)gtk_window_new(GTK_WINDOW_TOPLEVEL);<br>    g_signal_connect(G_OBJECT(main_window),"destroy",G_CALLBACK(gtk_main_quit),NULL);<br>    gtk_container_add (GTK_CONTAINER (main_window),(GtkWidget*)statistics);<br>
    gtk_widget_show_all((GtkWidget*)main_window);<br><br>    gtk_main();<br>}<br><br></div><div>can some one please tell me the problem in the above program ?<br></div><div dir="ltr"><br clear="all"></div>Thanks & Regards<br>
--<br>Lokesh Chakka,<br>Mobile: 9731023458<br></div></div>
</div>