[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 --- Comment #10 from Dmitry Kazakov --- Git commit f3d61bf4e99a44dc1eba364f33141a777616afea by Dmitry Kazakov. Committed on 02/06/2020 at 09:49. Pushed by dkazakov into branch 'krita/4.3'. Remove an assert when cloning a shape selection The problem seem to have been fixed with my recent shapes' multithreading refactoring that changed all the signal compressors to be thread-safe. M +0-6libs/ui/flake/kis_shape_selection.cpp https://invent.kde.org/graphics/krita/commit/f3d61bf4e99a44dc1eba364f33141a777616afea -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Dmitry Kazakov changed: What|Removed |Added Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap |hics/krita/commit/a87dced5f |hics/krita/commit/6f283ca98 |88f26e282dfc86d18a3c32ecf68 |1fd8ecf3e85ba2fd8859e75e067 |fa96|0b80 --- Comment #10 from Dmitry Kazakov --- Git commit f3d61bf4e99a44dc1eba364f33141a777616afea by Dmitry Kazakov. Committed on 02/06/2020 at 09:49. Pushed by dkazakov into branch 'krita/4.3'. Remove an assert when cloning a shape selection The problem seem to have been fixed with my recent shapes' multithreading refactoring that changed all the signal compressors to be thread-safe. M +0-6libs/ui/flake/kis_shape_selection.cpp https://invent.kde.org/graphics/krita/commit/f3d61bf4e99a44dc1eba364f33141a777616afea --- Comment #11 from Dmitry Kazakov --- Git commit 6f283ca981fd8ecf3e85ba2fd8859e75e0670b80 by Dmitry Kazakov. Committed on 02/06/2020 at 09:49. Pushed by dkazakov into branch 'krita/4.3'. Fix undo breakage after converting a pixel selecion into a vector one Since 2013, when a selection is switched into a vector mode, its pixel selection is used as a projection. It is done intentionally, because we need a way to auto-flatten selection when someone opens a transaction on this devices. It lets all our painting tools work on selections smoothly without any conversions. And this switching used to break undo on the projection device. Obviously, the vectors are rendered on the device without any transactions, so we cannot undo them. To overcome this issue, a special mechanism "reincarnation with detached history" for paint devices was introduced (KisPaintDevice::reincarnateWithDetachedHistory). When a device reincarnates, it starts a new undo history from scratch.The old undo history is kept intact inside the returned command, so the device can later be recovered to its original state. As a consequence, there is an important API change in KisSelection, now the seleciton should be converted to vector mode explicitly and undo command for it should be kept in the common image's undo history (that was the reason of the previous huge patch for KoShapeControllerBase). M +15 -0libs/image/kis_paint_device.cc M +19 -0libs/image/kis_paint_device.h M +40 -0libs/image/kis_paint_device_data.h M +152 -28 libs/image/kis_selection.cc M +20 -5libs/image/kis_selection.h M +38 -19 libs/image/kis_transaction_data.cpp M +2-0libs/image/kis_transaction_data.h M +1-6libs/image/tests/CMakeLists.txt M +6-5libs/image/tests/kis_selection_test.cpp M +2-2libs/libkis/Selection.cpp M +2-6libs/ui/flake/kis_shape_controller.cpp M +0-4libs/ui/flake/kis_shape_selection_model.cpp M +1-1libs/ui/kis_selection_decoration.cc M +3-3libs/ui/kis_selection_manager.cc M +167 -18 libs/ui/tests/kis_shape_selection_test.cpp M +2-0libs/ui/tests/kis_shape_selection_test.h M +1-1libs/ui/tests/util.h M +1-1plugins/impex/libkra/kis_kra_load_visitor.cpp M +2-2plugins/impex/libkra/kis_kra_save_visitor.cpp M +2-2plugins/impex/libkra/tests/kis_kra_saver_test.cpp M +4-4plugins/impex/libkra/tests/util.h https://invent.kde.org/graphics/krita/commit/6f283ca981fd8ecf3e85ba2fd8859e75e0670b80 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Dmitry Kazakov changed: What|Removed |Added Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap |hics/krita/commit/a87dced5f |hics/krita/commit/6f283ca98 |88f26e282dfc86d18a3c32ecf68 |1fd8ecf3e85ba2fd8859e75e067 |fa96|0b80 --- Comment #10 from Dmitry Kazakov --- Git commit f3d61bf4e99a44dc1eba364f33141a777616afea by Dmitry Kazakov. Committed on 02/06/2020 at 09:49. Pushed by dkazakov into branch 'krita/4.3'. Remove an assert when cloning a shape selection The problem seem to have been fixed with my recent shapes' multithreading refactoring that changed all the signal compressors to be thread-safe. M +0-6libs/ui/flake/kis_shape_selection.cpp https://invent.kde.org/graphics/krita/commit/f3d61bf4e99a44dc1eba364f33141a777616afea --- Comment #11 from Dmitry Kazakov --- Git commit 6f283ca981fd8ecf3e85ba2fd8859e75e0670b80 by Dmitry Kazakov. Committed on 02/06/2020 at 09:49. Pushed by dkazakov into branch 'krita/4.3'. Fix undo breakage after converting a pixel selecion into a vector one Since 2013, when a selection is switched into a vector mode, its pixel selection is used as a projection. It is done intentionally, because we need a way to auto-flatten selection when someone opens a transaction on this devices. It lets all our painting tools work on selections smoothly without any conversions. And this switching used to break undo on the projection device. Obviously, the vectors are rendered on the device without any transactions, so we cannot undo them. To overcome this issue, a special mechanism "reincarnation with detached history" for paint devices was introduced (KisPaintDevice::reincarnateWithDetachedHistory). When a device reincarnates, it starts a new undo history from scratch.The old undo history is kept intact inside the returned command, so the device can later be recovered to its original state. As a consequence, there is an important API change in KisSelection, now the seleciton should be converted to vector mode explicitly and undo command for it should be kept in the common image's undo history (that was the reason of the previous huge patch for KoShapeControllerBase). M +15 -0libs/image/kis_paint_device.cc M +19 -0libs/image/kis_paint_device.h M +40 -0libs/image/kis_paint_device_data.h M +152 -28 libs/image/kis_selection.cc M +20 -5libs/image/kis_selection.h M +38 -19 libs/image/kis_transaction_data.cpp M +2-0libs/image/kis_transaction_data.h M +1-6libs/image/tests/CMakeLists.txt M +6-5libs/image/tests/kis_selection_test.cpp M +2-2libs/libkis/Selection.cpp M +2-6libs/ui/flake/kis_shape_controller.cpp M +0-4libs/ui/flake/kis_shape_selection_model.cpp M +1-1libs/ui/kis_selection_decoration.cc M +3-3libs/ui/kis_selection_manager.cc M +167 -18 libs/ui/tests/kis_shape_selection_test.cpp M +2-0libs/ui/tests/kis_shape_selection_test.h M +1-1libs/ui/tests/util.h M +1-1plugins/impex/libkra/kis_kra_load_visitor.cpp M +2-2plugins/impex/libkra/kis_kra_save_visitor.cpp M +2-2plugins/impex/libkra/tests/kis_kra_saver_test.cpp M +4-4plugins/impex/libkra/tests/util.h https://invent.kde.org/graphics/krita/commit/6f283ca981fd8ecf3e85ba2fd8859e75e0670b80 --- Comment #12 from Dmitry Kazakov --- Git commit dbbaede31f5b1947957bbfae847c85236818577d by Dmitry Kazakov. Committed on 02/06/2020 at 09:49. Pushed by dkazakov into branch 'krita/4.3'. Remove shape tracking from KoShapeControllerBase Long ago, when Flake was flourishing as a cross-application framework, it supported shapes being toplevel shapes (that is, having no parent). It created a lot of troubles, because all the **roots** still had to be stored somewhere and some entity had to track shapes addition and removal from the hierarchy. That was exactly the reason why KoShapeControllerBase was born. Those days it was called KoShapeDocumentBase, which meant "a document that stores all shapes, including the root ones". Legends say that it was also supposed to add/remove shapes from KoShapeManager, but no written proofs of it survived. When Krita introduced vector layers, every vector layer became a flake's "canvas". Every canvas also had a KoShapeManager, that was responsible for painting the shapes. But Krita diverged from the expected way to track the shapes: instead of adding a KoShapeDocumentBase to every vector layer, it added only one "document" for all the layers. This document (now called KisShapeController) dispatched add/remove notifications to the active layer. That was fun, but never worked as expected. Due to complexity of signal delivery and multithreading, it could dispatch add/remove notifications
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Dmitry Kazakov changed: What|Removed |Added Status|CONFIRMED |RESOLVED Latest Commit||https://invent.kde.org/grap ||hics/krita/commit/a87dced5f ||88f26e282dfc86d18a3c32ecf68 ||fa96 Resolution|FIXED |FIXED Status|RESOLVED|CONFIRMED Latest Commit|https://invent.kde.org/grap | |hics/krita/commit/a87dced5f | |88f26e282dfc86d18a3c32ecf68 | |fa96| --- Comment #7 from Dmitry Kazakov --- Git commit a87dced5f88f26e282dfc86d18a3c32ecf68fa96 by Dmitry Kazakov. Committed on 29/05/2020 at 11:34. Pushed by dkazakov into branch 'master'. Fix undo breakage after converting a pixel selecion into a vector one Since 2013, when a selection is switched into a vector mode, its pixel selection is used as a projection. It is done intentionally, because we need a way to auto-flatten selection when someone opens a transaction on this devices. It lets all our painting tools work on selections smoothly without any conversions. And this switching used to break undo on the projection device. Obviously, the vectors are rendered on the device without any transactions, so we cannot undo them. To overcome this issue, a special mechanism "reincarnation with detached history" for paint devices was introduced (KisPaintDevice::reincarnateWithDetachedHistory). When a device reincarnates, it starts a new undo history from scratch.The old undo history is kept intact inside the returned command, so the device can later be recovered to its original state. As a consequence, there is an important API change in KisSelection, now the seleciton should be converted to vector mode explicitly and undo command for it should be kept in the common image's undo history (that was the reason of the previous huge patch for KoShapeControllerBase). M +15 -0libs/image/kis_paint_device.cc M +19 -0libs/image/kis_paint_device.h M +40 -0libs/image/kis_paint_device_data.h M +152 -28 libs/image/kis_selection.cc M +20 -5libs/image/kis_selection.h M +38 -19 libs/image/kis_transaction_data.cpp M +2-0libs/image/kis_transaction_data.h M +1-6libs/image/tests/CMakeLists.txt M +6-5libs/image/tests/kis_selection_test.cpp M +2-2libs/libkis/Selection.cpp M +2-6libs/ui/flake/kis_shape_controller.cpp M +0-4libs/ui/flake/kis_shape_selection_model.cpp M +1-1libs/ui/kis_selection_decoration.cc M +3-3libs/ui/kis_selection_manager.cc M +167 -18 libs/ui/tests/kis_shape_selection_test.cpp M +2-0libs/ui/tests/kis_shape_selection_test.h M +1-1libs/ui/tests/util.h M +1-1plugins/impex/libkra/kis_kra_load_visitor.cpp M +2-2plugins/impex/libkra/kis_kra_save_visitor.cpp M +2-2plugins/impex/libkra/tests/kis_kra_saver_test.cpp M +4-4plugins/impex/libkra/tests/util.h https://invent.kde.org/graphics/krita/commit/a87dced5f88f26e282dfc86d18a3c32ecf68fa96 --- Comment #8 from Dmitry Kazakov --- Git commit 5fcc49fb6126979e03739fa2fd8be063b5c2fc85 by Dmitry Kazakov. Committed on 29/05/2020 at 11:34. Pushed by dkazakov into branch 'master'. Remove an assert when cloning a shape selection The problem seem to have been fixed with my recent shapes' multithreading refactoring that changed all the signal compressors to be thread-safe. M +0-6libs/ui/flake/kis_shape_selection.cpp https://invent.kde.org/graphics/krita/commit/5fcc49fb6126979e03739fa2fd8be063b5c2fc85 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Dmitry Kazakov changed: What|Removed |Added Status|CONFIRMED |RESOLVED Latest Commit||https://invent.kde.org/grap ||hics/krita/commit/a87dced5f ||88f26e282dfc86d18a3c32ecf68 ||fa96 Resolution|FIXED |FIXED Status|RESOLVED|CONFIRMED Latest Commit|https://invent.kde.org/grap |https://invent.kde.org/grap |hics/krita/commit/a87dced5f |hics/krita/commit/a87dced5f |88f26e282dfc86d18a3c32ecf68 |88f26e282dfc86d18a3c32ecf68 |fa96|fa96 Status|CONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #7 from Dmitry Kazakov --- Git commit a87dced5f88f26e282dfc86d18a3c32ecf68fa96 by Dmitry Kazakov. Committed on 29/05/2020 at 11:34. Pushed by dkazakov into branch 'master'. Fix undo breakage after converting a pixel selecion into a vector one Since 2013, when a selection is switched into a vector mode, its pixel selection is used as a projection. It is done intentionally, because we need a way to auto-flatten selection when someone opens a transaction on this devices. It lets all our painting tools work on selections smoothly without any conversions. And this switching used to break undo on the projection device. Obviously, the vectors are rendered on the device without any transactions, so we cannot undo them. To overcome this issue, a special mechanism "reincarnation with detached history" for paint devices was introduced (KisPaintDevice::reincarnateWithDetachedHistory). When a device reincarnates, it starts a new undo history from scratch.The old undo history is kept intact inside the returned command, so the device can later be recovered to its original state. As a consequence, there is an important API change in KisSelection, now the seleciton should be converted to vector mode explicitly and undo command for it should be kept in the common image's undo history (that was the reason of the previous huge patch for KoShapeControllerBase). M +15 -0libs/image/kis_paint_device.cc M +19 -0libs/image/kis_paint_device.h M +40 -0libs/image/kis_paint_device_data.h M +152 -28 libs/image/kis_selection.cc M +20 -5libs/image/kis_selection.h M +38 -19 libs/image/kis_transaction_data.cpp M +2-0libs/image/kis_transaction_data.h M +1-6libs/image/tests/CMakeLists.txt M +6-5libs/image/tests/kis_selection_test.cpp M +2-2libs/libkis/Selection.cpp M +2-6libs/ui/flake/kis_shape_controller.cpp M +0-4libs/ui/flake/kis_shape_selection_model.cpp M +1-1libs/ui/kis_selection_decoration.cc M +3-3libs/ui/kis_selection_manager.cc M +167 -18 libs/ui/tests/kis_shape_selection_test.cpp M +2-0libs/ui/tests/kis_shape_selection_test.h M +1-1libs/ui/tests/util.h M +1-1plugins/impex/libkra/kis_kra_load_visitor.cpp M +2-2plugins/impex/libkra/kis_kra_save_visitor.cpp M +2-2plugins/impex/libkra/tests/kis_kra_saver_test.cpp M +4-4plugins/impex/libkra/tests/util.h https://invent.kde.org/graphics/krita/commit/a87dced5f88f26e282dfc86d18a3c32ecf68fa96 --- Comment #8 from Dmitry Kazakov --- Git commit 5fcc49fb6126979e03739fa2fd8be063b5c2fc85 by Dmitry Kazakov. Committed on 29/05/2020 at 11:34. Pushed by dkazakov into branch 'master'. Remove an assert when cloning a shape selection The problem seem to have been fixed with my recent shapes' multithreading refactoring that changed all the signal compressors to be thread-safe. M +0-6libs/ui/flake/kis_shape_selection.cpp https://invent.kde.org/graphics/krita/commit/5fcc49fb6126979e03739fa2fd8be063b5c2fc85 --- Comment #9 from Dmitry Kazakov --- Git commit 6172584f8512238bba8ceb3cda79fbbc87609dc9 by Dmitry Kazakov. Committed on 29/05/2020 at 11:34. Pushed by dkazakov into branch 'master'. Remove shape tracking from KoShapeControllerBase Long ago, when Flake was flourishing as a cross-application framework, it supported shapes being toplevel shapes (that is, having no parent). It created a lot of troubles, because all the **roots** still had to be stored somewhere and some entity had to track shapes addition and removal from the hierarchy. That was exactly the reason why KoShapeControllerBase was born. Those days it was called KoShapeDocumentBase, which meant "a document that stores all shapes, including the root ones". Legends say that it was also supposed to add/remove shapes from KoShapeManager, but no written proofs of it survived. When Krita introduced vector la
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Dmitry Kazakov changed: What|Removed |Added Status|CONFIRMED |RESOLVED Latest Commit||https://invent.kde.org/grap ||hics/krita/commit/a87dced5f ||88f26e282dfc86d18a3c32ecf68 ||fa96 Resolution|--- |FIXED --- Comment #7 from Dmitry Kazakov --- Git commit a87dced5f88f26e282dfc86d18a3c32ecf68fa96 by Dmitry Kazakov. Committed on 29/05/2020 at 11:34. Pushed by dkazakov into branch 'master'. Fix undo breakage after converting a pixel selecion into a vector one Since 2013, when a selection is switched into a vector mode, its pixel selection is used as a projection. It is done intentionally, because we need a way to auto-flatten selection when someone opens a transaction on this devices. It lets all our painting tools work on selections smoothly without any conversions. And this switching used to break undo on the projection device. Obviously, the vectors are rendered on the device without any transactions, so we cannot undo them. To overcome this issue, a special mechanism "reincarnation with detached history" for paint devices was introduced (KisPaintDevice::reincarnateWithDetachedHistory). When a device reincarnates, it starts a new undo history from scratch.The old undo history is kept intact inside the returned command, so the device can later be recovered to its original state. As a consequence, there is an important API change in KisSelection, now the seleciton should be converted to vector mode explicitly and undo command for it should be kept in the common image's undo history (that was the reason of the previous huge patch for KoShapeControllerBase). M +15 -0libs/image/kis_paint_device.cc M +19 -0libs/image/kis_paint_device.h M +40 -0libs/image/kis_paint_device_data.h M +152 -28 libs/image/kis_selection.cc M +20 -5libs/image/kis_selection.h M +38 -19 libs/image/kis_transaction_data.cpp M +2-0libs/image/kis_transaction_data.h M +1-6libs/image/tests/CMakeLists.txt M +6-5libs/image/tests/kis_selection_test.cpp M +2-2libs/libkis/Selection.cpp M +2-6libs/ui/flake/kis_shape_controller.cpp M +0-4libs/ui/flake/kis_shape_selection_model.cpp M +1-1libs/ui/kis_selection_decoration.cc M +3-3libs/ui/kis_selection_manager.cc M +167 -18 libs/ui/tests/kis_shape_selection_test.cpp M +2-0libs/ui/tests/kis_shape_selection_test.h M +1-1libs/ui/tests/util.h M +1-1plugins/impex/libkra/kis_kra_load_visitor.cpp M +2-2plugins/impex/libkra/kis_kra_save_visitor.cpp M +2-2plugins/impex/libkra/tests/kis_kra_saver_test.cpp M +4-4plugins/impex/libkra/tests/util.h https://invent.kde.org/graphics/krita/commit/a87dced5f88f26e282dfc86d18a3c32ecf68fa96 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 --- Comment #6 from Dmitry Kazakov --- The fix and a testing AppImage is in this MR: https://invent.kde.org/graphics/krita/-/merge_requests/351 -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 --- Comment #5 from Dmitry Kazakov --- That second bug seem to be present since 2013 when I first forbidden having both projection and a pixel selection at the same time: https://invent.kde.org/graphics/krita/-/commit/6ab2a6ae8816d4cea29b394b1b50cb1ac57424fd -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 --- Comment #4 from Dmitry Kazakov --- The first assert seem to be not actual anymore after I refactored vectors (though I'll recheck), but the second one by Lynx3d has caught a real bug: 1) Create a rectangular **pixel** selection 2) Draw a line on it with a brush 3) Create a rectangular **vector** selection at a side of the previous one 4) Draw a line on it with a brush 5) Press Ctrl+Z twice to undo the second selection Result: there is a garbage instead of the selection -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Dmitry Kazakov changed: What|Removed |Added Assignee|krita-bugs-n...@kde.org |dimul...@gmail.com CC||dimul...@gmail.com -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 --- Comment #3 from Boudewijn Rempt --- Not a release blocker, since it's been this way since 2019, but I'll put it on the list of bugs to discuss during the meeting tomorrow. -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Lynx3d changed: What|Removed |Added CC||lynx.mw+...@gmail.com --- Comment #2 from Lynx3d --- Some additional info, for me it also triggers a second SAFE ASSERT when I undo the above steps to reproduce: SAFE ASSERT (krita): "changeList.memento == memento" in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/image/tiles3/kis_memento_manager.cc, line 278 So it does seem to mess up the undo stack somehow, which sounds a bit worrying to me, even though I didn't really notice anything going wrong so far. The above assert message is from the 4.3.0-beta1 appimage (but master also gives it), so would this be a possible release blocker? -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 --- Comment #1 from Boudewijn Rempt --- This does not crash on Linux, but Dmitry warned it will crash on Windows: KisSelectionComponent* KisShapeSelection::clone(KisSelection* selection) { /** * TODO: make cloning of vector selections safe! Right now it crashes * on Windows because of manipulations with timers from non-gui thread. */ KIS_SAFE_ASSERT_RECOVER_NOOP(QThread::currentThread() == qApp->thread()); return new KisShapeSelection(*this, selection); } -- You are receiving this mail because: You are watching all bug changes.
[krita] [Bug 411394] Safe Assert when painting on selection masks that were vector only.
https://bugs.kde.org/show_bug.cgi?id=411394 Boudewijn Rempt changed: What|Removed |Added Ever confirmed|0 |1 Status|REPORTED|CONFIRMED CC||b...@valdyas.org -- You are receiving this mail because: You are watching all bug changes.