Cannot import photos from PTP Camera (Fuji X10)

Bug #910964 reported by Luis Arias
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Shotwell
New
Undecided
Unassigned
libgphoto
Unknown
Unknown
libgphoto2 (Ubuntu)
Triaged
Low
Unassigned
shotwell (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Import results in a long wait and a popup stating:

"Shotwell
Unable to lock camera: Unspecified error (-1)"

At this point the camera is in a dysfunctional state because running gphoto2 --list-files also results in an error:

luis@athena:~/Code/ubuntu/libgphoto2$ env LC_ALL=C gphoto2 --debug-logfile=logfile.log --debug --list-files

*** Error ***
PTP I/O error

*** Error ***
An error occurred in the io-library ('Unspecified error'): The supplied vendor or product id (0x0,0x0) is not valid.
*** Error (-1: 'Unspecified error') ***

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: shotwell 0.11.6-0ubuntu0.1 [modified: usr/share/glib-2.0/schemas/gschemas.compiled]
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Mon Jan 2 21:15:24 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: shotwell
UpgradeStatus: Upgraded to oneiric on 2011-10-17 (77 days ago)

Revision history for this message
Luis Arias (kaaloo) wrote :
Revision history for this message
Luis Arias (kaaloo) wrote :

Could not link to shotwell bug report because it expects the url to start with http://track.yorba.org:

http://redmine.yorba.org/issues/4512

Revision history for this message
Luis Arias (kaaloo) wrote :

As an update to this, I disabled the gphoto2 gvfs backend by running

sudo chmod -x /usr/lib/gvfs/gvfs-gphoto2-volume-monitor

to isolate issues to shotwell / libgphoto2. What I get is that the issue persists and actually trying to run an import is not necessary, its enough to just click on the USB PTP Camera item and let shotwell display the photo previews to then have a PTP I/O Error be signaled by

gphoto2 --list-files

The camera is at this point in an unusable state.

I'll update the yorba redmine report with this info.

Revision history for this message
Luis Arias (kaaloo) wrote :

After some investagation it seems this is really an issue in libgphoto2 since it can be reproduced entirely with gphoto2 command line. Please see the linked bug report for more info.

Revision history for this message
Clint Rogers (clinton-yorba) wrote :

Hi,

I've marked the upstream ticket as 'blocked' for now; once the GPhoto team have had a chance to address this, we'll reopen our ticket and get their fix into Shotwell.

Changed in shotwell (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Changed in libgphoto2 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

This appears to be hitting me as well with a Canon Ixus 310HS (interestingly, I had this same model before with no issues, then had to replace it and now I do). Reported here:
https://bugs.launchpad.net/ubuntu/+source/shotwell/+bug/1096463

Please let me know if any log files or similar would assist. On 12.10 I get the lock error, on 12.04 it seems to hang on import after a few files in Shotwell.

Revision history for this message
Jim Nelson (yorba-jim) wrote :

We believe this to be a gphoto2 problem. If you could do the following, that would help verify this (with your camera attached):

$ sudo apt-get install gphoto2
$ gphoto2 --shell

The gphoto shell is like a command-line for your camera and attempts to lock it before using it. (You'll need to unmount it from Nautilus before beginning.) If you get the same error Shotwell is reporting, then it's a gphoto2 bug -- there's not much we can do on our end.

Revision history for this message
Jim Nelson (yorba-jim) wrote :

Also, when you try importing from Shotwell, does you camera display anything on its screen? We've had reports of some cameras having to be in a certain mode before import will work.

Revision history for this message
Orangedouble (blahblahstuff) wrote :

I think I am having the same problem, with a Fujifilm F100.
I'm running 12.10 3.5.0-22-generic and shotwell 0.13.1

I also get "Shotwell Unable to lock camera: Unspecified error (-1)"

I just upgraded from 12.04 and this is the first time I've tried to import from the camera since then, and the first time I've gotten the error (that is, it worked on 12.04).

I installed it ghpoto2 and got the same error as the OP:

~$ env LC_ALL=C gphoto2 --debug-logfile=logfile.log --debug --list-files

*** Error ***
PTP I/O error

*** Error ***
An error occurred in the io-library ('Unspecified error'): No error description available
*** Error (-1: 'Unspecified error') ***

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Card with 282 photos, 7 videos.
1) Plug in camera, open Shotwell.
2) Error that camera in use by another application (pretty sure that didn't used to happen in previous versions), unmount the camera.
3) Click on the camera, all thumbnails are shown.
4) Click "Import All", hangs for a while, get the attached error.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Same camera/card with gphoto2:
1) Unmount camera.
2) $ gphoto2 --shell
gphoto2: {/home/myusername} /> ls
store_00010001/
gphoto2: {/home/myusername} /> cd store_00010001
Remote directory now '/store_00010001'.
gphoto2: {/home/myusername} /store_00010001> ls
DCIM/
gphoto2: {/home/myusername} /store_00010001> cd DCIM
Remote directory now '/store_00010001/DCIM'.
gphoto2: {/home/myusername} /store_00010001/DCIM> ls
140_1609/ 141_2909/ 142_0610/ 143_0710/
144_2110/ 145_2710/ 147___12/ 148___01/
gphoto2: {/home/myusername} /store_00010001/DCIM> cd 140_1609
Remote directory now '/store_00010001/DCIM/140_1609'.
gphoto2: {/home/myusername} /store_00010001/DCIM/140_1609> ls
IMG_5447.JPG IMG_5448.JPG IMG_5449.JPG IMG_5450.JPG
IMG_5451.JPG
gphoto2: {/home/myusername} /store_00010001/DCIM/140_1609> get IMG_5447.JPG
Downloading 'IMG_5447.JPG' from folder '/store_00010001/DCIM/140_1609'...
Saving file as IMG_5447.JPG
gphoto2: {/home/myusername} /store_00010001/DCIM/140_1609> ls
IMG_5447.JPG IMG_5448.JPG IMG_5449.JPG IMG_5450.JPG
IMG_5451.JPG
gphoto2: {/home/myusername} /store_00010001/DCIM/140_1609> get IMG_5450.JPG
Downloading 'IMG_5450.JPG' from folder '/store_00010001/DCIM/140_1609'...
Saving file as IMG_5450.JPG

