Bug 404759

Summary: Krita crashes when selecting the transform tool while a colorize mask layer is selected
Product: [Applications] krita Reporter: dieter.de.moitie
Component: Tools/TransformAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dieter.de.moitie, griffinvalley, halla
Priority: NOR    
Version First Reported In: 4.1.7   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: GNU debugger run of Krita
GNU debugger run of Krita (2)

Description dieter.de.moitie 2019-02-24 07:34:14 UTC
SUMMARY
Krita crashes when selecting the transform tool while a colorize mask layer is selected.

STEPS TO REPRODUCE
1: Create new document
2: Add vector layer
3: Add colorize mask to the new vector layer
4: Toggle the second to last icon on the colorize mask to disable "Edit Key Strokes"
5: Select the transform tool

OBSERVED RESULT
Krita crashes

EXPECTED RESULT
a) The ability to transform a colorize mask
b) If this action is not supported, I suggest to change the mouse icon to indicate that this layer cannot be moved, like when using the transform tool on a locked layer. 


SOFTWARE/OS VERSIONS
Krita
  Version: 4.1.7.101

Qt
  Version (compiled): 5.11.3
  Version (loaded): 5.11.3

OS Information
  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.20.6-200.fc29.x86_64
  Pretty Productname: Fedora 29 (Workstation Edition)
  Product Type: fedora
  Product Version: 29

OpenGL Info
  **OpenGL not initialized**
Comment 1 Halla Rempt 2019-02-25 12:46:09 UTC
I cannot reproduce this crash. Could you please install debug symbols and provide a backtrace and a terminal log?
Comment 2 dieter.de.moitie 2019-02-25 20:51:00 UTC
Created attachment 118364 [details]
GNU debugger run of Krita

See attached. Is this what you are looking for?
Comment 3 Halla Rempt 2019-02-25 22:22:34 UTC
Almost -- this only shows one line of the backtrace. Please type

'thread apply all bt'

and scroll through to the end, and attach the complete output.
Comment 4 Bug Janitor Service 2019-02-26 04:33:07 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 dieter.de.moitie 2019-02-26 06:07:58 UTC
Created attachment 118368 [details]
GNU debugger run of Krita (2)

See attached
Comment 6 dieter.de.moitie 2019-03-02 20:12:38 UTC
Krita only crashes when the colorize mask layer is selected when selecting the transform tool. 
If the vector layer is selected, it doesn't crash. However, only the vector layer will be transformed and never the colorize mask.
Comment 7 wolthera 2019-03-06 09:02:44 UTC
There's a backtrace, so I'm confirming this one.
Comment 8 Halla Rempt 2019-03-21 10:28:30 UTC
Git commit 2b6173878c577840c7728e77ef4bb3907a862555 by Boudewijn Rempt, on behalf of Ashwin Dhakaita.
Committed on 21/03/2019 at 10:27.
Pushed by rempt into branch 'master'.

Fix crash when using the transform tool on a colorize mask

This fixes a crash when the transform tool is selected while
using a colorize mask in the layer stack with edit-key-strokes
option set to OFF.

Differential Revision:  https://phabricator.kde.org/D19906

M  +19   -0    libs/ui/tool/kis_tool.cc
M  +10   -0    libs/ui/tool/kis_tool.h
M  +0    -18   libs/ui/tool/kis_tool_paint.cc
M  +0    -10   libs/ui/tool/kis_tool_paint.h
M  +1    -1    libs/ui/tool/kis_tool_polyline_base.cpp
M  +1    -1    libs/ui/tool/kis_tool_rectangle_base.cpp
M  +2    -2    plugins/tools/basictools/kis_tool_line.cc
M  +12   -0    plugins/tools/tool_transform2/kis_tool_transform.cc

https://commits.kde.org/krita/2b6173878c577840c7728e77ef4bb3907a862555