Bug 422466 - Krita freezes when trying to edit markers for a vector layer
Summary: Krita freezes when trying to edit markers for a vector layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Vector (show other bugs)
Version: 4.3.0-beta2
Platform: Microsoft Windows Other
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2020-06-04 21:20 UTC by Dmitry Kazakov
Modified: 2020-06-05 09:08 UTC (History)
0 users

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 Dmitry Kazakov 2020-06-04 21:20:11 UTC
STEPS TO REPRODUCE
1. Create an image of 1500x1000 pixels
2. Add a vector layer
3. Draw a horizontal line with Ctrl modifier
4. Select a marker for this line
5. Try to change a marker several time (notice that the marker stops updating on the canvas!)
6. Try to make line width bigger (100+px)

Krita stops responding and the file cannot be saved because of almost infinite update of the markers.

The hangup is 100% reproducible here.
Comment 1 Dmitry Kazakov 2020-06-04 21:24:01 UTC
That is a regression against 4.2.9
Comment 2 Dmitry Kazakov 2020-06-05 07:56:24 UTC
Git commit 28cb6b1afcc05434665c0c23fa94068de95716fb by Dmitry Kazakov.
Committed on 05/06/2020 at 07:56.
Pushed by dkazakov into branch 'krita/4.3'.

Fix double updates when changing shape's marker

M  +5    -4    libs/flake/commands/KoPathShapeMarkerCommand.cpp

https://invent.kde.org/graphics/krita/commit/28cb6b1afcc05434665c0c23fa94068de95716fb
Comment 3 Dmitry Kazakov 2020-06-05 07:56:25 UTC
Git commit dce24a2887ed398204a20e79772829ad6acf4cf2 by Dmitry Kazakov.
Committed on 05/06/2020 at 07:56.
Pushed by dkazakov into branch 'krita/4.3'.

Fix freeze when changing shape's marker

KoMarker::maxInset() should not multiply the inset by the line
width, because it has already been multiplied in
KoMarker::boundingRect().

M  +0    -4    libs/flake/KoMarker.cpp

https://invent.kde.org/graphics/krita/commit/dce24a2887ed398204a20e79772829ad6acf4cf2
Comment 4 Dmitry Kazakov 2020-06-05 07:56:25 UTC
Git commit adc30236e4fe15e14c98358330eecac1af600b0f by Dmitry Kazakov.
Committed on 05/06/2020 at 07:56.
Pushed by dkazakov into branch 'krita/4.3'.

Don't update too much area around path shapes

outlineSweepWidth is 'width' of the line, not an inset. Therefore, we
should grow the bounding box by half of it, not by the full value.

M  +2    -1    libs/flake/KoPathShape.cpp

https://invent.kde.org/graphics/krita/commit/adc30236e4fe15e14c98358330eecac1af600b0f
Comment 5 Dmitry Kazakov 2020-06-05 07:56:25 UTC
Git commit 8c93348a311df72b8bb2381c0d98723768b07527 by Dmitry Kazakov.
Committed on 05/06/2020 at 07:56.
Pushed by dkazakov into branch 'krita/4.3'.

Notify KoShapeManager's r-tree about changing the shape's bounds

Otherwise, the tree will skip updating the area under the marker
until the shape is changed in a proper way.

M  +3    -0    libs/flake/KoPathShape.cpp

https://invent.kde.org/graphics/krita/commit/8c93348a311df72b8bb2381c0d98723768b07527
Comment 6 Dmitry Kazakov 2020-06-05 07:57:16 UTC
Git commit e2ce6347d630c1833babe1cfe1c27663b74af555 by Dmitry Kazakov.
Committed on 05/06/2020 at 07:56.
Pushed by dkazakov into branch 'master'.

Fix double updates when changing shape's marker

M  +5    -4    libs/flake/commands/KoPathShapeMarkerCommand.cpp

https://invent.kde.org/graphics/krita/commit/e2ce6347d630c1833babe1cfe1c27663b74af555
Comment 7 Dmitry Kazakov 2020-06-05 07:57:16 UTC
Git commit e361f9fe0f4c3a38347d380b85f8cc6d39fd7bf6 by Dmitry Kazakov.
Committed on 05/06/2020 at 07:56.
Pushed by dkazakov into branch 'master'.

