GNOME Bugzilla – Bug 646250
crash if background xml data are invalid
Last modified: 2011-03-31 12:09:01 UTC
We noticed a crash in background panel if one of the xml background file contains incorrect enumeration data (typo in one of our files) : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd"> <wallpapers> <wallpaper deleted="false"> <name>Default Background</name> <filename>/usr/share/themes/Adwaita/backgrounds/stripes.jpg</filename> <options>zoom</options> <shade_type>veritcal-gradient</shade_type> <pcolor>#3465a4</pcolor> </wallpaper> </wallpapers> and background panel will crash : $ gnome-control-center background (gnome-control-center:24250): background-cc-panel-WARNING **: Unhandled value 'veritcal-gradient' for enum 'GDesktopBackgroundShading' ** background-cc-panel:ERROR:cc-background-xml.c:109:enum_string_to_value: code should not be reached Aborted
Well, it doesn't crash, it aborts. I agree that it shouldn't abort though. I'll fix this post-3.0.
Created attachment 184725 [details] [review] background: Don't assert() for typos in XML files
Attachment 184725 [details] pushed as e46c326 - background: Don't assert() for typos in XML files