Bug 491985

Summary: Krita crashes when an image is pasted while no layers are selected
Product: [Applications] krita Reporter: Claire <misc>
Component: * UnknownAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: dimula73
Priority: NOR Keywords: regression
Version First Reported In: 5.2.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Backtrace
Screen recording

Description Claire 2024-08-21 13:03:52 UTC
Created attachment 172810 [details]
Backtrace

SUMMARY
When I paste an image into Krita while there are currently no selected layers, Krita crashes

STEPS TO REPRODUCE
1. Open Krita
2. Do Ctrl+O to activate the Open dialog
3. Select two images
4. Do Ctrl+A, Ctrl+C
5. Navigate to the other image
6. Do Ctrl+V

OBSERVED RESULT
Krita segfaults

EXPECTED RESULT
The image would be pasted as normal

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Frameworks Version: 5.116.0
Qt Version: 5.15.14
Krita Package Version: 5.2.3-1

ADDITIONAL INFORMATION
I could not reproduce this when I was running Krita 5.2.2-10 (the layer would be selected when I navigate to the previous image). Additionally, manually selecting the layer makes it no longer crash
Comment 1 Dmitry Kazakov 2024-08-21 13:06:57 UTC
Hi, Claire!

Could you please test Krita Next package if this bug is still reproducible? I think I have fixed it quite recently:

https://cdn.kde.org/ci-builds/graphics/krita/krita-5.2/linux/
Comment 2 Claire 2024-08-21 13:07:52 UTC
Created attachment 172812 [details]
Screen recording
Comment 3 Claire 2024-08-21 13:10:56 UTC
Oh, it's fixed in Next! Thank you!