-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
This is my source code:
`static void destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit();
}
int main(int argc, char *argv[])
{
gtk_init(&argc, &argv);
GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(window), 200, 200);
g_signal_connect(window, "destroy", G_CALLBACK(destroy), NULL);
GtkWidget *window_box = gtk_box_new (GTK_ORIENTATION_VERTICAL,3);
GtkWidget *scrolled_window = gtk_scrolled_window_new(NULL, NULL);
gtk_container_add (GTK_CONTAINER (window), window_box);
gtk_box_pack_start (GTK_BOX (window_box), scrolled_window, 1,1,1);
GtkSheet *sheet = (GtkSheet *)gtk_sheet_new(3,11,"Edit table");
GTK_SHEET_AUTORESIZE(sheet);
gtk_container_add(GTK_CONTAINER(scrolled_window), (GtkWidget *)sheet);
gtk_sheet_show_grid(sheet, TRUE);
gtk_widget_show_all(window);
gtk_main();
return 0;
}
`
After installing gtksheet i did the following:
gcc -g -O0
This happened when i closed the windowt:
(a.out:114519): GLib-GObject-CRITICAL **: 20:12:57.178: g_object_ref: assertion 'old_val > 0' failed
Segmentation fault (core dumped)
Same thing when i started the test:
cd ~/gtksheet-4.3.12/gtksheet ; ./testgtksheet
(testgtksheet:115066): GLib-GObject-CRITICAL **: 20:50:19.657: g_object_ref: assertion 'old_val > 0' failed
Segmentation fault (core dumped)
Why ... ?
What did i do wrong ?
Metadata
Metadata
Assignees
Labels
No labels