Bug 471391 - Crash after creating text object and undoing it
Summary: Crash after creating text object and undoing it
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-06-23 15:54 UTC by Alvin Wong
Modified: 2023-06-27 12:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Crash backtrace (3.69 KB, text/plain)
2023-06-23 15:54 UTC, Alvin Wong
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2023-06-23 15:54:57 UTC
Created attachment 159863 [details]
Crash backtrace

SUMMARY
Creating a text object then undoing it causes a crash.


STEPS TO REPRODUCE
1. Create new file
2. Add text object
3. Close text edit dialog
4. Press Ctrl+Z (Undo)

OBSERVED RESULT
Crash

EXPECTED RESULT
Shouldn't crash

SOFTWARE/OS VERSIONS
Windows: 10
Krita: base is 48d357256, can also reproduce on nightly 6d578e3bbb

ADDITIONAL INFORMATION
Doesn't seem to happen on 219e7b9285
Comment 1 Bug Janitor Service 2023-06-27 10:15:23 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1840
Comment 2 Dmitry Kazakov 2023-06-27 12:23:08 UTC
Git commit f56ac428f86b28919f338e4dde2594056ce6a681 by Dmitry Kazakov, on behalf of Alvin Wong.
Committed on 27/06/2023 at 12:22.
Pushed by dkazakov into branch 'master'.

Fix weak shared ptr deref for some layer updates

Convert ithe image weak shared ptr to strong reference and properly
check for null before accessing its members.

Fixes regression from 205731b2aa5ab530cbd145cb32dac4796bac23a3.

M  +1    -1    libs/image/generator/kis_generator_layer.cpp
M  +5    -3    libs/image/kis_transform_mask.cpp
M  +7    -4    libs/ui/flake/kis_shape_layer_canvas.cpp

https://invent.kde.org/graphics/krita/-/commit/f56ac428f86b28919f338e4dde2594056ce6a681