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 765649 - icons missing in file chooser (errors on console)
icons missing in file chooser (errors on console)
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
3.20.x
Other Mac OS
: Normal major
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on:
Blocks:
 
 
Reported: 2016-04-27 03:43 UTC by draymond
Modified: 2016-09-26 21:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
iconhelper: check if surface was invalidated (1.52 KB, patch)
2016-04-27 23:54 UTC, Christian Hergert
none Details | Review
iconhelper: avoid surface invalidation during render (1.43 KB, patch)
2016-04-28 00:11 UTC, Christian Hergert
none Details | Review
_gtk_icon_helper_draw: get style earlier (1.60 KB, patch)
2016-09-26 20:07 UTC, Cosimo Cecchi
committed Details | Review

Description draymond 2016-04-27 03:43:19 UTC
After upgrading from 3.16.2 to 3.20.3 I am experiencing the following regression when opening a file chooser dialog:

1) file icons are not displayed
2) the following error appears repeatedly in the console:

Gtk-CRITICAL **: gtk_css_style_render_icon_surface: assertion 'surface != NULL' failed
Comment 1 su-v 2016-04-27 09:22:19 UTC
Reproduced after upgrading GTK+/Quartz from 3.18.8 to 3.20.3 on OS X 10.7, for example with the file chooser dialog from 'gtk3-demo > Pickers > File'. The drop-down menu of 'gtk3-demo > Pickers > Folders' is also not displaying folder icons except for the currently highlighted menu item.

The Adwaita icon theme is installed, and icons are correctly displayed elsewhere in the gtk3-demo examples (e.g. Tool Palette), in gtk3-widget-factory (e.g. the icons on the toolbar on Page 2; and all symbolic icons) and in gtk3-icon-browser.
Comment 2 Christian Hergert 2016-04-27 23:54:44 UTC
Created attachment 326904 [details] [review]
iconhelper: check if surface was invalidated
Comment 3 Christian Hergert 2016-04-27 23:55:25 UTC
The above patch just fixes the critical, fwiw.
Comment 4 Christian Hergert 2016-04-28 00:11:53 UTC
Created attachment 326905 [details] [review]
iconhelper: avoid surface invalidation during render

Looks like we can avoid invalidating altogether in this path.

Definitely need an ack from Company on this though.
Comment 5 Christian Hergert 2016-04-28 00:47:57 UTC
Comment on attachment 326905 [details] [review]
iconhelper: avoid surface invalidation during render

Warning is fixed in master. However, it looks like we might have some invalidation issues lower down. Definitely seems OSX specific *somewhere*.
Comment 6 David Evans 2016-05-03 16:49:57 UTC
I can reproduce this issue using gtk3-demo from GTK+/X11 3.20.3, 3.21.1 on MacPorts so perhaps not Quartz specific.  iconhelper patch has now been reverted in master so I guess that didn't fly.

See also related MacPorts ticket https://trac.macports.org/ticket/51296
Comment 7 Christian Hergert 2016-05-03 17:34:29 UTC
I reverted the patch on master because it broke GtkFileChooserButton (and presumably other comboboxes).

