Bug 431526 - ctrl-c copies the layer, not the reference image if the reference image tool is active
Summary: ctrl-c copies the layer, not the reference image if the reference image tool ...
Status: ASSIGNED
Alias: None
Product: krita
Classification: Applications
Component: Tools (other bugs)
Version First Reported In: nightly build (please specify the git hash!)
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Maksym Gryb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-13 06:32 UTC by Jaimiee
Modified: 2022-08-04 08:42 UTC (History)
3 users (show)

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


Attachments
crash log (168.71 KB, text/plain)
2021-01-14 06:24 UTC, Jaimiee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaimiee 2021-01-13 06:32:03 UTC
SUMMARY
Krita crashes without an error report, when attempting to copy a reference image from beside the canvas, to a layer, and proceeding to attempt to use the transform tool.

STEPS TO REPRODUCE
1. Add a reference image beside the canvas
2. Click the pin tool and select the reference image
3. Ctrl + C, or rightclick and press copy
4. Click the transform tool and attempt to paste as layer.
5. Click the pin and try to copy the reference image again.
6. Click the transform tool and click the reference image beside the canvas.
7. Repeat 2 through 6 at least once if nothing seems to happen.

OBSERVED RESULT
Krita closes at various stages of the steps, with no error message.

EXPECTED RESULT
I expected krita 'might' allow copying the reference image to a layer, thought it'd either do it or do nothing. didn't expect it to crash.

SOFTWARE/OS VERSIONS
Windows: 10
Krita Version : krita-nightly-x64-4.4.3-alpha-f55b1b56be
(latest stable version)

ADDITIONAL INFORMATION
I checked what steps caused the crash twice before writing the report, and once more while writing it to make sure the steps are accurate.
I don't think it generated an error/crash log.
It's not a bothersome bug, just interesting really.
would be nice if copying the reference image to a layer worked though.
Comment 1 Halla Rempt 2021-01-13 10:18:33 UTC
If there's a crash log, it's in %LOCALAPPDATA% -- kritacrash.log
Comment 2 Jaimiee 2021-01-14 06:24:47 UTC
Created attachment 134828 [details]
crash log

thankyou for telling me where the log saves to, otherwise I probably would have taken a long time to ever find it.
Comment 3 Maksym Gryb 2021-05-22 18:02:11 UTC
I'll look into it.
Comment 4 Tiar 2021-08-19 17:21:11 UTC
There are multiple crashes in the log, this is the most recent and probably the relevant one (it seems like something is trying to read from null, so it just needs a null check):

Error occurred on Wednesday, January 13, 2021 at 19:39:43.

krita.exe caused an Access Violation at location 00007FFF163B7EE9 in module libkritaui.dll Reading from location 0000000000000000.

AddrPC           Params
00007FFF163B7EE9 00007FFF1626A4E8 0000000000000001 00000000005FC090  libkritaui.dll!0xf7ee9 createDocument+0x479
00007FFF163B85E4 00007FFF7E5BAB70 00007FFF7E5C0978 0000000055534500  libkritaui.dll!0xf85e4 KisMimeData::retrieveData+0xb4
00007FFF15EB27AA 0000A258CFF6EB20 00007FFF00000001 00007FFF1626A4E8  Qt5Core.dll!0x2227aa QMimeData::hasHtml+0x37a
00007FFF15EB38AC 0000000000000002 00007FFF15EB20DC 000000000DFF1EA0  Qt5Core.dll!0x2238ac QMimeData::imageData+0x2c
00007FFF156B5358 000000000000002E 0000000000000043 0000000015A83B90  Qt5Gui.dll!0x45358 QClipboard::image+0x58
00007FFF1636C05C 000000002D215750 00007FFF7DC62EEB 0000000000000000  libkritaui.dll!0xac05c KisClipboard::clipboardDataChanged+0x7c
00007FFF15EB8C38 000000002147BA90 00000000005FC538 0000000000000000  Qt5Core.dll!0x228c38 QMetaObject::activate+0x7b8
00007FFF156B58E9 00000000029FAD08 00007FFF7ADECAD0 000000000000031D  Qt5Gui.dll!0x458e9 QClipboard::emitChanged+0x39
000000006A8E16E6 0000000000000000 0000000000000001 0000000000000001  qwindows.dll!0x616e6
00007FFF7CE5E858 00000000029F7550 000000006A8E1650 0000000000390862  USER32.dll!0xe858 UserCallWinProcCheckWow+0x2f8
00007FFF7CE5E299 000000006A8E1650 00000000005FC6F0 0000000000000000  USER32.dll!0xe299 DispatchMessageWorker+0x249
00007FFF15EE75EB 0000000002A3B460 0000000000000024 000000000074F590  Qt5Core.dll!0x2575eb QEventDispatcherWin32::processEvents+0x5cb
000000006A8FEEA5 0000000000000080 0000000000000014 000000001F5360F0  qwindows.dll!0x7eea5 qt_plugin_instance+0x2a25
00007FFF15E8B8FF 000000000C652330 000000000C5D0140 0000000023C141F0  Qt5Core.dll!0x1fb8ff QEventLoop::exec+0x13f
00007FFF15E94B77 00000000005FFBD0 00000000005FFB40 000000000000000C  Qt5Core.dll!0x204b77 QCoreApplication::exec+0x77
0000000140006F4A 0000000000000001 00000000007493F0 0000000140F66970  krita.exe!0x6f4a main+0x213a
00000001400013C7 0000000000000000 0000000000000000 0000000000000000  krita.exe!0x13c7 __tmainCRTStartup+0x247
00000001400014CB 0000000000000000 0000000000000000 0000000000000000  krita.exe!0x14cb WinMainCRTStartup+0x1b
00007FFF7DC67034 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!0x17034 BaseThreadInitThunk+0x14
00007FFF7EC1D0D1 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!0x4d0d1 RtlUserThreadStart+0x21
Comment 5 Tiar 2021-08-24 14:04:36 UTC
Can't reproduce on current master on Linux: if I right-click and press Copy, it just copies the reference image and puts it in the layer; if I click ctrl+C, it copies the current layer and puts it on a new layer (which is probably a bug/unintended effect but it's not a crash).
Comment 6 Halla Rempt 2021-09-07 13:15:20 UTC
Then it's not a crash anymore, and we need to change the subject.