Bug 88813 - pavucontrol crashes on startup, if icon loading fails
Summary: pavucontrol crashes on startup, if icon loading fails
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: pavucontrol (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-26 22:30 UTC by Martin Steghöfer
Modified: 2015-02-16 11:18 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch that extends the fallback behaviour on failed icon loading to exceptions of type "Gdk::PixbufError" (379 bytes, text/plain)
2015-01-26 22:30 UTC, Martin Steghöfer
Details

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.