Patch #326905 might work in the meantime if you need a hotfix for macports.
Comment 8 David Evans 2016-08-01 06:59:15 UTC
Any update on a proper fix for this problem?
Comment 9 Ernestas Kulik 2016-08-13 05:38:46 UTC
This happens on Linux as well (Nautilus list view).
Comment 10 Ernestas Kulik 2016-08-13 05:47:05 UTC
(In reply to Ernestas Kulik from comment #9)
> This happens on Linux as well (Nautilus list view).

Though I have to mention that I can only reproduce with GTK+ master.

  • #0 _g_log_abort
    at /home/ernestas/jhbuild/checkout/glib/glib/gmessages.c line 461
  • #1 g_logv
    at /home/ernestas/jhbuild/checkout/glib/glib/gmessages.c line 1253
  • #2 g_log
    at /home/ernestas/jhbuild/checkout/glib/glib/gmessages.c line 1291
  • #3 g_return_if_fail_warning
    at /home/ernestas/jhbuild/checkout/glib/glib/gmessages.c line 2297
  • #4 gtk_css_style_render_icon_surface
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkrendericon.c line 111
  • #5 _gtk_icon_helper_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkiconhelper.c line 899
  • #6 gtk_cell_renderer_pixbuf_render
  • #7 gtk_cell_renderer_render
  • #8 render_cell
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcellarea.c line 1147
  • #9 gtk_cell_area_box_foreach_alloc
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcellareabox.c line 1291
  • #10 gtk_cell_area_foreach_alloc
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcellarea.c line 1760
  • #11 gtk_cell_area_real_render
  • #12 gtk_cell_area_render
  • #13 _gtk_tree_view_column_cell_render
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtktreeviewcolumn.c line 2909
  • #14 gtk_tree_view_bin_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtktreeview.c line 5328
  • #15 draw_bin
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtktreeview.c line 5609
  • #16 _gtk_pixel_cache_repaint
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkpixelcache.c line 357
  • #17 _gtk_pixel_cache_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkpixelcache.c line 447
  • #18 gtk_tree_view_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtktreeview.c line 5652
  • #19 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #20 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #21 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #22 gtk_scrolled_window_render
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkscrolledwindow.c line 2043
  • #23 gtk_css_custom_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcsscustomgadget.c line 159
  • #24 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #25 gtk_scrolled_window_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkscrolledwindow.c line 2940
  • #26 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #27 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #28 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #29 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #30 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #31 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #32 gtk_grid_render
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkgrid.c line 1716
  • #33 gtk_css_custom_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcsscustomgadget.c line 159
  • #34 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #35 gtk_grid_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkgrid.c line 1725
  • #36 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #37 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #38 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #39 gtk_box_draw_contents
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkbox.c line 448
  • #40 gtk_css_custom_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcsscustomgadget.c line 159
  • #41 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #42 gtk_box_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkbox.c line 457
  • #43 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #44 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #45 gtk_notebook_draw_stack
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtknotebook.c line 2511
  • #46 gtk_css_custom_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcsscustomgadget.c line 159
  • #47 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #48 gtk_box_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkboxgadget.c line 512
  • #49 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #50 gtk_notebook_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtknotebook.c line 2526
  • #51 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #52 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #53 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #54 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #55 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #56 gtk_paned_render
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkpaned.c line 1832
  • #57 gtk_css_custom_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcsscustomgadget.c line 159
  • #58 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #59 gtk_paned_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkpaned.c line 1782
  • #60 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #61 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #62 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #63 gtk_grid_render
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkgrid.c line 1716
  • #64 gtk_css_custom_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcsscustomgadget.c line 159
  • #65 gtk_css_gadget_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcssgadget.c line 877
  • #66 gtk_grid_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkgrid.c line 1725
  • #67 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #68 gtk_container_propagate_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3838
  • #69 gtk_container_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkcontainer.c line 3658
  • #70 gtk_window_draw
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwindow.c line 10180
  • #71 gtk_widget_draw_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 7015
  • #72 gtk_widget_render
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkwidget.c line 17488
  • #73 gtk_main_do_event
    at /home/ernestas/jhbuild/checkout/gtk+/gtk/gtkmain.c line 1807
  • #74 _gdk_event_emit
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkevents.c line 73
  • #75 _gdk_window_process_updates_recurse_helper
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkwindow.c line 3829
  • #76 _gdk_window_process_updates_recurse
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkwindow.c line 3886
  • #77 gdk_window_impl_process_updates_recurse
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkwindowimpl.c line 298
  • #78 gdk_window_process_updates_internal
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkwindow.c line 3975
  • #79 gdk_window_process_updates_with_mode
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkwindow.c line 4172
  • #80 gdk_window_paint_on_clock
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkwindow.c line 11641
  • #81 g_cclosure_marshal_VOID__VOIDv
    at /home/ernestas/jhbuild/checkout/glib/gobject/gmarshal.c line 905
  • #82 _g_closure_invoke_va
    at /home/ernestas/jhbuild/checkout/glib/gobject/gclosure.c line 867
  • #83 g_signal_emit_valist
    at /home/ernestas/jhbuild/checkout/glib/gobject/gsignal.c line 3294
  • #84 g_signal_emit
    at /home/ernestas/jhbuild/checkout/glib/gobject/gsignal.c line 3441
  • #85 _gdk_frame_clock_emit_paint
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkframeclock.c line 640
  • #86 gdk_frame_clock_paint_idle
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdkframeclockidle.c line 430
  • #87 gdk_threads_dispatch
    at /home/ernestas/jhbuild/checkout/gtk+/gdk/gdk.c line 743
  • #88 g_timeout_dispatch
    at /home/ernestas/jhbuild/checkout/glib/glib/gmain.c line 4672
  • #89 g_main_dispatch
    at /home/ernestas/jhbuild/checkout/glib/glib/gmain.c line 3201
  • #90 g_main_context_dispatch
    at /home/ernestas/jhbuild/checkout/glib/glib/gmain.c line 3854
  • #91 g_main_context_iterate
    at /home/ernestas/jhbuild/checkout/glib/glib/gmain.c line 3927
  • #92 g_main_context_iteration
    at /home/ernestas/jhbuild/checkout/glib/glib/gmain.c line 3988
  • #93 g_application_run
    at /home/ernestas/jhbuild/checkout/glib/gio/gapplication.c line 2381
  • #94 main
    at /home/ernestas/jhbuild/checkout/nautilus/src/nautilus-main.c line 100

Comment 11 Cosimo Cecchi 2016-09-26 18:33:59 UTC
This issue affects us on Endless with GTK 3.20 on Linux and ARM.
Comment 12 Cosimo Cecchi 2016-09-26 20:07:29 UTC
Created attachment 336299 [details] [review]
_gtk_icon_helper_draw: get style earlier

After checking for rendered_surface, the call to gtk_css_node_get_style
can invalidate the style and result in rendered_surface being set to
NULL. This was result in some icon views appearing blank on
Endless OS on armv7hl, and this error:

Gtk-CRITICAL **: gtk_css_style_render_icon_surface: assertion 'surface != NULL' failed

Call gtk_css_node_get_style earlier to ensure we always pass a valid
surface to gtk_css_style_render_icon_surface.

https://bugzilla.gnome.org/show_bug.cgi?id=765649
https://phabricator.endlessm.com/T13524
Comment 13 Cosimo Cecchi 2016-09-26 21:25:19 UTC
Attachment 336299 [details] pushed as fa23641 - _gtk_icon_helper_draw: get style earlier

Pushed this to master after Benjamin ack-ed it on IRC.