GNOME Bugzilla – Bug 765649
icons missing in file chooser (errors on console)
Last modified: 2016-09-26 21:25:22 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
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.
Created attachment 326904 [details] [review] iconhelper: check if surface was invalidated
The above patch just fixes the critical, fwiw.
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 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*.
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
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.
Any update on a proper fix for this problem?
This happens on Linux as well (Nautilus list view).
(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.
+ Trace 236525
This issue affects us on Endless with GTK 3.20 on Linux and ARM.
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
Attachment 336299 [details] pushed as fa23641 - _gtk_icon_helper_draw: get style earlier Pushed this to master after Benjamin ack-ed it on IRC.