Bug 314846 - Crash (segmentation fault) switching layer with unapplied transformation
Summary: Crash (segmentation fault) switching layer with unapplied transformation
Alias: None
Product: krita
Classification: Unclassified
Component: Tools/Transform (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR critical
Target Milestone: ---
Assignee: Dmitry Kazakov
Depends on:
Reported: 2013-02-10 19:21 UTC by Tom Hall
Modified: 2013-03-09 22:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hall 2013-02-10 19:21:54 UTC
Beginning a transformation using the transform tool, then attempting to switch layers without applying or cancelling the transformation causes a Segmentation Fault.

The following is output to the terminal just before the crash:
WARNING: Transform Stroke: the device is absent in cache!

Reproducible: Always

Steps to Reproduce:
1. Create a document with at least 2 layers.
2. Make a selection.
3. Select the transform tool and transform the selection in some way (but don't press enter to apply the transformation).
4. Select a different layer via the layers docker.
Actual Results:  
Terminal output: "WARNING: Transform Stroke: the device is absent in cache!"
Segmentation Fault!!!

Expected Results:  
Don't crash, obviously.

(Not sure what it would do if it didn't segfault, but if there's any doubt, I suggest it should either discard the unfinished transformation, store it in some way so the user can continue transforming when they switch back to the layer, or show a dialog asking the user whether to apply/discard/cancel.)
Comment 1 Dmitry Kazakov 2013-02-10 20:03:26 UTC

Thank you for your report! I can reproduce this crash.
Comment 2 Dmitry Kazakov 2013-03-09 22:36:29 UTC
Git commit ddccc819070d86404e022487d686700d8e165927 by Dmitry Kazakov.
Committed on 09/03/2013 at 22:41.
Pushed by dkazakov into branch 'master'.

Fix a crash in the transform tool

The currentNode() can be changed when the stroke is finished
by switching the layers.

M  +10   -8    krita/plugins/tools/tool_transform2/kis_tool_transform.cc
M  +9    -2    krita/plugins/tools/tool_transform2/transform_transaction_properties.h