GNOME Bugzilla – Bug 778535
Using a placeholder in a Gtk::ListBox causes warnings on destruction
Last modified: 2017-04-26 13:52:24 UTC
Created attachment 345579 [details] test case In gtkmm 3.22.2, after using Gtk::ListBox::set_placeholder, destructing the placeholder widget followed by the parent ListBox causes this to be logged: Gtk-CRITICAL **: gtk_container_remove: assertion 'GTK_IS_CONTAINER (container)' failed Destructing the ListBox followed by the placeholder widget instead causes: Gtk-WARNING **: Tried to remove non-child 0x17ea210 (the address may be different). The attached test case reproduces one the Gtk-CRITICAL case, the other case can be reproduced by swapping lines 14 and 15. These can be avoided by calling Gtk::ListBox::unset_placeholder before destroying the Gtk::ListBox or the placeholder widget, however I don't think that should be necessary as there is nothing equivalent required for the Gtk::ListBoxRow children, or the children of most other container widgets.
I have filed gtk+ bug 778617.
The gtk+ bug 778617 has been fixed in the master branch and the gtk-3-22 branch. That fix fixes this bug, too. No more unexpected and unwanted messages from the test case in comment 0.