Bug 88813

Summary: pavucontrol crashes on startup, if icon loading fails
Product: PulseAudio Reporter: Martin Steghöfer <martin>
Component: pavucontrolAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart, martin
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch that extends the fallback behaviour on failed icon loading to exceptions of type "Gdk::PixbufError"

Description Martin Steghöfer 2015-01-26 22:30:54 UTC
Created attachment 112862 [details]
Patch that extends the fallback behaviour on failed icon loading to exceptions of type "Gdk::PixbufError"

Due to another bug [1] the MIME type guessing of PNG files was broken on my Ubuntu system. This made pavucontrol crash on startup (while loading the necessary icons) without a helpful error message (requiring a lot of debugging effort). Although this is not originally pavucontrol's fault, I think that pavucontrol could be more robust about such a problem, especially because: A) In a complex database like the one to guess MIME types (that is populated from hundres of different packages) this can happen from time to time and B) pavucontrol already has some fallback options in place - they are just not active in this specific case.

Specifically, the function "set_icon_name_fallback" already catches several exceptions ("Gtk::IconThemeError" and "Gio::Error") about failed loading of icons and falls back to just setting the name and using a default icon. I think it's in the spirit of that code to extend that behaviour to the additional exception type "Gdk::PixbufError", which is the exception that is thrown, if an icon cannot be loaded due to broken MIME type guessing. Find a patch attached that implements this.
Comment 1 Martin Steghöfer 2015-01-26 22:32:00 UTC
Forgot to include the reference:

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776326
Comment 2 David Henningsson 2015-02-16 10:32:08 UTC
Thanks for the patch! I have committed it now.
Comment 3 Martin Steghöfer 2015-02-16 11:18:23 UTC
Great, thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.