libgphoto2 does not allow capture (unspecified error) on Canon S5 IS

Bug #337990 reported by b
2
Affects Status Importance Assigned to Milestone
libgphoto2 (Ubuntu)
Fix Released
Undecided
Martin Pitt

Bug Description

Binary package hint: libgphoto2-2

On debian lenny (libgphoto2-2 2.4.1-3) the following commands work fine on my camera:

$ gphoto2 --set-config capture=on
 value on, t 1
No event yet, we'll try later.
$ gphoto2 --capture-image

*** Error ***
Canon Capture failed: 2019
ERROR: Could not capture.
*** Error (-1: 'Unspecified error') ***

Not so in ubuntu (libghoto2-2 2.4.2-0ubuntu3).

I've confirmed (with both gphoto and my own libgphoto code) that the issue is that gp_camera_capture() returns -1. On debian the call works fine, in both 2.4.1 and 2.4.4 (the latter compiled from source.

Attached is the extra libgphoto debug info.

tested on an up to date intrepid eeepc.

Related branches

Revision history for this message
b (ben-ekran) wrote :
Revision history for this message
b (ben-ekran) wrote : gphoto capture-image not working in ubuntu? (intrepid)

Hey all,

I've been developing on my lenny machine for my Canon S5 IS camera.

Things have been working well (except for the awkward udev stuff).

I wanted to run my application on my eeepc laptop (ubuntu intrepid) when
I got this error when I try to do an image capture, set-config
capture=on works fine:

$ gphoto2 --set-config capture=on
 value on, t 1

No event yet, we'll try later.

$ gphoto2 --capture-image

*** Error ***
Canon Capture failed: 2019
ERROR: Could not capture.
*** Error (-1: 'Unspecified error') ***

So I thought it was a buggy gphoto ubuntu package (reported as bug
#337990
), and compiled gphoto and libghoto 2.4.4 from source.

Problem is that the same error happens! :(

I've tried 2.4.2, 2.4.3 and 2.4.4 in packages and compiled from source
on two different ubuntu machines.

I really need to be able to use my app with the laptop, and would rather
not reinstall it with debian (though I may need to).

Attached is the gphoto logfile.

Please let me know what I can do to debug this issue.

Since it works in lenny, with the same version of gphoto/libgphoto it
must be something else. Here are the libs ldd listed libs for ubuntu:

 linux-gate.so.1 => (0xb7f3d000)
 libcdk.so.5 => /usr/lib/libcdk.so.5 (0xb7ed1000)
 libncurses.so.5 => /lib/libncurses.so.5 (0xb7ea1000)
 libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xb7e81000)
 libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7e68000)
 libreadline.so.5 => /lib/libreadline.so.5 (0xb7e37000)
 libgphoto2.so.2 => /usr/lib/libgphoto2.so.2 (0xb7dbb000)
 libgphoto2_port.so.0 => /usr/lib/libgphoto2_port.so.0 (0xb7db1000)
 libexif.so.12 => /usr/lib/libexif.so.12 (0xb7d87000)
 libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d61000)
 libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xb7d58000)
 libpopt.so.0 => /lib/libpopt.so.0 (0xb7d4e000)
 libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bf0000)
 libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7beb000)
 /lib/ld-linux.so.2 (0xb7f23000)
 libltdl.so.7 => /usr/lib/libltdl.so.7 (0xb7be2000)

and lenny:

 linux-gate.so.1 => (0xf7f09000)
 libcdk.so.5 => /usr/lib/libcdk.so.5 (0xf7eb2000)
 libncurses.so.5 => /lib/libncurses.so.5 (0xf7e7f000)
 libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0xf7e5f000)
 libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xf7e46000)
 libreadline.so.5 => /lib/libreadline.so.5 (0xf7e14000)
 libgphoto2.so.2 => /usr/lib/libgphoto2.so.2 (0xf7d9a000)
 libgphoto2_port.so.0 => /usr/lib/libgphoto2_port.so.0 (0xf7d92000)
 libexif.so.12 => /usr/lib/libexif.so.12 (0xf7d68000)
 libm.so.6 => /lib/i686/cmov/libm.so.6 (0xf7d42000)
 libusb-0.1.so.4 => /lib/libusb-0.1.so.4 (0xf7d3a000)
 libpopt.so.0 => /lib/libpopt.so.0 (0xf7d31000)
 libc.so.6 => /lib/i686/cmov/libc.so.6 (0xf7bd0000)
 libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xf7bcc000)
 /lib/ld-linux.so.2 (0xf7f0a000)
 libltdl.so.3 => /usr/lib/libltdl.so.3 (0xf7bc4000)

