Bug 278844

Summary: kio_kamera leaks memory when copying large files from camera
Product: [Unmaintained] kio Reporter: Michał <mcv>
Component: kameraAssignee: Marcus Meissner <marcus>
Status: CONFIRMED ---    
Severity: normal CC: null
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Michał 2011-07-30 11:11:53 UTC
Version:           unspecified (using KDE 4.6.5) 
OS:                Linux

Takes too much memory when copying files from camera over PTP. It's impossible to copy 2.5GB movie file with 2GB RAM.

Reproducible: Always

Steps to Reproduce:
1. Connect camera (eg. EOS 7D) via USB.
2. Open file manager.
3. Drag&drop file sized over 2GB to local filesystem.

Actual Results:  
Process kio_kamera takes too much memory, which makes system stop (due to swapping). If kernel kills the process due to OOM, Dolphin shows message about kio_kamera process exiting unexpectedly.

Expected Results:  
Process kio_kamera copies file to local fs without storing it in memory first.
Comment 1 Marcus Meissner 2011-07-30 21:21:24 UTC
The code reads in the whole file from the camera into memory and then pushes it out.

So you are not seeing a memory leak, but more a lack of pass-through mode for data.
Comment 2 null 2018-08-05 22:41:15 UTC
> pass-through mode
As far as I can tell from a short test, as of v18.07.90 kio_kamera.so still gobbles up memory when copying a large file, so this probably has not been implemented yet.