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 778451 - Thumbnailer's mime-types are (nearly) empty
Thumbnailer's mime-types are (nearly) empty
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2017-02-10 13:29 UTC by Felipe Borges
Modified: 2017-02-12 19:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gnome_desktop_thumbnail_factory_generate_thumbnail.test.c (3.18 KB, text/x-csrc)
2017-02-12 14:35 UTC, Felipe Borges
Details

Description Felipe Borges 2017-02-10 13:29:14 UTC
gnome-control-center/user-accounts uses gnome_desktop_thumbnail_factory_generate_thumbnail in its user photo file chooser dialog previewer.

Due to the recent improvements in gnome-desktop and GdkPixbuf, gnome_desktop_thumbnail_factory_generate_thumbnail is no longer returning pixbuf for uri's which it used to work before.

We have a workaround for it in control-center: Bug 778424.

Let me know how I can provide more and better debug information related to this.
Comment 1 Bastien Nocera 2017-02-10 13:55:44 UTC
Can you please create a test case? Thanks.
Comment 2 Felipe Borges 2017-02-12 14:35:07 UTC
Created attachment 345574 [details]
gnome_desktop_thumbnail_factory_generate_thumbnail.test.c

(In reply to Bastien Nocera from comment #1)
> Can you please create a test case? Thanks.

sure.
Comment 3 Bastien Nocera 2017-02-12 16:14:33 UTC
(In reply to Felipe Borges from comment #2)
> Created attachment 345574 [details]
> gnome_desktop_thumbnail_factory_generate_thumbnail.test.c
> 
> (In reply to Bastien Nocera from comment #1)
> > Can you please create a test case? Thanks.
> 
> sure.

Did you by any chance not install a newer gdk-pixbuf as well? No new gdk-pixbuf -> no image thumbnailer -> no pixbuf, no preview.
Comment 4 Bastien Nocera 2017-02-12 16:52:19 UTC
No, bug in gdk-pixbuf which generates broken mime-types for the thumbnailer:
$ cat /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer 
[Thumbnailer Entry]
TryExec=/usr/bin/gdk-pixbuf-thumbnailer
Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
MimeType=image/png;

I'm guessing that PNGs work, right?
Comment 5 Felipe Borges 2017-02-12 17:00:11 UTC
(In reply to Bastien Nocera from comment #4)
> No, bug in gdk-pixbuf which generates broken mime-types for the thumbnailer:
> $ cat /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer 
> [Thumbnailer Entry]
> TryExec=/usr/bin/gdk-pixbuf-thumbnailer
> Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
> MimeType=image/png;
> 
> I'm guessing that PNGs work, right?

I don't think so.
Comment 6 Bastien Nocera 2017-02-12 17:10:09 UTC
What's in your gdk-pixbuf-thumbnailer.thumbnailer (both jhbuild and system ones)?
Comment 7 Felipe Borges 2017-02-12 17:56:59 UTC
(In reply to Bastien Nocera from comment #6)
> What's in your gdk-pixbuf-thumbnailer.thumbnailer (both jhbuild and system
> ones)?

cat /usr/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer

 [Thumbnailer Entry]
 TryExec=/usr/bin/gdk-pixbuf-thumbnailer
 Exec=/usr/bin/gdk-pixbuf-thumbnailer -s %s %u %o
 MimeType=image/png;

cat /home/fborges/jhbuild/install/share/thumbnailers/gdk-pixbuf-thumbnailer.thumbnailer

 [Thumbnailer Entry]
 TryExec=/home/fborges/jhbuild/install/bin/gdk-pixbuf-thumbnailer
 Exec=/home/fborges/jhbuild/install/bin/gdk-pixbuf-thumbnailer -s %s %u %o
 MimeType=image/x-icon;image/x-ico;image/x-win-bitmap;image/vnd.microsoft.icon;application/ico;image/ico;image/icon;text/ico;image/x-xbitmap;image/x-quicktime;image/qtif;image/png;image/tiff;image/svg+xml;image/svg;image/svg-xml;image/vnd.adobe.svg+xml;text/xml-svg;image/svg+xml-compressed;image/jpeg;image/x-icns;image/x-tga;application/x-navi-animation;image/bmp;image/x-bmp;image/x-MS-bmp;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/gif;image/x-xpixmap;
Comment 8 Bastien Nocera 2017-02-12 19:07:40 UTC
commit 40e1b88b24da1f61a8161b39e3bb7aa16a5b9b5d (HEAD -> master)
Author: Bastien Nocera <hadess@hadess.net>
Date:   Sun Feb 12 18:11:03 2017 +0100

    thumbnailer: Fix (nearly) empty MimeTypes in thumbnailer
    
    Because we weren't waiting for loaders.cache to be created to run our
    helper, and we weren't applying the environment variables to the correct
    helper, we would end up with a broken list of supported MimeTypes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=778451