Bug 478846 - Pasting From external does nothing, pasting layer info from previous session crashes
Summary: Pasting From external does nothing, pasting layer info from previous session ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 5.2.2
Platform: Microsoft Windows Other
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-21 17:27 UTC by Bek
Modified: 2023-12-24 13:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Crash Logs (71.83 KB, text/plain)
2023-12-21 19:56 UTC, Bek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bek 2023-12-21 17:27:25 UTC
SUMMARY
Pasting seems entirely broken on Windows vers. 5.2.2. If I copy an image from elsewhere (browser, discord, sure to copy the image and not the link to the image), nothing happens in Krita. The popup about paste settings doesn't appear. There is generally no feedback at all. This happens with both Ctrl+V and Edit>Paste. 

In an attempt to save the layer I was working on, I Select All'd and copied, closed Krita, and reopened it. Opening a new canvas, I attempted to paste that previous layer, but it immediately crashed. I am able to do this consistently. I would attempt to give a crash log, but nothing is appearing in the Windows Event viewer. Rebooting computer doesn't fix this.

While pasting layer info from a previous session is more of a niche case, pasting external images is pretty important for reference.

STEPS TO REPRODUCE 
1. Open Krita.
2. Open new canvas (My default is 2048x2048)
3. Copy an image from your browser, or Discord. In my case, the images were all .PNG.
4. Attempt to paste that image into the canvas, using either Ctrl+V or Edit>Paste. Note how there is no feedback.
-- Below Steps are for crash --
5. Draw a line or shape on the canvas, in a raster layer.
6. Select All and Copy that layer.
7. Close Krita, no need to save.
8. Reopen Krita, open a new canvas.
9. Attempt to paste the previous layer, either by Ctrl+V or Edit>Paste. Note how the application closes immediately.

OBSERVED RESULT
Paste from external sources does not work. Pasting from previous session crashes Krita.

EXPECTED RESULT
Pressing Ctrl+V and or Edit>Paste causes the paste settings modal to appear, and eventually pastes the image.

SOFTWARE/OS VERSIONS
Windows:  
Edition	Windows 10 Home
Version	22H2
Installed on	‎5/‎16/‎2021
OS build	19045.3803
Experience	Windows Feature Experience Pack 1000.19053.1000.0

ADDITIONAL INFORMATION
My device's clipboard is not broken, as I can paste images into other software like MS Paint and Discord. I can even paste the layer I copied into other softwares (with the expected limitations that copying a selection outside of Krita has).
Comment 1 Bek 2023-12-21 19:56:39 UTC
Created attachment 164352 [details]
Crash Logs

Found how to find the crash logs and have pasted all relevant logs into a text file for viewing.
Comment 2 Simon Ra 2023-12-22 14:08:43 UTC
I can reproduce the crash, but not the other issues (with the setting to ask when pasting on or off).
What are your paste settings (Settings -> General -> Pasting)?

The crash is hopefully trivial to fix: https://invent.kde.org/graphics/krita/-/merge_requests/2036
Comment 3 Bek 2023-12-22 15:19:17 UTC
(In reply to Simon Ra from comment #2)
> I can reproduce the crash, but not the other issues (with the setting to ask
> when pasting on or off).
> What are your paste settings (Settings -> General -> Pasting)?
> 
> The crash is hopefully trivial to fix:
> https://invent.kde.org/graphics/krita/-/merge_requests/2036

Changing that setting from "Paste the Attached sRGB Bitmap" to "Ask Every Time" solved it, but is it relevant that the image didn't even paste into the canvas before I changed it? Also, I've never set that setting to anything but "Ask Every Time" before.

For reference, when I change the setting back to "Paste the Attached sRGB Bitmap", the missing color profile modal also popped up when it wasn't before. Is it possible that upon updating (my previous version was one of the 5.1 patches, not 5.2) some default there was reset, breaking that?

Regardless, pasting is fixed on my end now. I haven't seen anyone else have this problem. Thanks for the help with that.
Comment 4 Raghavendra kamath 2023-12-24 12:38:55 UTC
This has been now fixed and the patch is merged here - https://invent.kde.org/graphics/krita/-/merge_requests/2034

If the error persists please comment I can re open this bug.
Comment 5 Raghavendra kamath 2023-12-24 12:40:33 UTC
Oops ignore my comment I intended to close another bug and closed the wrong bug- reopening now.