After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608609 - GtkIconView: Gtk-CRITICAL with set_text_column
GtkIconView: Gtk-CRITICAL with set_text_column
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkIconView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-01-31 18:01 UTC by Sébastien Wilmet
Modified: 2012-07-04 19:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A test program (1.55 KB, text/plain)
2010-01-31 18:01 UTC, Sébastien Wilmet
Details

Description Sébastien Wilmet 2010-01-31 18:01:56 UTC
Created attachment 152688 [details]
A test program

If gtk_icon_view_set_text_column() is called a first time in a function which creates and returns a new GtkIconView, and if gtk_icon_view_set_text_column() is called again with the value -1 so only icons are displayed (no text), this error message appears:

Gtk-CRITICAL **: gtk_icon_view_get_cell_area: assertion `info->position < item->n_cells' failed

Because it's clearer with an example, in the test program (see the attachment), we have the function create_icon_view() which contains the line:

    gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), COL_TEXT);

And in main(), we have:

    GtkWidget *icon_view = create_icon_view (store);
    gtk_icon_view_set_text_column (GTK_ICON_VIEW (icon_view), -1);

This problem can be easily avoid if we set the text column only when needed. But it's problematic if we want to dynamically change this property.
Comment 1 Sébastien Wilmet 2012-07-04 19:22:36 UTC
This is now fixed.