Bug 461249

Summary: Pasting clipboard containing empty layer crashes Krita
Product: [Applications] krita Reporter: Simon Hrbek <simi.hrbek>
Component: Tools/Reference ImagesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash CC: halla
Priority: NOR    
Version First Reported In: 5.1.1   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Simon Hrbek 2022-10-31 14:25:58 UTC
SUMMARY
Krita crashes when attempting to paste a reference image if the clipboard had been copied from an empty layer.
I'm a tech idiot and couldn't figure out a way to get a backtrace.

STEPS TO REPRODUCE
1. On an invisible paint layer, make a selection and copy the selection to clipboard
2. Select the Reference images tool, and under tool options click Paste reference image from clipboard

OBSERVED RESULT
Krita pauses for a while and crashes.

EXPECTED RESULT
Krita pastes contents of the selection as if the layer had been visible, or at least doesn't crash.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux Mint 20.3 Cinnamon, Cinnamon ver. 5.2.7
Comment 1 Halla Rempt 2022-10-31 14:35:13 UTC
Can you please test with the appimage? I cannot reprocude a crash with 5.1.1 or master; instead I get a warning "could not create reference image from clipboard"
Comment 2 Halla Rempt 2022-10-31 15:12:05 UTC

*** This bug has been marked as a duplicate of bug 459904 ***