Let me know what else I can do to debug.
.b.

Revision history for this message
Marcus Meissner (meissner) wrote : Re: [gphoto-devel] gphoto capture-image not working in ubuntu? (intrepid)

On Wed, Mar 11, 2009 at 12:22:57PM -0700, B. Bogart wrote:
> Hey all,
>
> I've been developing on my lenny machine for my Canon S5 IS camera.
>
> Things have been working well (except for the awkward udev stuff).
>
> I wanted to run my application on my eeepc laptop (ubuntu intrepid) when
> I got this error when I try to do an image capture, set-config
> capture=on works fine:
>
> $ gphoto2 --set-config capture=on
> value on, t 1
>
> No event yet, we'll try later.
>
> $ gphoto2 --capture-image
>
>
> *** Error ***
> Canon Capture failed: 2019
> ERROR: Could not capture.
> *** Error (-1: 'Unspecified error') ***

This error might mean that the memory card is full.

Please also try a test snapshot with some Canon capture fixes:
 http://www.lst.de/~mm/libgphoto2-2.4.4.2.tar.bz2

Ciao, Marcus

Revision history for this message
b (ben-ekran) wrote :

Hello Marcus,

Seems unlikely that it would be a memory problem. I'm running the camera
without a capture card at all, and powered off in between tests (when
reattaching to various computers).

The good news is that 2.4.4.2 works on ubuntu! I just compiled and
recompiled gphoto2, and it now works fine.

Hard to say why it was not working before, but it is certainly working
in 2.4.4.2 on ubuntu.

I still can't shake the thinking that it could be some ubuntu/intrepid
shared library that is not compatible??

Thanks for your help.

B. Bogart

Marcus Meissner wrote:
> On Wed, Mar 11, 2009 at 12:22:57PM -0700, B. Bogart wrote:
>> Hey all,
>>
>> I've been developing on my lenny machine for my Canon S5 IS camera.
>>
>> Things have been working well (except for the awkward udev stuff).
>>
>> I wanted to run my application on my eeepc laptop (ubuntu intrepid) when
>> I got this error when I try to do an image capture, set-config
>> capture=on works fine:
>>
>> $ gphoto2 --set-config capture=on
>> value on, t 1
>>
>> No event yet, we'll try later.
>>
>> $ gphoto2 --capture-image
>>
>>
>> *** Error ***
>> Canon Capture failed: 2019
>> ERROR: Could not capture.
>> *** Error (-1: 'Unspecified error') ***
>
> This error might mean that the memory card is full.
>
> Please also try a test snapshot with some Canon capture fixes:
> http://www.lst.de/~mm/libgphoto2-2.4.4.2.tar.bz2
>
> Ciao, Marcus
>

Revision history for this message
Marcus Meissner (meissner) wrote : Re: [gphoto-devel] gphoto capture-image not working in ubuntu? (intrepid)

On Thu, Mar 12, 2009 at 09:38:58AM -0700, B. Bogart wrote:
> Hello Marcus,
>
> Seems unlikely that it would be a memory problem. I'm running the camera
> without a capture card at all, and powered off in between tests (when
> reattaching to various computers).
>
> The good news is that 2.4.4.2 works on ubuntu! I just compiled and
> recompiled gphoto2, and it now works fine.
>
> Hard to say why it was not working before, but it is certainly working
> in 2.4.4.2 on ubuntu.
>
> I still can't shake the thinking that it could be some ubuntu/intrepid
> shared library that is not compatible??
>
> Thanks for your help.

The 2.4.4 was using some too-short timeouts which could have caused
this behaviour.

So not sure where the issue was.

Ciao, Marcus

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

Nice, then it seems we should upgrade to the new upstream version. I'll review the changelog between 2.4.2 and 2.4.4, if it's only bug fixes, it's adequate for jaunty.

Changed in libgphoto2 (Ubuntu):
assignee: nobody → pitti
status: New → In Progress
Revision history for this message
b (ben-ekran) wrote : Re: [Bug 337990] Re: libgphoto2 does not allow capture (unspecified error) on Canon S5 IS

Hi Martin,

The issue I'm having is odd, as on ubuntu only 2.4.4.2 fixes the issue,
even though 2.4.2 works in lenny.

