Bug 395979

Summary: Starting Transform Tool Causes Crash
Product: [Applications] krita Reporter: astralis9
Component: Tools/TransformAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: crash CC: antti.savo, dimula73, halla, jcaonr, nathan, xiodetheone
Priority: NOR    
Version: 4.1.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: backtrace logged by GNU debugger

Description astralis9 2018-06-28 21:32:27 UTC
Created attachment 113634 [details]
backtrace logged by GNU debugger

Krita:    4.1.0
Desktop:  xfce 4.12
Qt5:      5.11.1-1

Instructions to replicate bug:

Open or create any file in Krita. Start the Transform tool, using either the toolbox icon or shortcut key (CTRL-t). Krita will immediately crash to desktop. I have never seen this bug in any earlier build, but it now always happens after upgrading to 4.1.0. Backtrace attached.
Comment 1 Nathan GDquest 2018-06-28 22:35:09 UTC
Confirmed, Ctrl T crashes Krita 4.1 every time.
Comment 2 Halla Rempt 2018-06-29 07:20:31 UTC
*** Bug 395987 has been marked as a duplicate of this bug. ***
Comment 3 Antti Savolainen 2018-06-29 13:01:15 UTC
Can you install krita with debug symbols so we can the exact point of code that the crash happens in?
Comment 4 Halla Rempt 2018-06-29 13:08:24 UTC
Also, please share your kritarc with us; Dmitry reports that resetting the config makes the crash go away, but we need to figure out which settings causes it.
Comment 5 Halla Rempt 2018-06-29 14:28:46 UTC
Okay, we found  the problem: 

If you experience a crash when enabling the transform tool in krita 4.1.0, go to your kritarc file (https://docs.krita.org/en/KritaFAQ.html#where-are-the-configuration-files-stored …) and remove the line that says "filterId=Box" in the [KisToolTransform] section. Sorry for the inconvenience.
Comment 6 Dmitry Kazakov 2018-06-29 17:19:49 UTC
A proposed patch fixing the problem:
https://phabricator.kde.org/D13796
Comment 7 astralis9 2018-06-29 21:38:08 UTC
Rempt,

I have removed the specified line from kritarc, and stopped the crashes. Clearly this is the same problem you've identified.
Comment 8 jcaonr 2018-07-01 05:29:14 UTC
In my Kritarc is only a line "filterId=Bicubic". When i remove it bug persists. Also it not only crashes when hitting ctrl+t, but also when pressing the button in the toolbox.
Comment 9 Halla Rempt 2018-07-01 07:49:55 UTC
Please make a backtrace in that case, because that must be something different then, and attach your kritarc to the bug reports.
Comment 10 Dmitry Kazakov 2018-07-01 08:58:17 UTC
Git commit 5f86c598a310da66006d29cb8976260d4853abf5 by Dmitry Kazakov.
Committed on 01/07/2018 at 08:58.
Pushed by dkazakov into branch 'master'.

Fix loading of files with 'Box' transformation filter

Summary:
We have released Krita with new name for the Box filter,
so now we have two variants for the name of this filer,
which is used in different places.

This patch adds aliases support for KoGenericRegistry and
makes 'Box' to be a variant for 'NearestNeighbour'

Test Plan:
0) Add the following section to kritarc
```
[KisToolTransform]
filterId=Box
```
1) Start Krita
2) Krita shouldn't crash
3) Also try for other filter ids: Bicubic, NearestNeighbor, Bilinear

Reviewers: #krita, rempt

Tags: #krita

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

M  +36   -5    interfaces/KoGenericRegistry.h
M  +3    -2    libs/image/kis_filter_strategy.cc

https://commits.kde.org/krita/5f86c598a310da66006d29cb8976260d4853abf5
Comment 11 Dmitry Kazakov 2018-07-04 08:57:03 UTC
Git commit a22b4d14dc6ad0f44fb31d3437c5cf434a66267d by Dmitry Kazakov.
Committed on 03/07/2018 at 11:57.
Pushed by dkazakov into branch 'krita/4.1'.

Fix loading of files with 'Box' transformation filter

Summary:
We have released Krita with new name for the Box filter,
so now we have two variants for the name of this filer,
which is used in different places.

This patch adds aliases support for KoGenericRegistry and
makes 'Box' to be a variant for 'NearestNeighbour'

Test Plan:
0) Add the following section to kritarc
```
[KisToolTransform]
filterId=Box
```
1) Start Krita
2) Krita shouldn't crash
3) Also try for other filter ids: Bicubic, NearestNeighbor, Bilinear

Reviewers: #krita, rempt

Tags: #krita

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

M  +36   -5    interfaces/KoGenericRegistry.h
M  +3    -2    libs/image/kis_filter_strategy.cc

https://commits.kde.org/krita/a22b4d14dc6ad0f44fb31d3437c5cf434a66267d
Comment 12 Halla Rempt 2018-07-16 09:51:29 UTC
*** Bug 396562 has been marked as a duplicate of this bug. ***