F-Spot - Error connecting to camera. "Could not lock the device"

Bug #258083 reported by mattismyname
92
This bug affects 11 people
Affects Status Importance Assigned to Milestone
f-spot (Ubuntu)
Fix Released
Medium
Martin Pitt
Intrepid
Fix Released
Medium
Martin Pitt
gvfs (Ubuntu)
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: gvfs

matt@Aluminumy:~$ lsb_release -rd
Description: Ubuntu intrepid (development branch)
Release: 8.10

matt@Aluminumy:~$ apt-cache policy gvfs
gvfs:
  Installed: 0.99.4-0ubuntu1
  Candidate: 0.99.4-0ubuntu1
  Version table:
 *** 0.99.4-0ubuntu1 0
        500 http://us.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/statusmatt@Aluminumy:~$ lsb_release -rd
Description: Ubuntu intrepid (development branch)
Release: 8.10

matt@Aluminumy:~$ apt-cache policy f-spot
f-spot:
  Installed: 0.4.4-1ubuntu3
  Candidate: 0.4.4-1ubuntu3
  Version table:
 *** 0.4.4-1ubuntu3 0
        500 http://us.archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

I plug in my camera (Canon PowerShot A620). A dialog pops up "You have just inserted a medium with digital photos..." I choose "Open F-Spot Photo Manager". F-Spot opens and an error dialog pops up "Error connecting to camera. Received error "Could not lock the device" while connecting to the camera."

I've seen two other tickets about this same problem but they were marked as fixed.

Related branches

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, that's an f-spot issue, it should either unmount the device or use the gvfs uri to download the photo directly

Changed in gvfs:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Jon Arnold (jonarnoldsemail) wrote :

I'm having this same problem, with the same camera model.

Changed in f-spot:
milestone: none → ubuntu-8.10-beta
assignee: nobody → desktop-bugs
Revision history for this message
Martin Pitt (pitti) wrote :

Current status: I fixed fuse to not depend on users being in the "fuse" group again. Seb and I agreed that with this, the best solution would be to keep gvfs mount it, and use %f instead of %u in the f-spot-import desktop file.

However, the remaining problem is that f-spot --import /path does not actually seem to work. It seems to insist on the path being a mount point.

Revision history for this message
Martin Pitt (pitti) wrote :

http://bugzilla.gnome.org/show_bug.cgi?id=530654 might be related, or even fix the problem.

Revision history for this message
Niko Lewman (nikolewman) wrote :

I have this same problem with canon 400D and 350D.

Revision history for this message
Martin Pitt (pitti) wrote :

Internal notekeeping: above GNOME patch is unrelated; it just provides an optimized workflow for apps which understand gvfs, it doesn't magically fix the URLs that f-spot-import %u gets and can't interpret.

Revision history for this message
Martin Pitt (pitti) wrote :

I fixed that particular bug. It still sucks, it's awfully slow and you don't get the target directory dialog either, but that has to do for the beta, I'm afraid.

Package uploaded, waiting in unapproved.

Changed in f-spot:
assignee: desktop-bugs → pitti
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package f-spot - 0.4.4-1ubuntu4

