Bug 328732

Summary: Crash with lots of memory usage while rebuilding thumbnails
Product: [Applications] digikam Reporter: regi.hops
Component: Maintenance-ThumbsAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: caulier.gilles
Priority: NOR    
Version: 3.5.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 6.3.0
Attachments: Memory Usage after 20% rebuild process
Memory Usage after 40% rebuild process

Description regi.hops 2013-12-12 21:13:47 UTC
My album collection consists of >9000 pictures divided in 110 folders.
If I select these albums in Extras/Maintenance to rebuild the thumbnails (with option to "Scan for changed..." set) and start the process, it uses all available memory (RAM and virtual) until it crash.
No crash report is generated.
Of course the system is getting nearly unusable after swapping starts.





Reproducible: Always

Steps to Reproduce:
1. Start digiKam
2. Extras -> Maintenance
3. Select all children of a large Album (>5000 images)
4. Rebuild thumbnails
Actual Results:  
Whole memory is used and after a while digiKam crashes

Expected Results:  
Much less memory usage
Don't crash

If selecting "Use all CPU cores" the memory fills up even faster. 

System is:
openSUSE 13.1 x86/64 Bit
KDE 4.11.4
digiKam 3.5.0
8 GB RAM
Quad core CPU
Comment 1 regi.hops 2013-12-12 21:19:15 UTC
Created attachment 84067 [details]
Memory Usage after 20% rebuild process
Comment 2 regi.hops 2013-12-12 21:19:56 UTC
Created attachment 84068 [details]
Memory Usage after 40% rebuild process
Comment 3 caulier.gilles 2013-12-12 21:37:30 UTC
Fixed in digiKam 4.0.0 beta1

Gilles Caulier

*** This bug has been marked as a duplicate of bug 326525 ***
Comment 4 Maik Qualmann 2017-12-17 19:21:34 UTC
Git commit 6a9fd9891a3ff341dc42fe36158cbf0101d513b6 by Maik Qualmann.
Committed on 17/12/2017 at 19:20.
Pushed by mqualmann into branch 'master'.

delete threads from memory when they are finished
Related: bug 375317, bug 375035, bug 321784, bug 325712, bug 330227, bug 331912, bug 344661, bug 345395, bug 350549, bug 381877, bug 338249, bug 329651, bug 329091, bug 387821, bug 381222

M  +2    -1    NEWS
M  +25   -0    libs/database/dbjobs/dbjobsmanager.cpp
M  +35   -0    libs/iojobs/iojobsmanager.cpp

https://commits.kde.org/digikam/6a9fd9891a3ff341dc42fe36158cbf0101d513b6
Comment 5 caulier.gilles 2017-12-17 20:01:46 UTC
Following this commit:

https://commits.kde.org/digikam/6a9fd9891a3ff341dc42fe36158cbf0101d513b6

... the approach to fix this problem is under way and new digiKam 5.8.0 pre-release bundles will be compiled tonight to lets a chance to end-users to give a feedback about this fix before the 5.8.0 official release planed before Christmas 2017.

The bundles will be available in 2 hours at this url:

https://files.kde.org/digikam/

Please do not waste time to test if this file is always valid for next 5.8.0.

Thanks in advance

Gilles Caulier
Comment 6 caulier.gilles 2019-08-15 08:04:20 UTC
Fixed with bug #326525