GNOME Bugzilla – Bug 742656
Crash when setting background
Last modified: 2015-01-21 08:36:45 UTC
Created attachment 294170 [details] [review] check if icon_info is NULL Hi, when I run gnome-control-center, click on Background and then click on either Background or Lock Screen to change the picture, I get: (gnome-control-center:3758): Gtk-CRITICAL **: gtk_icon_info_load_icon: assertion 'icon_info != NULL' failed zsh: segmentation fault (core dumped) /usr/bin/gnome-control-center Looking into code (get_emblemed_pixbuf in panels/background/cc-background-item.c) there is: icon_info = gtk_icon_theme_lookup_by_gicon_for_scale(...) gtk_icon_info_load_icon(icon_info, ...) where the gtk_icon_theme_lookup_by_gicon_for_scale returns NULL so gtk_icon_info_load_icon causes crash. Attached patch works for me, but I don't know if it is the right way how to fix it. Regards, Marek
Review of attachment 294170 [details] [review]: Looks like your icon theme is missing the slideshow-emblem icon. Are you not using the default icon theme? The code in itself looks good, thanks for the patch. ::: panels/background/cc-background-item.c @@ +114,3 @@ GTK_ICON_LOOKUP_USE_BUILTIN); + if (!icon_info) { + g_warning ("Failed to load information about icon"); Add the icon name in the warning. It would be easier to mention: "Your icon theme is missing the slideshow-emblem icon, please file a bug against it"
Created attachment 294874 [details] [review] background: Fix crash when choosing background due to missing icon Address Bastien's comments and add the bugzilla URL to the commit message.
Review of attachment 294874 [details] [review]: Looks good.
Comment on attachment 294874 [details] [review] background: Fix crash when choosing background due to missing icon Thanks for the review, Bastien. Pushed to master and gnome-3-14.
Hi, thanks Debarshi for the patch, I was slowly getting to it, but you were faster :)