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 168091 - "Error connecting to camera" upon second import
"Error connecting to camera" upon second import
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
CVS
Other Linux
: Normal normal
: ---
Assigned To: F-spot maintainers
F-spot maintainers
: 331524 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-02-21 21:57 UTC by Alexander Hunziker
Modified: 2006-11-03 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Hunziker 2005-02-21 21:57:40 UTC
After having imported photos using libgphoto2, trying to do so again gives an
error message:

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

Workarounds are:

* Restarting f-spot
* Unplugging the camera and plugging it in again
Comment 1 Larry Ewing 2005-02-23 03:34:32 UTC
I get theis sometimes but trying to connect again usually fixes it for me.  It
is possible something is not being reset properly between invocations.  I'll try
to look into it soon
Comment 2 Larry Ewing 2005-08-16 17:15:02 UTC
There are issues with refcounting and the gphoto objects.  I need to look deeper
into the libgphoto2 api and the bindings.
Comment 3 Bengt Thuree 2006-02-18 05:58:31 UTC
Similar to Bug #331524 – Cancel import from camera makes it impossible to reimport
Comment 4 Gabriel Burt 2006-02-22 08:14:26 UTC
*** Bug 331524 has been marked as a duplicate of this bug. ***
Comment 5 Stephane Delcroix 2006-11-03 12:49:06 UTC
This will fix the bug (GPhotoCamera.cs)

Index: src/GPhotoCamera.cs
===================================================================
RCS file: /cvs/gnome/f-spot/src/GPhotoCamera.cs,v
retrieving revision 1.10
diff -u -p -r1.10 GPhotoCamera.cs
--- src/GPhotoCamera.cs 25 Sep 2006 20:29:00 -0000      1.10
+++ src/GPhotoCamera.cs 3 Nov 2006 12:47:24 -0000
@@ -230,18 +230,19 @@ public class GPhotoCamera
                        foreach (GPhotoCameraFile curcamfile in files)
                                curcamfile.ReleaseGPhotoResources ();

-               // FIXME check to make sure we don't need to dispose of these
-               // things explicitly.
-               /*
                if (camera_fs != null)
                        camera_fs.Dispose ();
                if (camera != null)
                        camera.Dispose ();

+               // FIXME check to make sure we don't need to dispose of these
+               // things explicitly.
+               /*
                camera_list.Dispose ();
                abilities_list.Dispose ();
                port_info_list.Dispose ();
                */
+
                context.Dispose ();
        }
 }

So, apparently, we need to dispose camera and camera_fs
Comment 6 Stephane Delcroix 2006-11-03 13:00:35 UTC
Fixed in CVS