After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722058 - GtkTreeModelFilter bug
GtkTreeModelFilter bug
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
3.11.x
Other All
: High critical
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2014-01-12 20:08 UTC by andriusr
Modified: 2014-03-27 02:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
treemodelfilter: Fix using wrong path on row-deleted (1.20 KB, patch)
2014-01-16 14:28 UTC, Olivier Brunel (jjacky)
committed Details | Review

Description andriusr 2014-01-12 20:08:28 UTC
In gtk/gtktreemodelfilter.c there is line 2699 of the master:
      real_path = gtk_tree_model_filter_remove_root (c_path,
                                                     filter->priv->root);
This line should be 
      real_path = gtk_tree_model_filter_remove_root (c_path,
                                                     filter->priv->virtual_root);
The string "virtual" was really very virtual :-) 

filter->priv->root is undefined(or might be undefined) at the time of calling gtk_tree_model_filter_remove_root(), so it defaults to random large number. When it is positive, everything works somehow, when it is negative, then we have crash... usually. I am having this issue on MacOSX, however, it should cause problems also on other platforms.
Andrius
Comment 1 Olivier Sessink 2014-01-15 15:34:04 UTC
This can sometimes be reproduced in bluefish, indeed during delete on a row in the underlying treestore. Causes a segfault, so 'critical' in my opinion.
Comment 2 Olivier Brunel (jjacky) 2014-01-16 14:28:56 UTC
Created attachment 266473 [details] [review]
treemodelfilter: Fix using wrong path on row-deleted

A "typo" led to using a wrong GtkTreePath when converting the path of the
virtual root to check the ancestors, which would lead to either no checks being
performed, or maybe segfaulting when using an invalid path as result.
Comment 3 Emmanuele Bassi (:ebassi) 2014-03-22 10:09:41 UTC
Review of attachment 266473 [details] [review]:

looks okay; it would be great to have a test case for the GtkTreeModelFilter that allows us to catch regressions of this type.
Comment 4 Matthias Clasen 2014-03-24 16:38:31 UTC
I'm going to leave this until after .0 at this point
Comment 5 Matthias Clasen 2014-03-27 02:26:07 UTC
Attachment 266473 [details] pushed as 5c019bd - treemodelfilter: Fix using wrong path on row-deleted