---------------
f-spot (0.4.4-1ubuntu4) intrepid; urgency=low

  * Add ubuntu_import_fuse.dpatch: Import from the gvfs fuse path instead of
    libgphoto URL, so that we can import from libghoto handled cameras which
    nautilus already automounted through gvfs-gphoto. (LP: #258083)
  * Add ubuntu_fname_quote_percent.dpatch: Escape '%' in file names, so that
    importing from gvfs fuse paths actually works. (Gnome #433829)

 -- Martin Pitt <email address hidden> Mon, 29 Sep 2008 17:22:58 +0200

Changed in f-spot:
status: Fix Committed → Fix Released
Revision history for this message
Pascal Lamblin (blip-aigri) wrote :

Still present in Intrepid beta as of 3 Oct.
I'm trying to connect a Sony Cyber-shot DSC-S700 using PTP, and have the same error. The workaround of unmounting the drive first is working.
If I use the "USB mass storage" mode, it is working fine.

Revision history for this message
mike (ubuntu-holmesfamily) wrote :

Fails for "cannon power shot sd850 is" in PTP
In usb mass storage mode it works via the desktop icon that pops up

Revision history for this message
Oleksij Rempel (olerem) wrote :

great it woas fixed in f-spot (0.4.4-1ubuntu4) and after this intrepid was migrated to 0.5.0.2-0ubuntu4 . seems like somebody forgot to send this bug upstream?

Revision history for this message
Pierre-Antoine Champin (pchampin) wrote :

I still have the bug under Intrepid with two cameras (FUJIFILM FinePix F30 and iPhone).
How come the bug is marked as "Fix released", while many people seem to experience it?

Revision history for this message
vaughn (vaughngrisham) wrote :

I'm experiencing this problem with Intrepid and a Canon EOS Digital Rebel XSi.

Revision history for this message
mattismyname (mattismyname) wrote :

Set status to new...seems like the fix is not there

Changed in f-spot:
status: Fix Released → New
Revision history for this message
Martin Pitt (pitti) wrote :

For the record, the bug fix is discussed at http://bugzilla.gnome.org/show_bug.cgi?id=551803 .

So apparently the current fix in Intrepid does not work for some cases. Please do the following:

- plug in your camera
- ignore or close the dialog that pops up asking you for which action to take (F-Spot/open in file browser)
- open a Terminal window and do

    gvfs-mount -l

and copy & paste the output from that command.

There should be a line which resembles the following:

    Mount(0): Canon, Inc. PowerShot A70 (ptp) -> gphoto2://[usb:005,007]/

Now do this command:

  $ sh -ex /usr/bin/f-spot-import gphoto2://[usb:005,007]/

Please use the URL that "gvfs-mount -l" reported above, of course. Close f-spot again immediately, and copy&paste the output again. Thanks!

Changed in gvfs:
status: New → Invalid
Changed in f-spot:
milestone: ubuntu-8.10-beta → none
status: New → Incomplete
Revision history for this message
Pierre-Antoine Champin (pchampin) wrote :

Martin, I did as you asked with my iPhone, and it worked. I attach the output of both commands.

However, the bug seems to have been fixed with the update to f-spot 0.5.0.3-0ubuntu1.

Revision history for this message
Martin Pitt (pitti) wrote :

Pierre-Antoine, thanks. But that actually looks fine, and you confirmed that it works for you.

So, obviously the debug output I asked above is only actually useful if it does *not* work, i. e. f-spot complains about a locking error, or presents you with a device selection dialog instead of the thumbnail dialog.

Thanks!

Revision history for this message
mike (ubuntu-holmesfamily) wrote :

for a cannon power shot sd850 is
I connected it and got the failed to lock message, I ignored all popups etc and opened a terminal and typed the following

mike@desktop:~$ gvfs-mount -l
The program 'gvfs-mount' is currently not installed. You can install it by typing:
sudo apt-get install gvfs-bin
bash: gvfs-mount: command not found
mike@desktop:~$

Revision history for this message
mike (ubuntu-holmesfamily) wrote :

ok, I did the install and viola! it all works, I think the dependencies are incorrect and that package is not being installed.

Revision history for this message
Martin Pitt (pitti) wrote :

Ah, that would be it. Thanks!

Changed in f-spot:
status: Incomplete → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

I uploaded a fixed package which adds the gvfs-bin dependency. Waiting in unapproved queue now (will be accepted after the Release candidate goes out).

Changed in f-spot:
status: In Progress → Fix Committed
Revision history for this message
Pascal Lamblin (blip-aigri) wrote : Re: [Bug 258083] Re: F-Spot - Error connecting to camera. "Could not lock the device"

On Tue, Oct 21, 2008 at 18:43, Martin Pitt <email address hidden> wrote:
> Ah, that would be it. Thanks!

Installing gvfs-bin worked for me, too.

Revision history for this message
mattismyname (mattismyname) wrote :

You're my heroes - Fspot works now for me

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package f-spot - 0.5.0.3-0ubuntu2

---------------
f-spot (0.5.0.3-0ubuntu2) intrepid; urgency=low

  * Add gvfs-bin dependency, so that the gvfs umounting in
    f-spot-import-gphoto.dpatch can actually work. Otherwise F-Spot fails with
    "Cannot lock device" on import. (LP: #258083)

 -- Martin Pitt <email address hidden> Wed, 22 Oct 2008 00:44:44 +0200

Changed in f-spot:
status: Fix Committed → Fix Released
Revision history for this message
Brian O'Keefe (okeefe) wrote :

Nikon CoolPix 2500
Intrepid
TiBook G4

I'm having the same problem. I had no problem in Hardy but Intrepid is a disaster in this and other ways.
The workaround doesn't work. I tried downgrading to f-spot - 0.5.0.3-0ubuntu2 from f-spot - 0.5.0.3-0ubuntu4 and that didn't make any difference. All the gvfs packages are installed. Here's the terminal output:

~$ gvfs-mount -l
Drive(0): ATA Drive
  Volume(0): 43.0 GB Media
Drive(1): CD-RW/DVD±RW Drive
Volume(0): Nikon Corp. Coolpix 2500
  Mount(0): Nikon Corp. Coolpix 2500 -> gphoto2://[usb:004,010]/
brianokeefe@ubuntu:~$ sh -ex /usr/bin/f-spot-import gphoto2://[usb:004,010]/
+ udi=gphoto2://[usb:004,010]/
+ [ gphoto2://[usb:004,010]/ != //[usb:004,010]/ ]
+ gvfs-mount -u gphoto2://[usb:004,010]/
+ echo gphoto2://[usb:004,010]/
+ sed s_://\[_:_; s_/$__; s_\]$__
+ uri=gphoto2:usb:004,010
+ exec f-spot --import gphoto2:usb:004,010
[Info 14:09:31.822] Initializing DBus
[Info 14:09:32.194] Initializing Mono.Addins
[Info 14:09:33.014] Starting new FSpot server
Testing gphoto path = usb:
PortInfo Universal Serial Bus, usb:
Error Write: LibGPhoto2.GPhotoException: Error writing to the port
  at LibGPhoto2.CameraFilesystem.ListFiles (System.String folder, LibGPhoto2.Context context) [0x00000]
  at GPhotoCamera.GetFileList (System.String dir) [0x00000]
  at GPhotoCamera.GetFileList () [0x00000]
  at GPhotoCamera.InitializeCamera () [0x00000]
  at MainWindow.ImportCamera (System.String camera_device) [0x00000]

(f-spot:9710): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
cleanup context
[Info 14:10:05.616] Starting BeagleService
[Info 14:10:05.617] Hack for gnome-settings-daemon engaged
[Info 14:10:09.155] Exiting

After unmounting the camera I get an error: f-spot received error error writing to the port while connecting to the camera

The workaround to which is to, again, unmount the device and restart F-Spot-doesn't work.
Really sad as I had finally, for the first time, gotten F-Spot to actually behave and work. I could send pix, import etc. Really sucks. sorry about the negativity but I spent about 5 hours trying to get this to work .

Revision history for this message
Martin Pitt (pitti) wrote :

Brian, this is unrelated to this bug report. Can you please file a new bug report against libgphoto2 about this, with providing this f-spot log? thanks!

Revision history for this message
mattismyname (mattismyname) wrote : Invitation to connect on LinkedIn

LinkedIn
------------

Bug,

I'd like to add you to my professional network on LinkedIn.

- Matt

Learn more:
https://www.linkedin.com/e/isd/544944470/x-du4edF/

------------------------------------------

What is LinkedIn and why should you join?
http://learn.linkedin.com/what-is-linkedin

------
(c) 2009, LinkedIn Corporation

Revision history for this message
Pieter (peterdeltafm) wrote :

The next error is thrown at me:
"Error connecting to camera. Received error "Could not lock the device" while connecting to the camera."

So this bug is still valid for me.

gvfs-mount -l gives:

Volume(0): Canon, Inc. Canon Digital Camera
  Type: GProxyVolume (GProxyVolumeMonitorGPhoto2)
  Mount(0): Canon, Inc. Canon Digital Camera -> gphoto2://[usb:002,008]/
    Type: GProxyShadowMount (GProxyVolumeMonitorGPhoto2)
Mount(1): Canon, Inc. Canon Digital Camera -> gphoto2://[usb:002,008]/
  Type: GDaemonMount

I don't understand this clearly.

But when i unmount the camera and select again the import, all works fine.
Looks like normal sysyem mount is more quick then the Fspot mount, so Fspot mount is locked.
Using Fspot on Ubuntu 9.04 AMD triple core 64.
Fspot version 0.6.1.2.

Revision history for this message
Ashwyn Falkingham (ashwyn-falkingham) wrote :

I recently upgraded to the latest stable f-spot 0.6.2 (compiled from source) in order to get the facebook plugin to work. I am running ubuntu jaunty, I previously did not have this bug, but now I do, it affects both my cameras (Cannon EOS 350D and iphone). Once I manually dismount the device, fspot imports correctly. The bug was also present in the .deb fspot 0.6.1 package from getdeb.net.

A minor inconvenience now I know how to work around it.

Revision history for this message
Ashwyn Falkingham (ashwyn-falkingham) wrote :

Oh, and if it's any use, here is my fspot log file.

Revision history for this message
Russell Wing (wingfamily) wrote :

I had this issue. My Canon A70 would not connect and gave an error (Bad parameters). I changed my Nautilus configuration so instead of automatically opening F-spot, Nautilus would ask me what I wanted to do (Edit | Preferences | Media tab). This solved the race condition where F-spot and the Nautilus tried to get hold of the camera, and it all works properly. (Karmic 9.10, F-spot 0.6.1.3).

Revision history for this message
DrH (alan-hood) wrote :

I have the following error in 9.10 running on Dell Mini 10v

"Error connecting to camera. Received error "Could not lock the device" while connecting to camera".

I receive the above error when taking the following steps.

1. Connect camera (Nikon P5100) via USB to the laptop
2. Turn on the camera
3. Open F-Spot
4. Click on Import button
5. Change Import Source to "Nikon Coolpix P5100 (PTP mode)

Note: I modified Nautilus (Edit --> Preferences --> Media tab) to "Do nothing" when a photo media is inserted.

When Nautilus is configured to "Always Ask" when a photo media is inserted, I receive the following error message.

"Error connecting to camera. Received error "I/O in progress" while connecting to camera"

I receive the above error when taking the following steps.

1. Connect camera (Nikon P5100) via USB to the laptop
2. Turn on the camera
3. When prompted (Window title is "Nikon DSC Coolpix P5100 PTP), select F-Spot to open the media

In both cases above, Nautilus does mount the storage media.

Why does this matter? After all, I can remove the SD media from the camera and insert it into the media slot on the camera.

It matters because there is no other way to select a few photos from the SD media and import into F-Spot. If the SD media card is inserted into the media slot and import, all 700+ of the images are imported, even if I use Ctrl+click.

I tried to manually copy the few photos I am interested to a temporary folder, but F-Spot does not allow selecting a folder to import from. In other words, the "Select Folder" in the Import window is misleading. It should say "Select media".

After spending several days, I am terribly frustrated with F-Spot. My wife who is a novice computer user is also frustrated with the F-Spot import functionality.

Revision history for this message
DrH (alan-hood) wrote :

The version of F-Spot in post #32 is 0.6.1.5.

I have not found a way to change the camera to work from PTP mode to another mode (e.g., MTP).

Regards,

Revision history for this message
Brian O'Keefe (okeefe) wrote :

I have no trouble importing from a folder. I click on "import" , the import window comes up and I select from "Import Source", "Select Folder". the drop down box shows no camera and I click on "select folder" again and nautilus pops up so I can choose the source folder. Is that not what happens for you DrH?

Revision history for this message
DrH (alan-hood) wrote :

Thanks for the reply Brian.

Yes...Nautilus is launched when I click on "Select Folders" from the drop down list. I was mistaken.

Interestingly, I receive a third (3rd) error message when I click on "NIKON DSC COOLPIX P5100-PTP"

Could not mount NIKON DSC COOLPIX P5100-PTP
Error initializing camera: -110: I/O in progress

The steps were.

1. Connect camera (Nikon P5100) via USB to the laptop
2. Turn on the camera
3. When prompted, choose to launch F-Spot
4. Close out error described above
5. Click on "Select Folders" from drop down window of Import dialog window
6. Click on NIKON DSC COOLPIX P5100-PTP from the Nautilux Places pane.

Error appears.

Although mounted, Nautilus will not open the camera in browse mode, which probably makes sense due to PTP mode.

I do a find command for the f-spot log file, but it isn't to be found.

Revision history for this message
Aaron Wyatt (a-wyatt-m) wrote :

This is also a problem in Google's Picasa version 3.0.5744-02 (this is the testing version which uses wine) with a Kodak EasyShare C813 camera.

Picasa is default application to use to open multimedia folders, and therefore the symptoms are:

Connect camera via USB cable and turn on.

Receive error: Unable to mount KODAK EasyShare C813 Zoom Digital Camera; Error initializing camera: -60: Could not lock the device.

Two icons for the camera are present on the desktop. The permissions tab under properties for one icon shows the error: "The permissions of "store_00010001" could not be determined." The other shows the same error message but instead with "store_00020001"

gvfs-mount -l shows the following lines:

Volume(0): KODAK EasyShare C813 Zoom Digital Camera
  Type: GProxyVolume (GProxyVolumeMonitorGPhoto2)
  Mount(0): KODAK EasyShare C813 Zoom Digital Camera -> gphoto2://[usb:005,004]/store_00010001
    Type: GProxyShadowMount (GProxyVolumeMonitorGPhoto2)
Volume(1): KODAK EasyShare C813 Zoom Digital Camera
  Type: GProxyVolume (GProxyVolumeMonitorGPhoto2)
  Mount(0): KODAK EasyShare C813 Zoom Digital Camera -> gphoto2://[usb:005,004]/store_00020001
    Type: GProxyShadowMount (GProxyVolumeMonitorGPhoto2)
Mount(2): KODAK EasyShare C813 Zoom Digital Camera -> gphoto2://[usb:005,004]/
  Type: GDaemonMount

Revision history for this message
Aaron Wyatt (a-wyatt-m) wrote :

This is probably the wrong place for the above post... then again, it implies that this entire bug is in the wrong place. Any suggestions on where to post my bug report would be welcomed. Maybe gvfs?

Revision history for this message
cement_head (andorjkiss) wrote :

Hello,

  I also have this bug in Karmic Koala (all updates). This appears to be an error between FSpot and Gnome. If I manually unmount the camera BEFORE launching FSpot, all is working. FSpot needs to be patched to have an umount script just prior to initialising.

- CH

Revision history for this message
m0rtal (alexander-nagorny) wrote :

Same here, Ubuntu 10.4 beta2 + Canon EOS 350D = "Could not lock the device"

Revision history for this message
Glen (glentupling-hotmail) wrote :

This bug has appeared in my Karmic Koala release, I haven't seen this up until last week but it seems to be a show stopper.
I connect my camera and immediately get the message "Error connecting to camera Received error "Bad parameters" while connecting to camera." This is a Kodak easyshare C182

Revision history for this message
RayArdia (theallinsons) wrote :

Same problem here in Karmic and/or F-Spot.
Just for the record, there seems to be two parallel Bugs being investigated:-

   1.
      Bug #331681 in linux (Ubuntu): "Error initializing camera ...
      Error initializing camera: -60: Could not lock the device ... but i get an error on connecting the camera since f-spot can not lock the device. ...
      bugs.launchpad.net/ubuntu/+source/linux/+bug/331681 - 114k - Cached
   2.
      Bug #258083 in f-spot (Ubuntu): "F-Spot - Error connecting to ...
      Received error "Could not lock the device" while connecting to the camera. ... I also have this bug in Karmic Koala (all updates). This appears to ...
      bugs.launchpad.net/ubuntu/+source/f-spot/+bug/258083 - 118k - Cached

Can the respective developement teams not get together to solve this................ or am I just being naive?

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

I have the same issue with a "KODAK EASYSHARE MINI Camera M200" camera on ubuntu 10.0.4 LTS (Lucid Lynx).

Accessing with nautilus sometimes works, but then copying all photos to hard disk will result in a hang after some files have been copied slowly with some bursts where speed is high, later showing an error that the copy failed.
Then the camera needs to be disconnected and reconnected first, before it can be accessed again.

Why the connection is so unreliable?

When the camera is mounted, df doesn't show the mounted directory.
Is it not possible to access it like a USB hard drive and then use shell commands to copy/move files?

Revision history for this message
Michael Mess (michael-michaelmess) wrote :

I think that the issue is caused by a deadlock somewhere in the driver for communicating with the camera and not caused by the application (FSpot, Nautilus) using the connection to the camera.

If I connect the camera, I get asked if I want to start FSpot.

When I ignore the dialog or click "Cancel" and just access with nautilus, the issue arises after copying some files. Even the preview won't show all pictures, but it is then still possible to start copying files and some of them are successfully copied before the copy hangs and times out.

Bismark (bismark-foofus)
Changed in gvfs (Ubuntu Intrepid):
status: Invalid → Incomplete
Revision history for this message
JC Hulce (soaringsky) wrote :

Ubuntu Intrepid is End-of-life and no longer supported. I am closing the bug task for Intrepid (it is still open for other versions of Ubuntu).

Changed in gvfs (Ubuntu Intrepid):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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