GNOME Bugzilla – Bug 708824
gnome_desktop_thumbnail_factory_generate_thumbnail doesn't work on remote files
Last modified: 2013-09-30 07:29:32 UTC
I had a crash in gnome_desktop_thumbnail_factory_generate_thumbnail crash when loading recent:/// in nautilus. It crashed in gnome-desktop-thumbnail.c:_gdk_pixbuf_new_from_uri_at_scale() at: if (input_stream == NULL) input_stream = gs_file_read_noatime (file, NULL, &error); if (input_stream == NULL) { g_warning ("Unable to create an input stream for %s: %s", uri, error->message); Because input_stream was NULL, but error was NULL too. Due to gs_file_read_noatime() doing: path = g_file_get_path (file); if (path == NULL) return NULL; I.e. without setting the GError. But, apart from this obvious bug, it seems that using this function will not work on *any* non-local file.
Oh, it seems the crash was fixed via bug 699252. But the other problem still stands, gs_file_read_noatime() only works for local files.
Actually, i guess it *may* work on backends with fuse files, but it will do the loads via fuse, which is not ideal. gs_file_read_noatime() should *only* be called if g_file_is_native().
Created attachment 255898 [details] [review] gs_file_get_path_cached: Unlock mutex on error
Created attachment 255899 [details] [review] thumbnail loader: Support loading thumbnails from remote locations This broke with the previous addition of gs_file_read_noatime().
Review of attachment 255899 [details] [review]: Looks good.
Comment on attachment 255899 [details] [review] thumbnail loader: Support loading thumbnails from remote locations Attachment 255899 [details] pushed as 0df46b7 - thumbnail loader: Support loading thumbnails from remote locations
Review of attachment 255898 [details] [review]: Looks right, thanks!
Comment on attachment 255898 [details] [review] gs_file_get_path_cached: Unlock mutex on error Attachment 255898 [details] pushed as 3c63e8c - gs_file_get_path_cached: Unlock mutex on error
I commited this to libgsystem, but with the other fix I don't think gnome-desktop will hit that case, so this is essentially fixed even if we don't update libgsystem.