Summary: | crash while closing a polygonal selection | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | David REVOY <info> |
Component: | Usability | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | dimula73, halla |
Priority: | NOR | ||
Version: | 2.8 Beta | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/calligra/cef0f55ed4ae290fe1a068cff9b421ad13a32d97 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | [ ^ crash log ] |
This is a really weird backtrace... <dmitryK> boud, ahiemstra: It might happen that this is a race condition: KisImage add a new node as a mask and UI requests the selection, which iterates through the nodes. But I can hardly imagine how it can be reproduced :( <dmitryK> boud, ahiemstra: I might need to write a unittest for this theory Let's confirm then. Yeah, the crash is reproducible in a simple unittest: void KisSelectionDecorationTest::test() { KisImageSP image = utils::createImage(0, QSize(3000, 3000)); for (int i = 0; i < 10000; i++) { KisProcessingApplicator applicator(image, 0 /* we need no automatic updates */, KisProcessingApplicator::SUPPORTS_WRAPAROUND_MODE, KisImageSignalVector() << ModifiedSignal, "test stroke"); applicator.applyCommand(new KisSetEmptyGlobalSelectionCommand(image)); applicator.applyCommand(new KisDeselectGlobalSelectionCommand(image)); applicator.end(); for (int j = 0; j < 100; j++) { KisSelectionSP selection = image->globalSelection(); } } image->waitForDone(); } Interesting... Do you think the fix is just as simple? Git commit 8aac6f2e46c848c6a3a51d80ffba160a45670909 by Dmitry Kazakov. Committed on 28/02/2014 at 14:31. Pushed by dkazakov into branch 'master'. Added a bit more thread safety to KisNodeSP Now one can read the content of a KisNode from an arbitrary number of threads and at the same time write there with a single thread. This is ensured by a read-write lock added to a KisNode. For details see a comment in kis_node.cpp. M +100 -50 krita/image/kis_node.cpp M +6 -0 krita/ui/tests/CMakeLists.txt A +53 -0 krita/ui/tests/kis_selection_decoration_test.cpp [License: GPL (v2+)] A +31 -0 krita/ui/tests/kis_selection_decoration_test.h [License: GPL (v2+)] http://commits.kde.org/calligra/8aac6f2e46c848c6a3a51d80ffba160a45670909 Git commit cef0f55ed4ae290fe1a068cff9b421ad13a32d97 by Dmitry Kazakov. Committed on 28/02/2014 at 14:31. Pushed by dkazakov into branch 'calligra/2.8'. Added a bit more thread safety to KisNodeSP Now one can read the content of a KisNode from an arbitrary number of threads and at the same time write there with a single thread. This is ensured by a read-write lock added to a KisNode. For details see a comment in kis_node.cpp. M +100 -50 krita/image/kis_node.cpp M +6 -0 krita/ui/tests/CMakeLists.txt A +53 -0 krita/ui/tests/kis_selection_decoration_test.cpp [License: GPL (v2+)] A +31 -0 krita/ui/tests/kis_selection_decoration_test.h [License: GPL (v2+)] http://commits.kde.org/calligra/cef0f55ed4ae290fe1a068cff9b421ad13a32d97 |
Created attachment 85326 [details] [ ^ crash log ] Hi, I just had a '3 stars' crash while closing a polygonal selection. ( in attachment ) I'm still on 2.8 ; I just updated one hour ago after 10 days without updating it ( I was afraid of the commit concerning the preset curves, fortunately all is ok ). Reproductible : no , I can't reproduce.