Comment 3 for bug 1003911

Revision history for this message
Pim Vullers (pimvullers) wrote :

I investigated this a bit, and it seemed nautilus also suffered from this (see http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/gnome-base/nautilus/files/nautilus-3.0.2-segfault-in-gtk_icon_info_load_symbolic.patch). Building audience with debug showed that the NULL pointer is passed in Widgets/Button.vala:36.

When I modify that piece to:
                if (l != null) {
                    this.set_from_pixbuf (l.load_symbolic ({1.0,1.0,1.0,1.0}, null, null, null, null));
                } else {
                    warning("NULL detected when trying to load icon: " + icon + " (or " + fallback + ")");
                }

Running audience with these lines does no longer segfault, however, it prints the following message:
[WARN 22:03:25.452287] [Button:39] NULL detected when trying to load icon: view-restore-symbolic (or gtk-leave-fullscreen)

I've got this icon available at /usr/share/icons/gnome/scalable/actions/view-restore-symbolic.svg (it's not in elementary theme neither is the fallback, which is again available in gnome).

So this is kind of a theming issue, but with such checks for null we can prevent crashes. We only need to think about what to do when the icon is not available.