Here is a short quote from the upstream developers about this
inconsistency:

> On Thu, Mar 12, 2009 at 09:38:58AM -0700, B. Bogart wrote:
>>> Hello Marcus,
>>>
>>> Seems unlikely that it would be a memory problem. I'm running the
>>> camera without a capture card at all, and powered off in between
>>> tests (when reattaching to various computers).
>>>
>>> The good news is that 2.4.4.2 works on ubuntu! I just compiled and
>>> recompiled gphoto2, and it now works fine.
>>>
>>> Hard to say why it was not working before, but it is certainly
>>> working in 2.4.4.2 on ubuntu.
>>>
>>> I still can't shake the thinking that it could be some
>>> ubuntu/intrepid shared library that is not compatible??
>>>
>>> Thanks for your help.
>
> The 2.4.4 was using some too-short timeouts which could have caused
> this behaviour.
>
> So not sure where the issue was.
>
> Ciao, Marcus

Martin Pitt wrote:
> Nice, then it seems we should upgrade to the new upstream version.
> I'll review the changelog between 2.4.2 and 2.4.4, if it's only bug
> fixes, it's adequate for jaunty.
>
> ** Changed in: libgphoto2 (Ubuntu) Status: New => In Progress
>
> ** Changed in: libgphoto2 (Ubuntu) Assignee: (unassigned) => Martin
> Pitt (pitti)
>

Revision history for this message
b (ben-ekran) wrote :

Correction.

2.4.4 works in lenny, not in intrepid.

2.4.4.2 works in intrepid.

.b.

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

This bug was fixed in the package libgphoto2 - 2.4.5-1ubuntu1

---------------
libgphoto2 (2.4.5-1ubuntu1) karmic; urgency=low

  * Merge with Debian unstable. Remaining Ubuntu changes:
    - Use HAL's automatic ACLs instead of udev rules for controlling
      permissions on USB devices:
      + debian/control: Change udev recommendation to hal.
      + debian/libgphoto2-2.post{inst,rm}, debian/rules: Do not install/remove
        udev rules.
      + Drop debian/libgphoto2-2.README.Debian, since it does not apply.
      + debian/libgphoto2-2.dirs: Don't make the directory since we don't ship
        any udev rules.
  * New upstream version should fix Canon S5 IS. (LP: #337990)

libgphoto2 (2.4.5-1) unstable; urgency=low

  * New upstream release:
     - Fix typo on the “Nikon:CoolPix 4500” line (Closes: #342170).
     - Fix support for Canon EOS 5D Mark II (Closes: #520745). Thanks to
       Wolfram Quester for the report.
     - Fix support for Nikon CoolPix S60 (Closes: #520752). Thanks to
       Mathias Brodala for the report.
  * Disable patch:
     - 11_hurd_no_path_max_bsdsource: Disable for now, no longer applies.
  * Drop patch:
     - 60_udev_rules_are_autogenerated_notice: Merged upstream.
  * debian/rules:
     - Do not bump shlibs (no new symbols).
  * debian/control:
     - Bump Standards-Version from 3.8.0 to 3.8.1 (no changes needed).

libgphoto2 (2.4.4-1) unstable; urgency=low

  * New upstream release.
  * debian/copyright:
     - Update accordingly.
  * debian/rules:
     - Do not bump shlibs accordingly (no new symbols).

libgphoto2 (2.4.3-1) experimental; urgency=low

  * New upstream release.
  * debian/copyright:
     - Update accordingly.
  * debian/rules:
     - Bump SHLIBS accordingly (new symbols), from 2.4.0 to 2.4.3.
  * Switch from dpatch to quilt (run away!):
     - debian/control: Update Build-Depends.
     - debian/patches: Strip “.dpatch” suffix, rename 00list to series.
     - debian/rules: Update “include”, update dependency on patch stamp.
  * Drop previously-backported patches:
     - debian/patches/20_backport_initial_startup_speedup
     - debian/patches/30_backport_dropping_panasonic_ids
  * Disable the following patch. It was used to increase the
    CANON_FAST_TIMEOUT parameter which appeared to be too low. Since
    upstream increased it, let's no longer diverge from them. For the
    records, the original bugreport was #453114, but please open a new
    bugreport if the bug is back:
     - debian/patches/45_increase_canon_timeout

 -- Martin Pitt <email address hidden> Mon, 11 May 2009 17:46:02 +0200

Changed in libgphoto2 (Ubuntu):
status: In Progress → Fix Released
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.