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 521891 - Can not import anything from camera if one photo is bad
Can not import anything from camera if one photo is bad
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.10.x
Other All
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2008-03-11 23:17 UTC by Davide Capodaglio
Modified: 2010-05-09 07:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
do not make thumbnail creation errors fatal for import (2.19 KB, patch)
2010-05-05 22:16 UTC, Marcel Stimberg
committed Details | Review

Description Davide Capodaglio 2008-03-11 23:17:08 UTC
Please describe the problem:
I am trying to import photos with gthumb from my mobile phone.
The list of image thumbnails is correctly viewed, but I can not import anything because I have both photos and small GIFs (clipart, frames ecc) that libgphoto seem not to handle correctly; in gthumb there are no thumbnails for these and the message "PTP No thumbnail present" appears (even if this is a MTP device) while loading them.
However, the error for the cliparts inhibits the import for the jpg photos, that can be imported without problems with gphoto2 and digikam.

In fact I gave a brief look and debug at the source code and in dlg-photo-importer.c in ctx_error_func is set the global data->error flag, that ok_clicked_cb causes a return...
So I think that the import procedure should be made more fault-tolerant, otherwise a single broken (or unsupported) image can inhibit the import of the whole correct images.


Steps to reproduce:
1. pick a camera with broken or unsupported images
2. open the import dialog
3. the import procedure does not start


Actual results:
Empty progress bar, no error message

Expected results:
Import of working images, skip of broken ones

Does this happen every time?
yes

Other information:
Comment 1 Marcel Stimberg 2010-05-05 22:16:38 UTC
Created attachment 160384 [details] [review]
do not make thumbnail creation errors fatal for import

The attached patch clears the error flag in load_images_preview__step (dlg-photo-importer.c) if loading the thumbnail with gphoto failed. (I did not find a nice way to avoid setting the error in ctx_error_func, because this function may be called for all kinds of errors and for failed thumbnail creation only receives a generic error).

Another small change makes the temp files used for thumbnail creation called 0.jpeg etc. instead of 0jpeg -- this allows fast mime type detection to get a reasonable mime type even if the temp file is empty (that is the case for failed thumbnails) and therefore display eg. an icon for movies.

For me the patch fixes all the problems with the import.
Comment 2 Paolo Bacchilega 2010-05-06 07:31:41 UTC
Review of attachment 160384 [details] [review]:

patch applied to the gthumb-2-10 branch, thank you.
Comment 3 Matthias Hawran 2010-05-08 22:25:26 UTC
Can we close this report then ?
Comment 4 Paolo Bacchilega 2010-05-09 07:01:31 UTC
yes, closing...