SUMMARY so some pasting actions in Python are quite broken. STEPS TO REPRODUCE 1. Copy some image into the clipboard with ctrl+c 2. use one of the follow codes on the scripter """ import krita Krita.instance().action('edit_paste').trigger() """ """ import krita Krita.instance().action('paste_into').trigger() """ OBSERVED RESULT What each block of code does: 1 - Creates a reference object on canvas. 2 - Causes an Instant CRASH on the application. EXPECTED RESULT What each block of code should do: 1 - create a paint or vector layer with the information in the clipboard. 2 - well not crash the application. SOFTWARE/OS VERSIONS Windows: w10 Qt Version: 5.12.12
Hi! Could you attach the crash log, to see if the backtrace got logged? https://docs.krita.org/en/reference_manual/sharing_krita_logs.html#getting-backtrace
Created attachment 154071 [details] Crash Log for the paste event I created the crash event and then saved the log.
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.
The second part, the crash, is a duplicate of https://bugs.kde.org/show_bug.cgi?id=462223
I cannot reproduce the first part of this bug report (in future, please make separate reports for different issues, please). I always get a paint layer.
I was investigating the first (1) error and I think I found a better way to trigger it: STEPS TO REPRODUCE 1. Create a new Krita instance and a new document 2. Copy something to the clipboard manually 3. Run one of the following codes for different results """ import krita Krita.instance().action('edit_paste').trigger() Krita.instance().action('edit_paste').trigger() Krita.instance().action('paste_as_reference').trigger() """ creates 2 paint layers and 1 reference layer """ import krita Krita.instance().action('edit_paste').trigger() Krita.instance().action('paste_as_reference').trigger() Krita.instance().action('edit_paste').trigger() """ creates 1 paint layers and 2 reference layer """ import krita Krita.instance().action('paste_as_reference').trigger() Krita.instance().action('edit_paste').trigger() Krita.instance().action('edit_paste').trigger() """ creates 0 paint layers and 3 reference layer CONCLUSION After a "paste_as_reference" action is done the "edit_paste" becomes a reference layer too instead of paint layer.
Krita crashing after pasting stuff.
5.15 TEST
I can confirm comment 6 with the Krita Version: 5.2.0-prealpha (git 5c98a72) Appimage with Qt 5.15.7. Considering the crash portion is fixed, let's update the bug.