Bug 320865 - Krita warp tool affects locked layers and seems to be involved in a tile memory leak
Summary: Krita warp tool affects locked layers and seems to be involved in a tile memo...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (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: 2013-06-07 16:06 UTC by Sascha S.
Modified: 2013-12-19 05:43 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha S. 2013-06-07 16:06:17 UTC
Using the warp tool with a selection seems to be involved in some memory leakage somewhere.
An example output:
CRITICAL: According to statistics of the KisTileDataStore some tiles have leaked from the Krita control! 
CRITICAL: Tiles in memory: 2163 Total tiles: 2163 

The warp tool also has the power to modify locked drawing layers.

Reproducible: Always

Steps to Reproduce:
1. Create a selection.
2. Click transform tool button.
3. Click warp button in its tool options.
4. Drag warp vertices around

That seems to be all that is needed to introduce the leak. Switching to another tool also applies the warp to locked layers.
Actual Results:  
Warp tool affects locked layers and is apparently involved in a memory leak.

Expected Results:  
Warp tool does not affect locked layers and is not involved in a memory leak.

Tested with git master @ commit bf94b014b3a284a45d457bb07888da9ea306edc
Comment 1 Halla Rempt 2013-06-22 09:49:56 UTC
For the lock, yes, I can reproduce, On clicking apply I get the popup saying the layer is locked, but then on switching tools it applies anyway. I don't get the leak here, at least not with that test.
Comment 2 Dmitry Kazakov 2013-12-02 10:31:41 UTC
1) The leak seems to be introduced not by the Transform Tool, but by the Outline Selection tool (or, probably, some other selection tools as well)

2) And yes, both transform modes now modify locked layers
Comment 3 Dmitry Kazakov 2013-12-02 10:52:41 UTC
Git commit bbcda779b0fc43233aae6843d1d572cbe7883de4 by Dmitry Kazakov.
Committed on 02/12/2013 at 10:49.
Pushed by dkazakov into branch 'master'.

Fix KisToolTransform not to transform anything if the node is locked

M  +6    -4    krita/plugins/tools/tool_transform2/kis_tool_transform.cc

http://commits.kde.org/calligra/bbcda779b0fc43233aae6843d1d572cbe7883de4
Comment 4 Dmitry Kazakov 2013-12-02 11:48:26 UTC
Git commit 649c620bc5e9cd4263a3cd4e7d58f5a93360a1d5 by Dmitry Kazakov.
Committed on 02/12/2013 at 11:47.
Pushed by dkazakov into branch 'master'.

Fixed a memory leak in KisSelection

The circular dependencies between shared pointers in
KisSelectionMask<->KisSelection<->KisPixelSelection
caused memory to leak.

M  +4    -4    krita/image/kis_pixel_selection.cpp
M  +3    -3    krita/image/kis_pixel_selection.h
M  +1    -1    krita/image/kis_selection.cc

http://commits.kde.org/calligra/649c620bc5e9cd4263a3cd4e7d58f5a93360a1d5
Comment 5 Dmitry Kazakov 2013-12-02 11:55:46 UTC
Git commit 4934547f85d533dea43785a53d1904379607d2cf by Dmitry Kazakov.
Committed on 02/12/2013 at 11:47.
Pushed by dkazakov into branch 'calligra/2.8'.

Fixed a memory leak in KisSelection

The circular dependencies between shared pointers in
KisSelectionMask<->KisSelection<->KisPixelSelection
caused memory to leak.

M  +4    -4    krita/image/kis_pixel_selection.cpp
M  +3    -3    krita/image/kis_pixel_selection.h
M  +1    -1    krita/image/kis_selection.cc

http://commits.kde.org/calligra/4934547f85d533dea43785a53d1904379607d2cf
Comment 6 Dmitry Kazakov 2013-12-19 05:43:26 UTC
Git commit 17d2488555cb670d959f09dfb8c973d18b0213e8 by Dmitry Kazakov.
Committed on 02/12/2013 at 10:49.
Pushed by dkazakov into branch 'calligra/2.8'.

Fix KisToolTransform not to transform anything if the node is locked

M  +6    -4    krita/plugins/tools/tool_transform2/kis_tool_transform.cc

http://commits.kde.org/calligra/17d2488555cb670d959f09dfb8c973d18b0213e8