Memory leak when downlaoding via PTP (fixed)

Bug #5039 reported by Aigars Mahinovs
14
Affects Status Importance Assigned to Milestone
libgphoto
Fix Released
Undecided
Aigars Mahinovs
libgphoto2 (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

When downloading files with PTP the same amount of
memory is used as total amount of all files to be
downloaded. For example, today I was downloading 100
RAW photos from my Canon 350D with total size of 500Mb
and gphoto memory usage increased to 510Mb.

Bug fixed by disabling cache by commenting the line 1556 in
libgphoto2/gphoto2-filesys.c:
CR (gp_filesystem_set_file_noop (fs, folder, file, context));

After this one line change gphoto only uses 5-16 Mb of RAM.

The fixed package is just uploaded to sid.
Please sync to both dapper and breezy.

http://sourceforge.net/tracker/?func=detail&aid=1367324&group_id=8874&atid=108874

description: updated
Changed in libgphoto:
assignee: nobody → aigarius
status: Unconfirmed → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Easy fix, increasing Priority

Changed in libgphoto2:
assignee: nobody → pitti
status: Unconfirmed → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

 libgphoto2 (2.1.6-5.2ubuntu4) dapper; urgency=low
 .
   * libgphoto2/gphoto2-filesys.c: Disable file caching when downloading
     pictures to plug a giant memory hole. Thanks to Aigars Mahinovs.
     (Malone #5039)
   * Add debian/check_ptp_camera: udev script to check whether a device is a
     PTP (Photo Transfer Protocol) camera.
   * packaging/linux-hotplug/print-udev-rules.c: Add rule for calling
     check_ptp_camera to fix the currently broken one: just checking
     SYSFS{bInterfaceClass} does not work, since this attribute only applies to
     a subdevice of the camera. (Malone #31292)

Changed in libgphoto2:
status: Confirmed → Fix Released
Changed in libgphoto:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.