Bug on using Canon EOS 350 D import feature from gphoto

Bug #2767 reported by Alexander Domanski
26
Affects Status Importance Assigned to Milestone
libgphoto
Fix Released
Undecided
Hubert Figuiere
libgphoto2 (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

When plugging in the Camera a popup shows as wanted and asks wether to download the pictures on the camera. If you select »Delete downloaded files« (a checkbox, I translated this back to english from German, so the text might be something else), after downloading all the stuff to the given place the programme tries to delete the stuff. This produces a read error. The programme calls this »Error 0x0002«. It is not a very important bug as all files are downloaded correctly but not deleted, but it simply sucks to be forced to use the cameras formatting function.

Revision history for this message
Ante Karamatić (ivoks) wrote :

But, it opens gthumb2, not gphoto2 or gtkam. And I can't reproduce this with EOS 300D.

Revision history for this message
Alexander Domanski (alexander-domanski) wrote :

Sure, but what do you think does gthumb use as the »backend«? Well that's libgphoto2 and gthumb prints this error of libgphoto2 in the progress bar on the bottom of the »sync window«. I have had different kinds of trouble with the 350 D on Hoary and SuSE 9.x but now it at leasts works to upload stuff without using a card reader. About the 300 D, I guess this model should have been working on Linux for more than a year from now, so it is clear why you don't get this error. I guess this is because the 300 D uses another processor (Digic-I?) than the 350 D (Digic-II) but I can't ensure this is the cause.

Changed in libgphoto2:
assignee: nobody → pitti
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please install the "gphoto2" package from universe and (try to) remove all the pictures on the camera with

  gphoto2 --debug -D 2> gphoto-delete-all.log

Please attach gphoto-delete-all.log here.

Revision history for this message
Alexander Domanski (alexander-domanski) wrote :

I'd love to do so Martin but my Notebook is being repaired so I don't currently have a PC running Ubuntu available.

Revision history for this message
Alexander Domanski (alexander-domanski) wrote :
Download full text (53.6 KiB)

Okay, I finally got my old Notebook running Breezy:

adomanski@lts001:~ $ LANG=en_GB.utf8 gphoto2 --debug -D 2> gphoto-delete-all.log
adomanski@lts001:~ $ cat gphoto-delete-all.log
0.000063 main(2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST:
0.000434 main(2): gphoto2 2.1.6
0.000498 main(2): gphoto2 has been compiled with the following options:
0.000554 main(2): + gcc (C compiler used)
0.000607 main(2): + no popt (for handling command-line parameters)
0.000660 main(2): + exif (for displaying EXIF information)
0.000713 main(2): + cdk (for accessing configuration options)
0.000765 main(2): + no aa (for displaying live previews)
0.000816 main(2): + jpeg (for displaying live previews in JPEG format)
0.000869 main(2): + readline (for easy navigation in the shell)
0.000935 main(2): libgphoto2 2.1.6
0.000994 main(2): libgphoto2 has been compiled with the following options:
0.001290 main(2): + gcc (C compiler used)
0.001349 main(2): + EXIF (for special handling of EXIF files)
0.001402 main(2): + no ltdl (working around buggy libltdl, eh? :-)
0.001455 main(2): + /proc/meminfo (adapts cache size to memory available)
0.001522 main(2): libgphoto2_port 0.5.1
0.001584 main(2): libgphoto2_port has been compiled with the following options:
0.001638 main(2): + gcc (C compiler used)
0.001691 main(2): + USB (for USB cameras)
0.001744 main(2): + serial (for serial cameras)
0.001796 main(2): + no resmgr (serial port access and locking)
0.001849 main(2): + no baudboy (serial port locking)
0.001902 main(2): + no ttylock (serial port locking)
0.001954 main(2): + no lockdev (serial port locking)
0.002006 main(2): + no ltdl (working around buggy libltdl, eh? :-)
0.002098 foreach(2): Executing action 'Delete all Files' for folder '/'.
0.002180 gphoto2-camera(2): Deleting all files in '/'...
0.002250 gphoto2-camera(2): Initializing camera...
0.002351 gphoto2-port-usb(1): Looking for USB device (vendor 0x4a9, product 0x30ef)... found.
0.002421 gphoto2-port-usb(1): Detected defaults: config 1, interface 0, altsetting 0, inep 81, outep 02, intep 83, class 06, subclass 01
0.002488 gphoto2-camera(2): Loading '/usr/lib/gphoto2/2.1.6/libgphoto2_ptp2.so'...
0.003198 gphoto2-port(2): Opening USB port...
0.003481 gphoto2-port(0): Could not query kernel driver of device.
0.003653 gphoto2-port(2): Setting timeout to 8000 millisecond(s)...
0.003752 ptp(2): PTP: Opening session
0.003839 gphoto2-port(2): Writing 16=0x10 byte(s) to port...
0.003919 gphoto2-port(3): Hexdump of 16 = 0x10 bytes follows:
0000 10 00 00 00 01 00 02 10-00 00 00 00 01 00 00 00 ................

0.006086 gphoto2-port(2): Reading 512=0x200 bytes from port...
0.011329 gphoto2-port(2): Could only read 12 out of 512 byte(s)
0.011589 gphoto2-port(3): Hexdump of 12 = 0xc bytes follows:
0000 0c 00 00 00 03 00 01 20-00 00 00 00 ....... ....

0.011772 gphoto2-port(2): Writing 12=0xc byte(s) to port...
0.011845 gphoto2-port(3): Hexdump of 12 = 0xc bytes follows:
0000 0c 00 00 00 01 00 01 10-01 00 00 00 ............

0.013064 gphoto2-port(2): Reading 512=0x200 bytes from port...
0.020054 gphoto2-port(2): Could only read 285 ou...

Martin Pitt (pitti)
Changed in libgphoto:
assignee: nobody → hub
Revision history for this message
rubinstein (rubinstein) wrote :

I also have a Canon 350D and can confirm this behaviour both under breezy and dapper.

I get a "ptp: ... reading event ... 0x2002 ... error", but my photos are correctly downloaded and deleted, but it takes a rather long time to delete the photos.

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

Hubert, do you have an idea about this?

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

This is a bug in the PTP2 driver of libgphoto2.

I have fixed it _after_ the 2.1.99 release, so it will only be available then.

svn diff -r8520:8521

is the patch

Revision history for this message
Hubert Figuiere (hub) wrote : Patch to fix the bug

Attached is the patch to fix the bug taken from the SVN as mentionned by Marcus. I'm not sure it will apply cleanly as some lines in the camera list may not be in 2.1.6. If you need help integrating in the current package, let me know.

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

 libgphoto2 (2.1.6-5.2ubuntu7) dapper; urgency=low
 .
   * Applied upstream patch to fix delete command handling of some Canon
     cameras. Also added a few more Canon Vendor/Product IDs. Thanks to Marcus
     Meissner and Hubert Figuiere! Closes: LP#2767

Changed in libgphoto2:
status: Unconfirmed → Fix Released
Revision history for this message
Hubert Figuiere (hub) wrote :

patch is in upstream 2.2.0 and later. closing that one.

Changed in libgphoto:
status: Unconfirmed → Fix Released
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.