Bug 468826 - Krita crashes when canceling or closing missing color profile prompt
Summary: Krita crashes when canceling or closing missing color profile prompt
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (other bugs)
Version First Reported In: 5.1.5
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-22 18:16 UTC by im fine
Modified: 2023-04-23 09:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description im fine 2023-04-22 18:16:42 UTC
STEPS TO REPRODUCE
1. New File
2. Create from Clipboard
3. Create
4. missing color profile prompt appears
5. close or cancel
6. crash

OBSERVED RESULT
crash

EXPECTED RESULT
clipboard image in krita

SOFTWARE/OS VERSIONS
Linux: 6.2.11-arch1-1
KDE Plasma Version: 5.27.4 
KDE Frameworks Version: 5.105.0 
Qt Version: 5.15.9
Comment 1 Halla Rempt 2023-04-22 19:26:07 UTC
Please try to reproduce with the appimage, not the arch build, and with a clean configuration. If it's reproducible under those circumstances, we can try to look deeper into what's wrong on your system.
Comment 2 im fine 2023-04-22 19:57:50 UTC
I ran krita as an appimage and the same problem occurred(In reply to Halla Rempt from comment #1)
> Please try to reproduce with the appimage, not the arch build, and with a
> clean configuration. If it's reproducible under those circumstances, we can
> try to look deeper into what's wrong on your system.

I ran krita as an appimage and the same problem occurred
Comment 3 Bug Janitor Service 2023-04-23 03:46:03 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 4 Halla Rempt 2023-04-23 09:02:09 UTC
Thanks for testing!
Comment 5 Halla Rempt 2023-04-23 09:04:53 UTC
Git commit e9443fb3cce2d1ac877ce111b4587f42bf57b747 by Halla Rempt.
Committed on 23/04/2023 at 09:04.
Pushed by rempt into branch 'master'.

Replace assert with null pointer check

The assert here is wrong because it's perfectly valid for
KisClipboard::instance()->clip to return a null pointer, for
instance when the user cancels the profile dialog.

M  +1    -5    libs/ui/widgets/kis_image_from_clipboard_widget.cpp

https://invent.kde.org/graphics/krita/commit/e9443fb3cce2d1ac877ce111b4587f42bf57b747