Bug 431865 - Crash when copying blank paint layer
Summary: Crash when copying blank paint layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.4.2
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: regression
: 431941 432497 432821 432875 433305 433832 433938 434558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-21 02:38 UTC by tomtomtomreportingin
Modified: 2021-03-17 19:06 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomtomreportingin 2021-01-21 02:38:54 UTC
SUMMARY
I could have sworn I was able to do this initially without crashing, but it seems now when I copy a blank paint layer on 4.4.2, Krita crashes with a segmentation fault. This crash happens regardless if it's through a shortcut, or if it's through a "Copy" or "Copy Layer" action.

STEPS TO REPRODUCE
1. Create a new document containing an empty paint layer.
2. Copy that empty paint later.

OBSERVED RESULT
Crash.

EXPECTED RESULT
Blank paint layer is copied.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
(available in About System)
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.12.9 (Appimage)

ADDITIONAL INFORMATION
This does not happen for me in 4.4.1 nor in 4.4.2-beta1, but it does happen in 4.4.2-beta2. Seems there was a regression between the two betas.
Comment 1 Halla Rempt 2021-01-21 09:18:45 UTC
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00007f6e616ac859 in __GI_abort () at abort.c:79
#6  0x00007f6e61b07be7 in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1914
#7  QMessageLogger::fatal (this=this@entry=0x7ffd823e67a0, msg=msg@entry=0x7f6e61e10ea0 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:893
#8  0x00007f6e61b06ff3 in qt_assert (assertion=assertion@entry=0x7f6e648d489c "d", file=file@entry=0x7f6e648d51e8 "/home/boud/dev/4.3/libs/global/kis_shared_ptr.h", line=line@entry=180) at ../../include/QtCore/../../src/corelib/global/qlogging.h:90
#9  0x00007f6e6446f452 in KisSharedPtr<KisNode>::operator-> (this=<optimized out>) at /home/boud/dev/4.3/libs/global/kis_shared_ptr.h:180
#10 createDocument (nodes=..., srcImage=...) at /home/boud/dev/4.3/libs/ui/kis_mimedata.cpp:100
#11 0x00007f6e6447059f in KisMimeData::retrieveData (this=0x55d6d86dbad0, mimetype=..., preferredType=QVariant::Image) at /usr/include/c++/9/bits/atomic_base.h:318
#12 0x00007f6e61d4f01d in QMimeDataPrivate::retrieveTypedData (this=0x55d6cdcf73c0, format=..., type=QMetaType::QImage) at ../../include/QtCore/../../src/corelib/kernel/qvariant.h:397
#13 0x00007f6e61d4ff4d in QMimeData::imageData (this=<optimized out>) at ../../include/QtCore/../../src/corelib/text/qstring.h:967
#14 0x00007f6e62117bb1 in QClipboard::image(QClipboard::Mode) const () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#15 0x00007f6e64405b1c in KisClipboard::clipboardDataChanged (this=0x7f6e657137f0 <(anonymous namespace)::Q_QGS_s_instance::innerFunction()::holder>) at /home/boud/dev/4.3/libs/ui/kis_clipboard.cc:355
#16 0x00007f6e61d5f6f0 in doActivate<false> (sender=0x55d6d3943b80, signal_index=6, argv=0x7ffd823e6cf0) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#17 0x00007f6e62118005 in QClipboard::emitChanged(QClipboard::Mode) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#18 0x00007f6e5bd6fd39 in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#19 0x00007f6e62117d30 in QClipboard::setMimeData(QMimeData*, QClipboard::Mode) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#20 0x00007f6e64403d55 in KisClipboard::setLayers (this=<optimized out>, nodes=..., image=..., forceCopy=<optimized out>) at /home/boud/dev/4.3/libs/ui/kis_clipboard.cc:448
#21 0x00007f6e64482155 in KisNodeManager::copyLayersToClipboard (this=0x55d6d509eee0) at /home/boud/dev/4.3/libs/ui/kis_node_manager.cpp:1487
#22 0x00007f6e6470d85d in KisCutCopyActionFactory::run (this=this@entry=0x7ffd823e7000, willCut=willCut@entry=false, makeSharpClip=makeSharpClip@entry=false, view=0x55d6d509eb20) at /home/boud/dev/4.3/libs/ui/actions/kis_selection_action_factories.cpp:379
#23 0x00007f6e6450ccd8 in KisSelectionManager::copy (this=0x55d6d509ec50) at /home/boud/dev/4.3/libs/ui/kis_selection_manager.cc:352
#24 0x00007f6e642a64df in KisSelectionManager::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-4.3/libs/ui/kritaui_autogen/EWIEGA46WW/moc_kis_selection_manager.cpp:242
#25 0x00007f6e61d5f6f0 in doActivate<false> (sender=0x55d6d5288920, signal_index=4, argv=0x7ffd823e7170) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:395
#26 0x00007f6e627f98e6 in QAction::triggered(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f6e627fbfb8 in QAction::activate(QAction::ActionEvent) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f6e627fc8cf in QAction::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f6e627ffdc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f6e62808bb8 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f6e64794d7d in KisApplication::notify (this=<optimized out>, receiver=0x55d6d5288920, event=0x7ffd823e7570) at /home/boud/dev/4.3/libs/ui/KisApplication.cpp:713
#32 0x00007f6e61d2869a in QCoreApplication::notifyInternal2 (receiver=0x55d6d5288920, event=0x7ffd823e7570) at ../../include/QtCore/5.15.2/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:325
#33 0x00007f6e62138e53 in QShortcutMap::dispatchEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#34 0x00007f6e621397f3 in QShortcutMap::tryShortcut(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007f6e620e6c72 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#36 0x00007f6e62106881 in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#37 0x00007f6e6210bb3b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#38 0x00007f6e620e37ac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#39 0x00007f6e5bda0d7e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#40 0x00007f6e5f012fbd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007f6e5f013240 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x00007f6e5f0132e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#43 0x00007f6e61d82fa2 in QEventDispatcherGlib::processEvents (this=0x55d6cca30b10, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#44 0x00007f6e61d271ab in QEventLoop::exec (this=this@entry=0x7ffd823e79e0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:141
#45 0x00007f6e61d2f354 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#46 0x000055d6caff4f81 in main (argc=<optimized out>, argv=0x7ffd823e7d08) at /home/boud/dev/4.3/krita/main.cc:662
[Inferior 1 (process 165261) detached]
Comment 2 Halla Rempt 2021-01-21 09:30:14 UTC
Git commit bd828ec845fb4d0bb7eedcea347f6ef1afd977b9 by Halla Rempt.
Committed on 21/01/2021 at 09:29.
Pushed by rempt into branch 'krita/4.3'.

