I have been having an issue with the Canon 1200D where it will not capture an image and reports back as -3: Out of memory. This seems to only happen when the capturetarget is set to 0 (sdram), regardless if a SD card is inserted or not. The camera also at the same time shows briefly PC Full on the screen, however I can verify storage is available on the host. I am able to repeat but at times it can take 60 images before the issue appears and other times back to back.
Also when I enable debug (--debug --debug-logfile=logfile.txt), it seems to always work...except for this one time (which I attached). Which leads me to think it is a filesystem size reporting issue to the camera, based on the "PC Full" on the OSD. Can confirm host space is available. If I enable debug to a file it works for over 1k captures, with debug not turned on it fails after 2-3 captures.
Error
Canon EOS Capture failed to release: Perhaps no more memory on card?
ERROR: Could not trigger image capture.
ERROR: Could not capture.
Error (-3: 'Out of memory')
I am using libgphoto 2.5.5.2 while testing the D3300 and others, but the 1200D issue happens in versions below this as well like 2.4.8.
Do you have any ideas as to what I can do to solve the issue or troubleshoot further?
Thank you,
this is weird .... if it works with --debug it might be a timing issue :/
(while there is a API where the Canon EOS can be told how much diskspace is on the machine, libgphoto2 makes up a sufficiently high value hopefully)
I added the wait-event for 1s and while it works better it still has the issue after about 15 captures. I also removed the setting of capturetarget=0 as suggested.
I see as you said the Available Shots flip flops from 0 to 42K.
This is at the end before the capture.
UNKNOWN PTP Property d1af changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d11c changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d11c changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d11c changed
UNKNOWN PTP Property d11b changed
UNKNOWN PTP Property d11b changed
It appears to send the capture destination and then get the avail shots, multiple times and its almost luck that the final one is not 0.
If I run get-config available shots with a wait-event of 2s it returns consistently, however with no wait-event it randomly returns 0.
Any ideas from this point?
Same Problem with gphoto2/libghoto2 2.5.6 (+ fix for Bug 996)
when calling gphoto2 --capture-image-and-download the out of memory error occurs at every call.
when calling gphoto2 --capture-image-and-download --capture-image-and-download -cap... (n-times)
the error occurs for the first capture-call (sometimes for the second too) but the following capture-calls work.
Same with gphoto --shell -> first capture fails, following capture works
Attached is a debug output from
gphoto2 --capture-image-and-download --debug --debugfile=debug_ciad.txt
gphoto2 is just fine!
I've been working with an application where I shift between liveview mode and capture-image - That worked just fine with canon 1000 D and 1100 D. But with 1200 D I can into the same issue:
ERROR: Could not trigger image capture.
ERROR: Could not capture.
Error (-3: 'Out of memory')
But then I found a fix which works: 'gphoto2 -D' "delete whatever might be stored" prior to executing the capture:
here we go:
make fifo file:
(only needed to be done once...)
mkfifo fifofile
liveView ON
gphoto2 --capture-movie --stdout > fifofile & omxplayer --live fifofile --win 800,0,1856,704 &
(--live option for omxplayer is to get delay short !!!)
Flush
gphoto2 -D
Capture image
gphoto2 --skip-existing --capture-image-and-download --force-overwrite --filename=PIC00001.jpg
NB: SDCARD must be in camera!
You might ask how I escape from LIVEVIEW mode ? and the answer is that I have added a piece of code to the file called actions.c (in gphoto2) - which looks for a file eg. "killfile". If that file is present it will break the frame-capture-loop (just as it had recieved Ctrl-C)
Then from my script I can simple "touch killfile" whenever I want to stop the liveview. (In the flow above such a touch killfile would be after some sleep N sec's just before the gphoto2 -D line.)
Marcus Meissner - can I get same functionality "out of the box" running gphoto2 in shell mode and send "some thing" by standard linux commands? - at first I tried using killall gphoto2 - but that would leave the camera with mirror open in liveview and prevent capture-image from happening...
Almost forgot to tell you this: There is an update to firmware 1.0.1 of the 1200 D camera (I found it while struckling with this error.) That update will fix the issue if you only have a sequence of capture-image. But in case you mix liveview and capture-image, the firmware update will not.
Above is with gphoto2 2.5.6 / lib 2.5.7- running Debian on a Raspberry Pi B.
Last edit: Henrik Lundquist 2015-11-10
Further findings:
My setup is with Auto Focus on, and shoting at a steady object (a PC monitor) - and a AC adaptor as powersupply for the camera (1200 D).
You know what? I ran my test script with 500 liveview's / image-capture yesterday. All fine. AND kept the camera ON ... then this moning I restarted my test script - and you know what? The error had come back! (without any changes to my setup.)
I then stopped the test and powered the camera OFF (by the switch on top) - and then back ON. And voila the test is running just fine.
So I conclude: "There is something with the firmware in Canon 1200 D " - OR alternatively the USB in Raspberry Pi...
Last edit: Henrik Lundquist 2015-11-11
Ahhh ---- There's no need to mod. the actions.c file to be able to control an exit from eg. a perl script:
simply run the gphoto2 "liveview" command with --shell
then the liveview can be stopped from perl by: system("exit");
Sorry for resurrecting an old ticket. I have a Canon Rebel T5. Everything worked great for about 15 shots, and then I started getting this error:
I tried running
gphoto2 -D
and does a quick little progress meter, but I continue to get the error. Any other tips? I've let the camera sit a few minutes turned off as well.FYI: I ended up reinstalling gphoto2 and this problem resolved.