Why does gtk_tree_selection_select_iter does not select an item in second level even when iter is valid?
===

I have an application ([sscce][1] code that works [here][2]) with a [`GtkTreeView`][3]. Every time a line is selectd, a callback is invoked. This callback should retrieve the selected row and process its data someway.

My application has to select some lines of this tree view itself sometimes:

    // Selecting a line
    gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model), &iter, "0");
    GtkTreeSelection *selection =
            gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
    gtk_tree_selection_select_iter(selection, &iter);

This works well when I have to select a toplevel line, that is, a line that descends directly from the root. However, if I try to select a child line (e.g. the first child line from the third line) I got an error at the callback function (sscce code [here][4], only change at line 42):

    // Selecting a line
    gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(model), &iter, "2:0");
    GtkTreeSelection *selection =
            gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
    gtk_tree_selection_select_iter(selection, &iter);

The error is the following warning followed by a segfault:

> (treetest:1843): Gtk-CRITICAL **: gtk_tree_store_get_path: assertion `iter->user_data != NULL' failed
> 
> (treetest:1843): Gtk-CRITICAL **: IA__gtk_tree_model_get_string_from_iter: assertion `path != NULL' failed

Also, this error never happens when I select the same line with the mouse.

How could it be? The  selectd path `"2:0"` is valid, but the iter returned from the selection is not. Why?


  [1]: http://sscce.org/
  [2]: http://pastebin.com/cNLQHujY
  [3]: http://developer.gnome.org/gtk/2.24/GtkTreeView.html
  [4]: http://pastebin.com/BG0ztDP7