M  +7    -2    libs/ui/kis_mimedata.cpp

https://invent.kde.org/graphics/krita/commit/bd828ec845fb4d0bb7eedcea347f6ef1afd977b9
Comment 3 Halla Rempt 2021-01-21 09:30:26 UTC
Git commit 009eaa79fdab28fe751a040ab7a3c66e15c398ad by Halla Rempt.
Committed on 21/01/2021 at 09:30.
Pushed by rempt into branch 'master'.

(cherry picked from commit bd828ec845fb4d0bb7eedcea347f6ef1afd977b9)

M  +7    -2    libs/ui/kis_mimedata.cpp

https://invent.kde.org/graphics/krita/commit/009eaa79fdab28fe751a040ab7a3c66e15c398ad
Comment 4 Halla Rempt 2021-01-22 17:22:29 UTC
*** Bug 431941 has been marked as a duplicate of this bug. ***
Comment 5 Halla Rempt 2021-02-04 09:01:40 UTC
*** Bug 432497 has been marked as a duplicate of this bug. ***
Comment 6 Halla Rempt 2021-02-12 10:54:07 UTC
*** Bug 432821 has been marked as a duplicate of this bug. ***
Comment 7 Halla Rempt 2021-02-13 09:29:03 UTC
*** Bug 432875 has been marked as a duplicate of this bug. ***
Comment 8 Halla Rempt 2021-02-20 10:19:49 UTC
*** Bug 433305 has been marked as a duplicate of this bug. ***
Comment 9 tomtomtomreportingin 2021-03-02 05:27:40 UTC
*** Bug 433832 has been marked as a duplicate of this bug. ***
Comment 10 tomtomtomreportingin 2021-03-04 06:13:06 UTC
*** Bug 433938 has been marked as a duplicate of this bug. ***
Comment 11 Halla Rempt 2021-03-17 19:06:11 UTC
*** Bug 434558 has been marked as a duplicate of this bug. ***