So - I have a treeview, initially empty. I am using the code below as 
part of a function to find out what items are visible. Once any items 
are added to the list it goes bad (usually - sometimes it works fine)


//I bet we don't need to initialise these - in fact I bet we leak this
//way - but it is better than having the answer be "you didn't
//initialise them" again

GtkTreePath* s=gtk_tree_path_new();     
GtkTreePath* e=gtk_tree_path_new();

std::cout<<"a\n";
if(gtk_tree_view_get_visible_range(ptreeview,&s,&e)==FALSE)
{
        std::cout<<"b\n";
        return false;
}
std::cout<<"c\n";

a
b
a

(gladeplayer:5784): Gtk-CRITICAL **: _gtk_tree_view_find_path: assertion 
`node != NULL' failed

(gladeplayer:5784): Gtk-CRITICAL **: _gtk_tree_view_find_path: assertion 
`node != NULL' failed

(gladeplayer:5784): Gtk-CRITICAL **: gtk_tree_model_get_iter: assertion 
`path->depth > 0' failed


Here we see one call when there was nothing in the list - returned false 
which is fine. Then added some stuff to the list - assertions that you 
see here - rest of the program continues to act fine (list is still fine).

What are these errors about? I hope they aren't the fault of anything I 
do here. What could I possibly be doing elsewhere (the adding stuff to 
the list code) that would only show up here?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to