Bug 345407 - Krita eat to much memory (memory leak?), and sometimes crash.
Summary: Krita eat to much memory (memory leak?), and sometimes crash.
Status: RESOLVED DUPLICATE of bug 342336
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-21 21:48 UTC by sghpunk
Modified: 2015-03-24 18:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sghpunk 2015-03-21 21:48:36 UTC
When just editing image with 10 layers (Filter layers, filter masks, etc) or more, and close/open another image several times, Krita begins to eat more than 8Gb memory (system begins heavy swapping). And crash sometimes.


Reproducible: Sometimes

Steps to Reproduce:
I cannot reproduce it step by step. It's only happens sometime while I just edit some images...
Maybe It's because of undo levels? I have Undo stack size = 512

Actual Results:  
Krita eat to much memory (memory leak?)

Expected Results:  
Krita have to eat not so much memory ))

git commit dd8c1dc2c059786a4fcdaaf074cb103d1ca33a55

Backtrace: http://filebin.net/6c6cigg25g/krita-20150321-225918.kcrash.txt
Edited file example: http://filebin.net/6c6cigg25g/leak.kra
Comment 1 Halla Rempt 2015-03-24 18:58:12 UTC
Hi,

The crash actually happens inside the clipboard code -- that's something I don't understand, since your layers aren't so big.

But in any case, here your image takes about 4gb of memory, and if you push a lot of undo actions and copy entire layers to the clipboard, it's not too surprising that you reach 8gb of memory usage, especially since this is an 16 bit/channel image.

For the next kickstarter, we're going to look into ways to work on images at reduced sizes, too keep down the memory use. But at the moment, 8 gb isn't shocking for an image of this size and complexity.

We're tracking general memory leaks (of which there are several at the moment) in bug https://bugs.kde.org/show_bug.cgi?id=342336.

*** This bug has been marked as a duplicate of bug 342336 ***