Bug 248942

Summary: Memory leak when using digikam Editor for Brightness/Contrast/Gamma
Product: [Applications] digikam Reporter: Alain Knaff <kde>
Component: Plugin-Editor-BCGAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 1.2.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 5.1.0

Description Alain Knaff 2010-08-24 23:19:44 UTC
Version:           1.2.0 (using KDE 4.2.4) 
OS:                Linux

When repeatedly using Brightness/Contrast/Gamma in the digikam editor, and then moving for the next photo using PgUp/PgDown, the digikam main process (i.e. not the editor) starts leaking memory

Reproducible: Always

Steps to Reproduce:
1. Start top to observe memory usage
2. Start digikam, and go to an album with lots of photos
3. click on first photo of album
4. Click Edit
5. Do a Brightness/Contrast/Gamma correction
6. Press PgDown to move to next photo
7. When prompted to save, save photo
8. Go to step 5.


Actual Results:  
Digikam starts using more and more memory. This is the main process, not the editor.


Expected Results:  
Memory usage should stay roughly constant

OS: Linux (x86_64) release 2.6.32-23-generic
Compiler: cc
Comment 1 Martin Klapetek 2010-08-24 23:26:05 UTC
If possible, please update to newer version 1.3.0 or wait few days for 1.4.0 to come out and please try again. 

Also, does it happen only with BCG filter or with orhers too? Please try using some other tools as well if you haven't already. Thanks.
Comment 2 Alain Knaff 2010-08-24 23:39:45 UTC
It seems to happen with "Free Rotation" and "Shear" as well, but to a lesser extent.

It doesn't seem to happen with "Rotate Left" and "Rotate Right" (i.e. 90ยบ rotations)
Comment 3 Marcel Wiesweg 2011-01-27 22:10:49 UTC
I could not see a clear memory leak testing BCG with 2.0 from SVN right now.

I recommend to test with valgrind's massif:
valgrind --tool=massif digikam
Then trigger the memory usage. The massif.out.*  file can be inspected with massif-visualizer, or attached here for this bug.
If there is really significant usage - like the memory climbing from 400 MB to 800 MB - then it is nicely visible.
Comment 4 caulier.gilles 2011-11-24 10:32:39 UTC
Alain,

It still valid for you with 2.x serie ?

Gilles Caulier
Comment 5 caulier.gilles 2011-12-18 17:23:46 UTC
Alain,

This file still valid using digiKam 2.4 ?

Gilles Caulier
Comment 6 caulier.gilles 2015-07-01 06:05:24 UTC
New digiKam 4.11.0 is available :

https://www.digikam.org/node/740

Can you reproduce the problem with this release ?
Comment 7 caulier.gilles 2016-07-15 13:22:11 UTC
With digiKam 5.0.0, this problem is not reproducible.
I close this file now. Don't hesitate to re-open if necessary.
Gilles Caulier