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.


In reply to Memory error with Gtk3 IconViews by David B.

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.