gtktreeview.c assertion failed

I have a program that's using two Gtk2::TreeViews with a Gtk2::TreeStore
model and when I drag and drop nodes in the tree I'm getting gtk
warnings like this:

Gtk-CRITICAL **: file gtktreeview.c: line 4812 (validate_visible_area):
assertion `has_next' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel.  This generally means that the model has changed
without letting the view know.  Any display from now on is likely to
be incorrect.

The two TreeViews both show views of the same TreeStore and drag'n'drop
is enabled between them. This is to make it easier for users to drag
nodes from one place in the tree to a distant place. The GTK+ Tree and
List Widget Overview specifically says "One of the prime benefits of the
MVC design is that multiple views can be created of a single model". So
I think I'm OK to do this.

This is the code I use to enable drag'n'drop in each TreeView:

    my $target_entry = {
        target  => 'GTK_TREE_MODEL_ROW', # the drag type
        flags   => ['same-app'],# Gtk2::TargetFlags
        info    => 0,           # some app-defined integer identifier



The warning seems to occur if I drag a node that is visible in the other
TreeView, even if I drop the node onto itself (i.e. drag just a few
pixels). The second TreeView updates correctly but I see the warning. If
the node I'm dragging is not visible in the other tree - either because
I've collapsed that part of the tree or because it's scrolled off the
bottom - then I don't get the warning. The warning also doesn't appear
if I enable drag'n'drop using 'same-widget' instead of 'same-app'.

I haven't been able to find any useful links about this problem. Has
anybody seen anything like it before? Or have any idea how to
investigate it? Or work around it?

Thanks, Dave

Perl Gtk2 module version 1.145
Built for gtk+ 2.6.4
Running with gtk+ 2.6.4

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]