Summary: | simple creating document and closing Krita generating leak | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Scott Petrovic <scottpetrovic> |
Component: | General | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimula73, halla, smjert |
Priority: | NOR | ||
Version: | 2.9 Beta | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Scott Petrovic
2014-07-21 02:50:33 UTC
Hi, Scott! I've updated Krita Lime yesterday, could you please check whether the bug still persists. We did some fundamental changes in the tile storage and allocation since then and I guess I was fixing such bug then. I will mark the bug as NEEDSINFO. If you still see the bug, please reopen the bug as UNCONFIRMED again. hi Dmitri, I switched to building from src to be slightly more up to date. I pulled the latest. the terminal is showing something slightly different now. QCoreApplication::postEvent: Unexpected null receiver QCoreApplication::postEvent: Unexpected null receiver WARNING: trying to purge pool memory while there are used tiles present! The memory will *NOT* be returned to the system, though it will be reused by Krita internally. Please report to developers! QGLContext::makeCurrent(): Cannot make invalid context current. QGLContext::makeCurrent(): Cannot make invalid context current. QGLContext::makeCurrent(): Cannot make invalid context current. QGLContext::makeCurrent(): Cannot make invalid context current. QGLContext::makeCurrent(): Cannot make invalid context current. QGLContext::makeCurrent(): Cannot make invalid context current. QGLContext::makeCurrent(): Cannot make invalid context current. ** (krita:21084): WARNING **: 1 dictionaries weren't free'd. Not sure if that helps. I see this all the time, too. THe QGLContext warning is bogus, though. Since the issue described here is very similar i'll report it here: Using (current) latest version of Krita from git, opening and closing documents leaks memory. In the link below (it's 14.7MB) there's a profile i did with valgrind, i've opened and closed two times an exr image (32bitF, 4096x4096). https://dl.dropboxusercontent.com/u/9553318/kritaopencloseleak.xml I have addional informations about this problem: 1) A KoCanvasResourceManager is being created when Krita opens, then stuff added to it. 2) When a document is opened a new KoCanvasResourceManager is created (due to the new view and the new canvas), and its underlying KoResourceManager receives 4 items. 3) This new manager though is immediately deleted after that because the first KoCavasResourceManager is set as the shared one. 4) Then the 4 items added to the second KoCanvasResourceManager now are added back to the shared one. 5) When one closes the document though nothing is removed from the manager and this cycles continues everytime one closes and reopens images/documents, infact though debugging, one can see the manager having the underlying KoResourceManager QHash increase the number of items held each time a new document is opened. This is one of the path i've found that holds shared pointers.. there may be others though. Ah! I wonder if that's fixed by DMitry's commit a2ccc43c8955498a33d9444451e181dbbb07fa1a That one, according to Valgrind, seems to be fixed, there's another leak though that adds roughly 85MB opening and closing an image that (the first time it's opened), adds 200MB. When Krita is closed it reports that tiles are leaked and Valgrind reports them, i'll try to see later if i can do something about it, otherwise i'll just add the report here. I am not sure when it happened, but this bug got fixed at some point. I cannot reproduce this with the steps I originally outlined. I am going to mark it as resolved. |