GNOME Bugzilla – Bug 521891
Can not import anything from camera if one photo is bad
Last modified: 2010-05-09 07:01:31 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:
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.
Review of attachment 160384 [details] [review]: patch applied to the gthumb-2-10 branch, thank you.
Can we close this report then ?
yes, closing...