So it does seem to be working this time.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

But then I tried shotwell again (without unplugging anything or resetting anything) and it gave the same error, then back to gphoto2 and received the following error (it hung as I was typing):
$ gphoto2 --shell
gphoto2: {/home/myusername} /> cd s
*** Error ***
PTP I/O error

*** Error ***
An error occurred in the io-library ('Unspecified error'): The supplied vendor or product id (0x0,0x0) is not valid.
ssto
ERROR: Invalid command.

I note that I imported all the photos on this camera from a card with 8 photos and it worked fine, so either more photos makes it worse, or there is something else that makes it work sometimes and not others.

Either way, it does look like this hits gphoto2 as well.

Revision history for this message
Aaron Whitehouse (aaron-whitehouse) wrote :

Oh, and the screen on the 310HS always goes dark when you are "talking" to it, with the green light on the bottom right either solid green or blinking - I'm pretty sure it turns itself to that mode whatever you do.

Revision history for this message
Marcus Meissner (meissner) wrote :

I am thinking thumbnails for movies might not work correctly.

can you cross check this with "just images" on the camera, and also with just 1 movie on the camera?

Revision history for this message
Marcus Meissner (meissner) wrote :

also ... once it had an issue it will stop working until switched off/on or replugged I suspect

Revision history for this message
Jim Nelson (yorba-jim) wrote :

As reported on the Shotwell mailing list: http://lists.yorba.org/pipermail/shotwell/2013-January/004494.html

It looks like Rhythmbox and/or libmtp was interfering with accessing the user's device because it was detected as MTP rather than PTP. The user killed the Rhythmbox process and the camera began working with Shotwell.

For the original reporter (and anyone else with this issue), please try reproducing this problem again. Then look at the end of this file:

$ tail -30 ~/.xsession-errors

Revision history for this message
Jim Nelson (yorba-jim) wrote :

Here's a Launchpad bug for something very similar to this problem: https://bugs.launchpad.net/ubuntu/+source/libgphoto2/+bug/581087

Revision history for this message
Luis Arias (kaaloo) wrote :

I don't think this has anything to do with Rhythmbox inspite of those reports. I tried the test and there is nothing related to the issue in ~/.xsession-errors.

On the other hand, I can reproduce the issue in shotwell pretty much every time with Rhythmbox not running and the MTP plugin disabled in any case. gphoto2 seems to have improved since the last time I ran these tests. I need to recharge my camera battery, but I do have a failure condition for gphoto2 all by itself and will post to the gphoto2 bug as soon as I can rerun a clean test. I believe the case here was when letting gvfs-gphoto2-volume-monitor kick in, unmounting the camera when the Removable Media alert appears, and then running

env LC_ALL=C gphoto2 --debug-logfile=logfile.log --debug --get-all-thumbnails

I will follow up on this in a little while.

Revision history for this message
Luis Arias (kaaloo) wrote :

I updated http://redmine.yorba.org/issues/4512 with my findings. Shotwell will fail on its own under the conditions in my report where gvfs-gphoto2-volume-monitor is stopped from kicking in when the camera is turned on.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.