After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 760151 - Should fall back to built-in format sniffing if gio sniffing fails
Should fall back to built-in format sniffing if gio sniffing fails
Status: RESOLVED WONTFIX
Product: gdk-pixbuf
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2016-01-05 10:45 UTC by Uli Schlachter
Modified: 2016-01-15 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (2.52 KB, patch)
2016-01-05 10:45 UTC, Uli Schlachter
none Details | Review

Description Uli Schlachter 2016-01-05 10:45:55 UTC
Created attachment 318248 [details] [review]
Proposed patch

If for whatever reason g_content_type_guess() fails to detect the file type, gdk-pixbuf should retry with its builtin file type detection instead of giving up and failing to load a file. This is implemented in the proposed patch.

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790423 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801170 for what this wants to fix. The problem in the above cases is that the mime type database in /usr/share/mime/mime.cache is not available which makes all image loading fail.
Comment 1 Uli Schlachter 2016-01-15 13:00:37 UTC
According to #gtk+, this code should be removed rather than its use extended:

<mclasen> if you ask me, 'the mime database is not available' is a case of broken installation
<mclasen> not something to work around with fallbacks
<psychon> Then why does gdk-pixbuf implement these fallbacks at all? Would a patch removing all of that code be accepted?
<mclasen> when the gio support was added, there was no mimetype detection at all in gio for windows or os x
<psychon> so historically it was needed and can be removed now, right?
<mclasen> I think gio still doesn't do any mime detection on os x
<psychon> hm, ok... so my patch is a step in the wrong direction and its bug should be closed