David B. has asked for the wisdom of the Perl Monks concerning the following question:
Greetings, monks. I am a novice in both Perl and Gtk, so forgive my ignorance.
I came here to seek help with a strange behaviour of Gtk3 IconViews. Basically, every now and then, my script crashes when I either hide() or destroy() a GtkIconView, with the following error code:
***MEMORY-ERROR***: menu.pl[4944]: GSlice: assertion failed: sinfo->n_ +allocated > 0 Abandon (core dumped)
Here is how the IconViews are generated:
my $model = Gtk3::ListStore->new('Gtk3::Gdk::Pixbuf','Glib::String +'); foreach my $vu (sort @bibliolist) { my $pixbuf = undef; if ( -f "$path/Miniatures/$vu.jpg" ){ $pixbuf = Gtk3::Gdk::Pixbuf->new_from_file("$path/Miniatur +es/$vu.jpg"); } else { $pixbuf = Gtk3::Gdk::Pixbuf->new_from_file("$path/Interfac +e/noimage.jpg"); } my $iter = $model->append; $model->set($iter,0,$pixbuf,1,"$vu"); } my $view = Gtk3::IconView->new_with_model($model); $view->set_property('name','mlist'); $view->set_selection_mode('single'); $view->set_pixbuf_column(0); $view->set_text_column(1); $view->set_columns(-1); $view->set_item_width(110); $view->show(); $selectbiblio->add($view);
Is there anything I'm missing? I have to admit I'm completely lost there...
Thanks in advance for your help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Memory error with Gtk3 IconViews
by zentara (Cardinal) on Aug 14, 2012 at 16:53 UTC |