Notify KoShapeManager's r-tree about changing the shape's bounds

Otherwise, the tree will skip updating the area under the marker
until the shape is changed in a proper way.

M  +3    -0    libs/flake/KoPathShape.cpp

https://invent.kde.org/graphics/krita/commit/e361f9fe0f4c3a38347d380b85f8cc6d39fd7bf6
Comment 8 Dmitry Kazakov 2020-06-05 07:57:16 UTC
Git commit 042ad182551efe29d64869e86edeab422fc15809 by Dmitry Kazakov.
Committed on 05/06/2020 at 07:57.
Pushed by dkazakov into branch 'master'.

Don't update too much area around path shapes

outlineSweepWidth is 'width' of the line, not an inset. Therefore, we
should grow the bounding box by half of it, not by the full value.

M  +2    -1    libs/flake/KoPathShape.cpp

https://invent.kde.org/graphics/krita/commit/042ad182551efe29d64869e86edeab422fc15809
Comment 9 Dmitry Kazakov 2020-06-05 07:57:16 UTC
Git commit ae5d76636c42880dc074a80d036663f00cb11b9e by Dmitry Kazakov.
Committed on 05/06/2020 at 07:57.
Pushed by dkazakov into branch 'master'.

Fix freeze when changing shape's marker

KoMarker::maxInset() should not multiply the inset by the line
width, because it has already been multiplied in
KoMarker::boundingRect().

M  +0    -4    libs/flake/KoMarker.cpp

https://invent.kde.org/graphics/krita/commit/ae5d76636c42880dc074a80d036663f00cb11b9e
Comment 10 Dmitry Kazakov 2020-06-05 09:08:11 UTC
Git commit 6fd1a2e68308fe35cba60d5e7b39872b18a7045b by Dmitry Kazakov.
Committed on 05/06/2020 at 07:58.
Pushed by rempt into branch 'krita/4.3.0'.

Fix double updates when changing shape's marker

M  +5    -4    libs/flake/commands/KoPathShapeMarkerCommand.cpp

https://invent.kde.org/graphics/krita/commit/6fd1a2e68308fe35cba60d5e7b39872b18a7045b
Comment 11 Dmitry Kazakov 2020-06-05 09:08:12 UTC
Git commit eca114cde93e20d19e79b6570e7c11a5a083bacc by Dmitry Kazakov.
Committed on 05/06/2020 at 07:58.
Pushed by rempt into branch 'krita/4.3.0'.

Fix freeze when changing shape's marker

KoMarker::maxInset() should not multiply the inset by the line
width, because it has already been multiplied in
KoMarker::boundingRect().

M  +0    -4    libs/flake/KoMarker.cpp

https://invent.kde.org/graphics/krita/commit/eca114cde93e20d19e79b6570e7c11a5a083bacc
Comment 12 Dmitry Kazakov 2020-06-05 09:08:12 UTC
Git commit 61b683a836db0e7c6c605cf405d5dd0838077955 by Dmitry Kazakov.
Committed on 05/06/2020 at 07:58.
Pushed by rempt into branch 'krita/4.3.0'.

Notify KoShapeManager's r-tree about changing the shape's bounds

Otherwise, the tree will skip updating the area under the marker
until the shape is changed in a proper way.

M  +3    -0    libs/flake/KoPathShape.cpp

https://invent.kde.org/graphics/krita/commit/61b683a836db0e7c6c605cf405d5dd0838077955
Comment 13 Dmitry Kazakov 2020-06-05 09:08:12 UTC
Git commit 5287dba3880cfa0ce3086ceff9b203d4daa23abf by Dmitry Kazakov.
Committed on 05/06/2020 at 07:58.
Pushed by rempt into branch 'krita/4.3.0'.

Don't update too much area around path shapes

outlineSweepWidth is 'width' of the line, not an inset. Therefore, we
should grow the bounding box by half of it, not by the full value.

M  +2    -1    libs/flake/KoPathShape.cpp

https://invent.kde.org/graphics/krita/commit/5287dba3880cfa0ce3086ceff9b203d4daa23abf