GNOME Bugzilla – Bug 783534
Show error message when fail to load placeholder icon
Last modified: 2017-06-08 21:25:37 UTC
Created attachment 353366 [details] [review] iconhelper: Show error if fail to load placeholder icon In GtkIconHelper ensure_surface_for_gicon() gives a vague error message if it fails to load the placeholder icon. Attached patch shows the GError that causes the failure.
Original error message: Gtk:ERROR:gtkiconhelper.c:493:ensure_surface_for_gicon: assertion failed: (destination) Message after patch: Gtk:ERROR:gtkiconhelper.c:495:ensure_surface_for_gicon: assertion failed (error == NULL): Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Created attachment 353367 [details] [review] icon-theme: Show filename attempted when icon fails to load Additional patch that shows the filename attempted: Gtk:ERROR:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /org/gtk/libgtk/icons/16x16/status/image-missing.png: Unrecognized image file format (gdk-pixbuf-error-quark, 3)
Review of attachment 353366 [details] [review]: sure
Review of attachment 353367 [details] [review]: ::: gtk/gtkicontheme.c @@ +2308,3 @@ pixbuf = gtk_icon_info_load_icon (icon_info, error); + if (error) + g_prefix_error (error, "Failed to load %s: ", icon_info->filename); g_prefix_error is NULL-safe, no need for the if