Closed Wh1teDuke closed 1 year ago
I join the question
I found the explanation here: https://stackoverflow.com/questions/31276404/gtk2-error-gtk-is-container-gtk-is-widget-failed
In short: Calling gtk_container_remove
will decrease the refcount and in our case destroy the widget because the refcount reached 0. The solution is to increase the refcount by calling g_object_ref
.
Sorry to bother you again, but I run into a different issue:
Once the timer kicks in, no label will appear on screen, don't know if I'm doing something wrong. This is what the terminal displays:
(test:3376): Gtk-CRITICAL **: gtk_widget_create_pango_layout: assertion 'GTK_IS_WIDGET (widget)' failed
(test:3376): Pango-CRITICAL **: pango_layout_get_extents_internal: assertion 'layout != NULL' failed