Hello,
I seem to have found a memory leak in gphoto2 that's reproducible. Every time I use the --filename option in conjunction with --wait-event-and-download=CAPTURECOMPLETE, I leak ram approximately equal to the size of the photos downloaded.
Case 1: don't set filename on --wait-event-and-download=CAPTURECOMPLETE
Starting RAM used: ~640m
Ending RAM used: ~640m
gphoto2 --set-config whitebalance=0 --set-config iso=9 --set-config highisonr=2 --set-config longexpnr=0 --set-config shutterspeed=1/4000 --set-config capturetarget=0 --trigger-capture
gphoto2 --set-config shutterspeed=1/1000 --trigger-capture
gphoto2 --set-config shutterspeed=1/500 --trigger-capture
gphoto2 --set-config shutterspeed=1/60 --trigger-capture
gphoto2 --set-config shutterspeed=1/8 --trigger-capture
gphoto2 --set-config shutterspeed=1.0 --trigger-capture --wait-event=2
gphoto2 --wait-event-and-download=CAPTURECOMPLETE --force-overwrite
Case 2: set filename on --wait-event-and-download=CAPTURECOMPLETE
Starting RAM used: ~640m
Ending RAM used: ~725m
gphoto2 --set-config whitebalance=0 --set-config iso=9 --set-config highisonr=2 --set-config longexpnr=0 --set-config shutterspeed=1/4000 --set-config capturetarget=0 --trigger-capture
gphoto2 --set-config shutterspeed=1/1000 --trigger-capture
gphoto2 --set-config shutterspeed=1/500 --trigger-capture
gphoto2 --set-config shutterspeed=1/60 --trigger-capture
gphoto2 --set-config shutterspeed=1/8 --trigger-capture
gphoto2 --set-config shutterspeed=1.0 --trigger-capture --wait-event=2
gphoto2 --wait-event-and-download=CAPTURECOMPLETE --force-overwrite --filename ""hdr_node_%Y%m%d-%H%M%S-%03n.%C""
Built from source on raspberry pi/raspbian Arm:
gphoto2 2.5.6 gcc, popt(m), exif, no cdk, no aa, jpeg, readline
libgphoto2 2.5.7 all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0 gcc, ltdl, USB, serial without locking
how do you find this ram usage?
once the gphoto2 process has terminated, the ram should be freed up.
the linux system might cache stuff and show higher values afterwards, even if not in use.