GNOME Bugzilla – Bug 464173
Critical warning on gtk_tree_model_filter_refilter and an invisible level
Last modified: 2009-09-05 15:27:57 UTC
Please see the following test case. Gtk-CRITICAL **: gtk_tree_model_row_has_child_toggled: assertion `path != NULL' failed will be printed to the terminal.
Created attachment 93178 [details] test case
I see this too, when filtering a model down to no rows displayed.
Created attachment 99616 [details] [review] Do not emit child_toggled with !level->parent_elt->visible Please consider this patch. I hope that it does not break more than it helps.
Can we mark this bug as confirmed.. it is still present right up to the latest GTK release - and there is a patch here... Has anyone got the time to review it?
This happens in seahorse when the user types the 'filter' box near the top. When trying to fix this problem, I came to the same conclusion as the patch.
*** Bug 544794 has been marked as a duplicate of this bug. ***
Bug 544794 has an alternate patch, but the patch here looks like it solves the problem in a better manner.
I am working on an extensive GtkTreeModelFilter unit test suite now and I have added a test for this bug using the test case in comment 1. This test suite will (finally) help us see whether a patch does not break more than it helps ;) I will be finishing the first work on the test case soon and then move on with fixing the current bugs reported in Bugzilla.
Fixed on master. The correct fix is similar to what Andreas posted in comment 3, but it needs to check all parents of a certain level, not just the direct parent.