Bug 412747

Summary: Crashed when editing global selection mask (Safe assert: clonedDocument->image()->isIdle() at KisDocument.cpp 1006)
Product: [Applications] krita Reporter: acc4commissions
Component: Tools/SelectionAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: griffinvalley, halla
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: attachment
capture

Description acc4commissions 2019-10-09 04:28:03 UTC
Created attachment 123095 [details]
attachment

SUMMARY
git 835ca2e
Due to the request from https://bugs.kde.org/show_bug.cgi?id=412561

It crashed when editing global selection mask with select shape tool. 


SOFTWARE/OS VERSIONS
Windows: Win7
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Halla Rempt 2019-10-10 08:31:00 UTC
Hi, 

I'm sorry, but I haven't been able to reproduce this. I tried:

* create a new document
* select an ellipse
* select/show global selection mask
* select the select shape tool
* move or rotate the selection

Can you get the assert reliable using steps like this?
Comment 2 Dmitry Kazakov 2019-10-16 13:47:31 UTC
This crash looks to be the same as in bug 412835. And I fixed it on Monday :)

*** This bug has been marked as a duplicate of bug 412835 ***
Comment 3 acc4commissions 2019-10-17 13:41:39 UTC
Created attachment 123275 [details]
capture

I've got the assert message again, looking like the similar issue.
Comment 4 acc4commissions 2019-10-17 13:44:53 UTC
git eb5dfa0
Comment 5 acc4commissions 2019-10-30 22:39:49 UTC
It happens when krita autosaves.
Steps : 
1 Select an area 
2 Select the global selection mask(layer), 
3 Wait for krita to autosave
4 Assert

It also happens with raster selections.
Comment 6 Dmitry Kazakov 2019-11-11 12:14:26 UTC
I can reproduce it, thank you!
Comment 7 Dmitry Kazakov 2019-11-13 10:47:27 UTC
Git commit 77717dbb719642382c243f4834795e2546d2de22 by Dmitry Kazakov.
Committed on 13/11/2019 at 10:46.
Pushed by dkazakov into branch 'master'.

Disconnect move tool from canvas signals when it is not activated

M  +4    -3    plugins/tools/basictools/kis_tool_move.cc
M  +1    -0    plugins/tools/basictools/kis_tool_move.h

https://invent.kde.org/kde/krita/commit/77717dbb719642382c243f4834795e2546d2de22
Comment 8 Dmitry Kazakov 2019-11-13 10:47:27 UTC
Git commit c1f5d964ac8eb6cd78cd4ba46fa8b1f53bce579a by Dmitry Kazakov.
Committed on 13/11/2019 at 10:46.
Pushed by dkazakov into branch 'master'.

Fix KisShapeSelection not to cause any updates while cloning

M  +9    -1    libs/ui/flake/kis_shape_selection.cpp

https://invent.kde.org/kde/krita/commit/c1f5d964ac8eb6cd78cd4ba46fa8b1f53bce579a
Comment 9 Dmitry Kazakov 2019-11-13 10:47:28 UTC
Git commit be44f67e94f9dcb3e03d07bc4cec8f604555733c by Dmitry Kazakov.
Committed on 13/11/2019 at 10:46.
Pushed by dkazakov into branch 'master'.

Fix KisSelectionMask not to cause any updates when cloning

M  +10   -4    libs/image/kis_selection_mask.cpp

https://invent.kde.org/kde/krita/commit/be44f67e94f9dcb3e03d07bc4cec8f604555733c
Comment 10 Dmitry Kazakov 2019-11-13 10:47:28 UTC
Git commit b1bccb81547bff95e9e4d737771439106d6e94b2 by Dmitry Kazakov.
Committed on 13/11/2019 at 10:46.
Pushed by dkazakov into branch 'master'.

Fix cloning of the image with overlay selection mask

When cloning the image with a copy-ctor it should have exactly
the same state as before cloning. It includes the state of the
overlay selection mask. It guarantees that there will be no async
jobs running right after the operation.

When saving, we don't want the overlay mask be saved into the file,
therefore we should run a separate action to disable it.

M  +8    -8    libs/image/kis_image.cc
M  +10   -5    libs/image/tests/kis_image_test.cpp
M  +6    -0    libs/ui/KisDocument.cpp

https://invent.kde.org/kde/krita/commit/b1bccb81547bff95e9e4d737771439106d6e94b2
Comment 11 Dmitry Kazakov 2019-11-14 13:30:06 UTC
Git commit fd1a6dbabf4c2c1a4886c81756af5e3d8946ef22 by Dmitry Kazakov.
Committed on 14/11/2019 at 09:10.
Pushed by dkazakov into branch 'krita/4.2'.

Fix KisShapeSelection not to cause any updates while cloning

M  +9    -1    libs/ui/flake/kis_shape_selection.cpp

https://invent.kde.org/kde/krita/commit/fd1a6dbabf4c2c1a4886c81756af5e3d8946ef22
Comment 12 Dmitry Kazakov 2019-11-14 13:30:06 UTC
Git commit 8ecdb5978bd7ed8b3a26d6c9ede6cd79bb34963b by Dmitry Kazakov.
Committed on 14/11/2019 at 09:10.
Pushed by dkazakov into branch 'krita/4.2'.

Fix KisSelectionMask not to cause any updates when cloning

M  +10   -4    libs/image/kis_selection_mask.cpp

https://invent.kde.org/kde/krita/commit/8ecdb5978bd7ed8b3a26d6c9ede6cd79bb34963b
Comment 13 Dmitry Kazakov 2019-11-14 13:30:06 UTC
Git commit 53c2901a5756317677e338d6a79b2ea3bbd6bc90 by Dmitry Kazakov.
Committed on 14/11/2019 at 09:23.
Pushed by dkazakov into branch 'krita/4.2'.

Fix cloning of the image with overlay selection mask

When cloning the image with a copy-ctor it should have exactly
the same state as before cloning. It includes the state of the
overlay selection mask. It guarantees that there will be no async
jobs running right after the operation.

When saving, we don't want the overlay mask be saved into the file,
therefore we should run a separate action to disable it.

# Conflicts:
#	libs/image/kis_image.cc

M  +11   -2    libs/image/kis_image.cc
M  +10   -5    libs/image/tests/kis_image_test.cpp
M  +6    -0    libs/ui/KisDocument.cpp

https://invent.kde.org/kde/krita/commit/53c2901a5756317677e338d6a79b2ea3bbd6bc90
Comment 14 Dmitry Kazakov 2019-11-14 13:30:06 UTC
Git commit 1b027e4fbc2ec88ac69bb556149e35fcbb466418 by Dmitry Kazakov.
Committed on 14/11/2019 at 09:10.
Pushed by dkazakov into branch 'krita/4.2'.

Disconnect move tool from canvas signals when it is not activated

M  +4    -3    plugins/tools/basictools/kis_tool_move.cc
M  +1    -0    plugins/tools/basictools/kis_tool_move.h

https://invent.kde.org/kde/krita/commit/1b027e4fbc2ec88ac69bb556149e35fcbb466418