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 663138 - iconview: layout items immediately when setting a GtkTreeModel
iconview: layout items immediately when setting a GtkTreeModel
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkIconView
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2011-11-01 00:42 UTC by Cosimo Cecchi
Modified: 2011-11-16 22:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
iconview: layout items immediately when setting a GtkTreeModel (1.00 KB, patch)
2011-11-01 00:42 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2011-11-01 00:42:40 UTC
See attached patch for the rationale.
(Note that for some reason this only happens with a combination of setting the model property late after construction and using GtkClutter)
Comment 1 Cosimo Cecchi 2011-11-01 00:42:42 UTC
Created attachment 200374 [details] [review]
iconview: layout items immediately when setting a GtkTreeModel

As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.
Comment 2 Cosimo Cecchi 2011-11-01 15:16:27 UTC
Attachment 200374 [details] pushed as d808dac - iconview: layout items immediately when setting a GtkTreeModel

Pushed after Matthias' ack.
Comment 3 Ionut Biru 2011-11-13 15:17:42 UTC
this commit crashes lxappearance



Program received signal SIGSEGV, Segmentation fault.
0xb7c0a76d in gtk_icon_view_layout_single_row (icon_view=0x813d018, first_item=0x812e000, item_width=12, row=0, y=0xbfffd390, maximum_width=0xbfffd394) at gtkiconview.c:2749
2749		max_height[i] = MAX (max_height[i], item->box[i].height);
(gdb) bt full
  • #0 gtk_icon_view_layout_single_row
    at gtkiconview.c line 2749
  • #1 gtk_icon_view_layout
    at gtkiconview.c line 2855
  • #2 gtk_icon_view_size_allocate
    at gtkiconview.c line 1507
  • #3 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #4 ??
    from /usr/lib/libgobject-2.0.so.0
  • #5 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #8 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #9 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #10 gtk_scrolled_window_size_allocate
    at gtkscrolledwindow.c line 1436
  • #11 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #12 ??
    from /usr/lib/libgobject-2.0.so.0
  • #13 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #14 ??
    from /usr/lib/libgobject-2.0.so.0
  • #15 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #17 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #18 gtk_box_size_allocate
    at gtkbox.c line 500
  • #19 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #20 ??
    from /usr/lib/libgobject-2.0.so.0
  • #21 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #22 ??
    from /usr/lib/libgobject-2.0.so.0
  • #23 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #24 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #25 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #26 gtk_box_size_allocate
    at gtkbox.c line 500
  • #27 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #28 ??
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #30 ??
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #33 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #34 gtk_box_size_allocate
    at gtkbox.c line 500
  • #35 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #36 ??
    from /usr/lib/libgobject-2.0.so.0
  • #37 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #38 ??
    from /usr/lib/libgobject-2.0.so.0
  • #39 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #40 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #41 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #42 gtk_notebook_size_allocate
    at gtknotebook.c line 2296
  • #43 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #44 ??
    from /usr/lib/libgobject-2.0.so.0
  • #45 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #46 ??
    from /usr/lib/libgobject-2.0.so.0
  • #47 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #48 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #49 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #50 gtk_box_size_allocate
    at gtkbox.c line 500
  • #51 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #52 ??
    from /usr/lib/libgobject-2.0.so.0
  • #53 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #54 ??
    from /usr/lib/libgobject-2.0.so.0
  • #55 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #56 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #57 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #58 gtk_window_size_allocate
    at gtkwindow.c line 4994
  • #59 g_cclosure_marshal_VOID__BOXED
    from /usr/lib/libgobject-2.0.so.0
  • #60 ??
    from /usr/lib/libgobject-2.0.so.0
  • #61 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #62 ??
    from /usr/lib/libgobject-2.0.so.0
  • #63 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #64 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #65 IA__gtk_widget_size_allocate
    at gtkwidget.c line 4089
  • #66 gtk_window_show
    at gtkwindow.c line 4526
  • #67 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #68 ??
    from /usr/lib/libgobject-2.0.so.0
  • #69 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #70 ??
    from /usr/lib/libgobject-2.0.so.0
  • #71 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #72 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #73 IA__gtk_widget_show
    at gtkwidget.c line 3210
  • #74 IA__gtk_window_present_with_time
    at gtkwindow.c line 6820
  • #75 IA__gtk_window_present
    at gtkwindow.c line 6772
  • #76 main
    at lxappearance.c line 465

Comment 4 Cosimo Cecchi 2011-11-16 22:50:10 UTC
The commit just isn't right for the 2.24 branch; I reverted it now.

http://git.gnome.org/browse/gtk+/commit/?h=gtk-2-24&id=5c3bb1839cac52828756f9ddb98f49d586853991