gphoto / libgphoto2

The libgphoto2 camera access and control library.
GNU Lesser General Public License v2.1
995 stars 318 forks source link

trigger_capture error with FUJIFILM GFX 50R #366

Open seth-cohen opened 5 years ago

seth-cohen commented 5 years ago

First thank you for the wonderful library and your hard work maintaining it!!

Describe the bug With Fujifilm GFX 50R (newly added), capturing to sdram and no memory card installed. Capturing image and downloading works flawlessly with command:

gphoto2 --capture-image-and-download

see [section in reproducing error](#no-Issues-running---capture-image-and-download-ad-infinitum (practically)). I can run that command as many times in a row as I need. However, there are errors with trigger_capture.

Using gphoto2, only the very first time that I run the command:

gphoto2 --trigger-capture --wait-event-and-download=FILEADDED

will a photo actually be taken. All subsequent calls will fail. See issue with trigger capture in the section for reproducing the error (also there are links to the debug outputs). I have even tried deleting all files from camera in between successive calls to no avail.

Note that this is also the case when compiling and running the example sample-trigger-capture. Only the first time the capture is triggered will a photo be taken. The file isn't actually saved to hard drive though. Although the code does reach that execution path. However, all subsequent calls fail to even trigger the FILEADDED event. Yet I suspect the photo is actually being taken and stored in SDRAM.

Additionally, if I execute calls to:

gphoto2 --capture-image-and-download

after one or more calls to:

gphoto2 --trigger-capture --wait-event-and-download=FILEADDED

(with or without the wait-event-and-download) only the first executed command actually works to successfully download the file. See [this issue]() in section about reproducing the bug.

NOTE that I removed the extensive hex dump of the image data where it was available from the debug logs. However other than that nothing was removed.

I'm at a loss. Any ideas?

On a side note: Also, wondering if there should be a return here: https://github.com/gphoto/libgphoto2/blob/master/camlibs/ptp2/library.c#L5402. Otherwise ptp_initiatecapture() is called twice. I've added the return and compiled with and without that return and the symptoms are exactly the same.

Operating System MacOS High Sierra 10.13.6 (17G4015)

Name the camera

Model                          Port
----------------------------------------------------------
Fuji GFX 50 R                  usb:020,046

libgphoto2 and gphoto2 version compiled from source

gphoto2 2.5.20

Copyright (c) 2000-2018 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.20         clang, popt(m), no exif, no cdk, no aa, jpeg, readline
libgphoto2      2.5.22.1       all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

To Reproduce

Issue with trigger-capture

Issue capture-image-and-download following trigger-capture

As long as the photos are deleted from RAM we are good to go. Once 6 are in memory it can no longer work. I am shooting RAF files at around 110mb each.

seth-cohen commented 5 years ago

sorry, unfortunately the anchor links to the headers in the To Reproduce section are not working. :(