Re: Gtk2::SimpleList crashes



Thierry Vignaud <tvignaud mandriva com> writes:

Gtk-CRITICAL **: gtk_list_store_get_value: assertion `VALID_ITER (iter, list_store)' failed at 
/usr/lib/perl5/vendor_perl/5.10.0/x86_64-linux-thread-multi/Gtk2/SimpleList.pm line 248.

Yep, me too with 2.16.5 and 5.10.0.

I think the way Gtk2::SimpleList::TiedRow::CLEAR() does a $model->clear
invalidates the iters in TiedRow objects in @data.  I suppose

    my @data = @{ $slist->{data} };

is a kind of shallow copy, giving refs to the rows instead of actual
contents, so if the row is deleted then the TiedRow in that @data is no
good.

Perhaps TiedRow might have to use Gtk2::TreeRowReference instead of just
an iter to be safe against its row being deleted (including when all
rows are deleted by ->clear).  It wouldn't make a copy through @data
like this work, but it'd not-work in a better way :-).



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