Bug 447462 - Crash with: New... + Flatten image + Elliptical selection + Trim to selection + ("Undo History" docker) click on "<empty>"
Summary: Crash with: New... + Flatten image + Elliptical selection + Trim to selection...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: General (show other bugs)
Version: 5.0.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
: 439023 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-24 11:15 UTC by mvowada
Modified: 2022-06-28 11:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
GDB report (9.32 KB, text/plain)
2021-12-24 11:15 UTC, mvowada
Details
Video example. (1.83 MB, video/mp4)
2021-12-24 11:17 UTC, mvowada
Details
Full backtrace of the dev build (41.30 KB, text/plain)
2021-12-24 13:16 UTC, Dmitry Kazakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2021-12-24 11:15:42 UTC
Created attachment 144824 [details]
GDB report

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
See also attached GDB report and video example.

STEPS TO REPRODUCE
1. CTRL+N (File > New...)
2. Layer > Flatten image
3. J (Elliptical selection tool) > Ctrl+Shift+Drag on canvas
4. Image > Trim to selection
5. "Undo History" docker > click on "<empty>"

OBSERVED RESULT
Crash

EXPECTED RESULT
Undo?

SOFTWARE/OS VERSIONS
Krita Version: 5.0.1-alpha (git 37d49dc)
Qt Version (compiled): 5.12.12 - Version (loaded): 5.12.12
OS Information:
Pretty Productname: Ubuntu 18.04.6 LTS
Product Type: ubuntu
Product Version: 18.04

ADDITIONAL INFORMATION
Comment 1 mvowada 2021-12-24 11:17:57 UTC
Created attachment 144826 [details]
Video example.
Comment 2 Dmitry Kazakov 2021-12-24 13:10:06 UTC
I can reproduce the issue on all platforms
Comment 3 Dmitry Kazakov 2021-12-24 13:16:25 UTC
Created attachment 144827 [details]
Full backtrace of the dev build
Comment 4 Dmitry Kazakov 2021-12-27 13:29:52 UTC
Git commit 8f9293b5f1da0ba83296676cbe46ef9662527848 by Dmitry Kazakov.
Committed on 27/12/2021 at 13:26.
Pushed by dkazakov into branch 'master'.

Fix a crashes when undoing multiple layer operations too quickly

This patch solve the whole bunch of issues that happened when the dummies
graph was updated too quickly:

1) Implements a clever strategy for processing not-yet-added nodes
   in KisDummiesFacadeBase::setImage(). Instead of just asserting on
   detection of such nodes, we track a "theoretical" set of nodes that
   will be present in the dummies graph after all synchronized connections
   are executed.

2) KisSynchronizedConnectionBase::postEvent() will not bariier-sync with
   the main events queue when the event is processed in the GUI thread.

3) Fixes minor mutex usage issues in KisSynchronizedConnection

4) KisNodeModel will no longer try to fetch a thumbnail from the layer
   that has been removed from the image.

M  +17   -0    libs/global/KisSynchronizedConnection.cpp
M  +16   -6    libs/global/KisSynchronizedConnection.h
M  +23   -15   libs/ui/KisApplication.cpp
M  +2    -0    libs/ui/KisApplication.h
M  +28   -7    libs/ui/flake/kis_dummies_facade_base.cpp
M  +14   -1    libs/ui/kis_node_model.cpp

https://invent.kde.org/graphics/krita/commit/8f9293b5f1da0ba83296676cbe46ef9662527848
Comment 5 Dmitry Kazakov 2021-12-27 13:41:07 UTC
Git commit bb1ab7ea46b35851549da5432fc4600a95af1db9 by Dmitry Kazakov.
Committed on 27/12/2021 at 13:30.
Pushed by dkazakov into branch 'krita/5.0'.

Fix a crashes when undoing multiple layer operations too quickly

This patch solve the whole bunch of issues that happened when the dummies
graph was updated too quickly:

1) Implements a clever strategy for processing not-yet-added nodes
   in KisDummiesFacadeBase::setImage(). Instead of just asserting on
   detection of such nodes, we track a "theoretical" set of nodes that
   will be present in the dummies graph after all synchronized connections
   are executed.

2) KisSynchronizedConnectionBase::postEvent() will not bariier-sync with
   the main events queue when the event is processed in the GUI thread.

3) Fixes minor mutex usage issues in KisSynchronizedConnection

4) KisNodeModel will no longer try to fetch a thumbnail from the layer
   that has been removed from the image.

M  +17   -0    libs/global/KisSynchronizedConnection.cpp
M  +16   -6    libs/global/KisSynchronizedConnection.h
M  +23   -15   libs/ui/KisApplication.cpp
M  +2    -0    libs/ui/KisApplication.h
M  +28   -7    libs/ui/flake/kis_dummies_facade_base.cpp
M  +14   -1    libs/ui/kis_node_model.cpp

https://invent.kde.org/graphics/krita/commit/bb1ab7ea46b35851549da5432fc4600a95af1db9
Comment 6 Dmitry Kazakov 2021-12-27 13:42:03 UTC
Git commit 36c9e609cd2e2af3a2c92452de97152423aa73bc by Dmitry Kazakov.
Committed on 27/12/2021 at 13:41.
Pushed by dkazakov into branch 'krita/5.0.0'.

Fix a crashes when undoing multiple layer operations too quickly

This patch solve the whole bunch of issues that happened when the dummies
graph was updated too quickly:

1) Implements a clever strategy for processing not-yet-added nodes
   in KisDummiesFacadeBase::setImage(). Instead of just asserting on
   detection of such nodes, we track a "theoretical" set of nodes that
   will be present in the dummies graph after all synchronized connections
   are executed.

2) KisSynchronizedConnectionBase::postEvent() will not bariier-sync with
   the main events queue when the event is processed in the GUI thread.

3) Fixes minor mutex usage issues in KisSynchronizedConnection

4) KisNodeModel will no longer try to fetch a thumbnail from the layer
   that has been removed from the image.

M  +17   -0    libs/global/KisSynchronizedConnection.cpp
M  +16   -6    libs/global/KisSynchronizedConnection.h
M  +23   -15   libs/ui/KisApplication.cpp
M  +2    -0    libs/ui/KisApplication.h
M  +28   -7    libs/ui/flake/kis_dummies_facade_base.cpp
M  +14   -1    libs/ui/kis_node_model.cpp

https://invent.kde.org/graphics/krita/commit/36c9e609cd2e2af3a2c92452de97152423aa73bc
Comment 7 Halla Rempt 2022-06-28 11:07:53 UTC
*** Bug 439023 has been marked as a duplicate of this bug. ***