[Bug 243692] New: Digikam uses all memory with thumbnails

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] New: Digikam uses all memory with thumbnails

Bugzilla from freanki@gmx.net
https://bugs.kde.org/show_bug.cgi?id=243692

           Summary: Digikam uses all memory with thumbnails
           Product: digikam
           Version: 1.3.0
          Platform: Unlisted Binaries
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Version:           1.3.0 (using KDE 4.4.4)
OS:                Linux

When I start Digikam it uses 200 MB of my memory. After some work it is over
400 mb. But I experienced some (nearly) crashes of my system with my harddrive
running and running, the system hardly reacting anymore. Always while Digikam
running. I found out that I let digikam show a tag with more than 10.000
pictures when this happens.
I could reproduces this while surfing through my albums and the memory
increasing all the time.

I'm using Digikam 1.3 precompiled as written on
http://www.digikam.org/drupal/node/528 but I think I was having that bug before
too.

Reproducible: Always

Steps to Reproduce:
Open a big album and watch your memory getting full. Watch some more until your
memory is full and your computer gets reaaaaally slow :)

Actual Results:  
Only a CTRL + ALT + DEL brings your system back...

Expected Results:  
It should only use a specific amount of memory. Not everything it gets ;)

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] Digikam uses all memory with thumbnails

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=243692


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
          Component|general                     |Thumbnails




--- Comment #1 from Gilles Caulier <caulier gilles gmail com>  2010-07-06 13:27:21 ---
Run digiKam through valgrind to check where memory is lost (not reproducible
here)...

http://lxr.kde.org/source/extragear/graphics/digikam/HACKING#241

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] Digikam uses all memory with thumbnails

Bugzilla from freanki@gmx.net
In reply to this post by Bugzilla from freanki@gmx.net
https://bugs.kde.org/show_bug.cgi?id=243692





--- Comment #2 from Frank Hommes <freanki gmx net>  2010-07-06 14:39:37 ---
I guess its not really a memory leak.

When I choose a specific tag with more than 10.000 pictures it tries to load
ALL of the thumbnails into memory.
I just stopped the try out with valgrind when it used 2560476K of my memory.

It seems to be a bug in the design that only occurs with big collections.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] Digikam uses all memory with thumbnails

Marcel Wiesweg
In reply to this post by Bugzilla from freanki@gmx.net
https://bugs.kde.org/show_bug.cgi?id=243692





--- Comment #3 from Marcel Wiesweg <marcel wiesweg gmx de>  2010-07-06 17:15:44 ---
I can see a relevant problem in a log produces by "massif".
The QImage data produced by the ThumbnailCreator is leaked. Unfortunately,
massif of course does not tell me why it is leaked.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] Digikam uses all memory with thumbnails

Marcel Wiesweg
In reply to this post by Bugzilla from freanki@gmx.net
https://bugs.kde.org/show_bug.cgi?id=243692





--- Comment #4 from Marcel Wiesweg <marcel wiesweg gmx de>  2010-07-08 19:30:17 ---
I believe I have narrowed down the problem to the storage happening between
ThumbnailLoadThread::thumbnailLoaded and
ThumbnailLoadThread::slotThumbnailsAvailable. When I replace that mechanism
with direct signals, the leak is gone; but that's not an option, it blocking
the event queue.

In fact it's easy to check if there's a problem or not, just run digikam under
massif opening an album with a few hundred or thousand images. If there's no
leak, massif-visualizer shows a plateau at about 130MB. With the leak, it's
linearly increasing.

But currently I'm too blind to see the problem in the code.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] Digikam uses all memory with thumbnails

Marcel Wiesweg
In reply to this post by Bugzilla from freanki@gmx.net
https://bugs.kde.org/show_bug.cgi?id=243692


Marcel Wiesweg <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED




--- Comment #5 from Marcel Wiesweg <marcel wiesweg gmx de>  2010-07-28 20:13:45 ---
SVN commit 1156220 by mwiesweg:

Fix giant memory leak:
For pixmap generation, results are stored in a list and harvested in the main
thread,
in a slot called by an interthread signal. As an optimization, for the
thumbnail
pregeneration thread, pixmap creation was switched off.
Now these two facts interacted: Switching off pixmap creation was implemented
by
disconnecting the inter-thread signal, and all the thumbnail QImages were never
harvested
until application shutdown.

BUG: 243692

 M  +9 -7      thumbnailloadthread.cpp  
 M  +1 -0      thumbnailloadthread.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1156220

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 243692] Digikam uses all memory with thumbnails

Gilles Caulier-4
In reply to this post by Bugzilla from freanki@gmx.net
https://bugs.kde.org/show_bug.cgi?id=243692

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |1.4.0

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel