Bug 389037 - Krita crashed when dragging and dropping transparency mask
Summary: Krita crashed when dragging and dropping transparency mask
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-01-16 07:08 UTC by Raghavendra kamath
Modified: 2018-01-30 08:42 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
(Video example) (636.96 KB, video/mp4)
2018-01-16 10:58 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raghavendra kamath 2018-01-16 07:08:54 UTC
Application: krita (4.0.0-beta1 (git 26f6401))

Qt Version: 5.10.0
Frameworks Version: 5.41.0
Operating System: Linux 4.14.13-1-ARCH x86_64
Distribution (Platform): Archlinux Packages

-- Information about the crash:
- What I was doing when the application crashed:
I was dragging and dropping transperancy mask while holding control to duplicate it  from one layer to another. 

I tried to reproduce this but couldn't do it reliably although i have encountered this twice or thrice.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fafc4d79dc0 (LWP 21090))]

Thread 6 (Thread 0x7faf7a4dc700 (LWP 21107)):
#0  0x00007fafb93f43d8 in read () from /usr/lib/libc.so.6
#1  0x00007fafb4e9e801 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fafb4e58afc in g_main_context_check () from /usr/lib/libglib-2.0.so.0
#3  0x00007fafb4e58fc6 in ?? () from /usr/lib/libglib-2.0.so.0
#4  0x00007fafb4e5913e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#5  0x00007fafba2a66b4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#6  0x00007fafba24882b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#7  0x00007fafba05878e in QThread::exec() () from /usr/lib/libQt5Core.so.5
#8  0x00007fafa70cebcb in ?? () from /usr/lib/libQt5Quick.so.5
#9  0x00007fafba05db2d in ?? () from /usr/lib/libQt5Core.so.5
#10 0x00007fafb81d908c in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007fafb9402e1f in clone () from /usr/lib/libc.so.6

Thread 5 (Thread 0x7faf7bbe5700 (LWP 21106)):
#0  0x00007fafb93f891b in poll () from /usr/lib/libc.so.6
#1  0x00007fafb4e59023 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fafb4e5913e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fafba2a66b4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007fafba24882b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007fafba05878e in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007fafa6c80a19 in ?? () from /usr/lib/libQt5Qml.so.5
#7  0x00007fafba05db2d in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007fafb81d908c in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007fafb9402e1f in clone () from /usr/lib/libc.so.6

Thread 4 (Thread 0x7faf8bd65700 (LWP 21105)):
#0  0x00007fafb81df39d in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007fafba05f00c in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/libQt5Core.so.5
#2  0x00007fafbb3e9b76 in ?? () from /usr/lib/libQt5Widgets.so.5
#3  0x00007fafba05db2d in ?? () from /usr/lib/libQt5Core.so.5
#4  0x00007fafb81d908c in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fafb9402e1f in clone () from /usr/lib/libc.so.6

Thread 3 (Thread 0x7faf8b564700 (LWP 21104)):
#0  0x00007fafb93d0b10 in nanosleep () from /usr/lib/libc.so.6
#1  0x00007fafba2a5fff in ?? () from /usr/lib/libQt5Core.so.5
#2  0x00007fafc311973a in KisTileDataSwapper::run (this=0x7fafc360ade0 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /run/media/raghu/Data/krita-build/src/krita/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:97
#3  0x00007fafba05db2d in ?? () from /usr/lib/libQt5Core.so.5
#4  0x00007fafb81d908c in start_thread () from /usr/lib/libpthread.so.0
#5  0x00007fafb9402e1f in clone () from /usr/lib/libc.so.6

Thread 2 (Thread 0x7fafa11e7700 (LWP 21092)):
#0  0x00007fafb93f891b in poll () from /usr/lib/libc.so.6
#1  0x00007fafb4e59023 in ?? () from /usr/lib/libglib-2.0.so.0
#2  0x00007fafb4e5913e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#3  0x00007fafba2a66b4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#4  0x00007fafba24882b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#5  0x00007fafba05878e in QThread::exec() () from /usr/lib/libQt5Core.so.5
#6  0x00007fafbda8d416 in ?? () from /usr/lib/libQt5DBus.so.5
#7  0x00007fafba05db2d in ?? () from /usr/lib/libQt5Core.so.5
#8  0x00007fafb81d908c in start_thread () from /usr/lib/libpthread.so.0
#9  0x00007fafb9402e1f in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7fafc4d79dc0 (LWP 21090)):
[KCrash Handler]
#5  KisProcessingApplicator::applyCommand (this=this@entry=0x0, command=command@entry=0x7faf1c0ac8d0, sequentiality=sequentiality@entry=KisStrokeJobData::SEQUENTIAL, exclusivity=exclusivity@entry=KisStrokeJobData::NORMAL) at /run/media/raghu/Data/krita-build/src/krita/libs/image/kis_processing_applicator.cpp:282
#6  0x00007fafc4456fab in KisNodeJugglerCompressed::addNode (this=<optimized out>, nodes=..., dstParent=..., dstAbove=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/kis_node_juggler_compressed.cpp:774
#7  0x00007fafc444cad1 in KisNodeManager::addNodesDirect (this=this@entry=0x55742771c0e8, nodes=..., parent=..., aboveThis=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/kis_node_manager.cpp:453
#8  0x00007fafc445d2b0 in KisNodeInsertionAdapter::addNodes (this=this@entry=0x55742785f390, nodes=..., parent=..., aboveThis=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/kis_node_insertion_adapter.cpp:48
#9  0x00007fafc4446401 in KisMimeData::insertMimeLayers (data=<optimized out>, image=..., shapeController=<optimized out>, parentDummy=<optimized out>, aboveThisDummy=<optimized out>, copyNode=<optimized out>, nodeInsertionAdapter=0x55742785f390) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/kis_mimedata.cpp:459
#10 0x00007fafc445e378 in KisNodeModel::dropMimeData (this=0x557428eb7f00, data=0x55742f0a2080, action=<optimized out>, row=-1, column=<optimized out>, parent=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/kis_node_model.cpp:656
#11 0x00007fafba1f32c4 in QAbstractProxyModel::dropMimeData(QMimeData const*, Qt::DropAction, int, int, QModelIndex const&) () from /usr/lib/libQt5Core.so.5
#12 0x00007fafbb421965 in QAbstractItemView::dropEvent(QDropEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007fafc4673403 in KisNodeView::dropEvent (this=0x557428e7cdd0, ev=0x7fff59f299e0) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisNodeView.cpp:495
#14 0x00007fafbb209e38 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#15 0x00007fafbb2adb4f in QFrame::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#16 0x00007fafbb42c234 in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#17 0x00007fafbb495dfd in QTreeView::viewportEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#18 0x00007fafc4671f5b in KisNodeView::viewportEvent (this=0x557428e7cdd0, e=0x7fff59f299e0) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisNodeView.cpp:290
#19 0x00007fafba249eac in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#20 0x00007fafbb1c9e18 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#21 0x00007fafbb1d1995 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#22 0x00007fafc4656897 in KisApplication::notify (this=<optimized out>, receiver=0x557428e7d3f0, event=0x7fff59f299e0) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:600
#23 0x00007fafba24a1e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#24 0x00007fafbb226c50 in ?? () from /usr/lib/libQt5Widgets.so.5
#25 0x00007fafbb2279e1 in ?? () from /usr/lib/libQt5Widgets.so.5
#26 0x00007fafbb1c9e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#27 0x00007fafbb1d1816 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#28 0x00007fafc4656897 in KisApplication::notify (this=<optimized out>, receiver=0x5574277101e0, event=0x7fff59f29d60) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:600
#29 0x00007fafba24a1e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#30 0x00007fafba7bcaea in QGuiApplicationPrivate::processDrop(QWindow*, QMimeData const*, QPoint const&, QFlags<Qt::DropAction>) () from /usr/lib/libQt5Gui.so.5
#31 0x00007fafba7944b1 in QWindowSystemInterface::handleDrop(QWindow*, QMimeData const*, QPoint const&, QFlags<Qt::DropAction>) () from /usr/lib/libQt5Gui.so.5
#32 0x00007fafb0199835 in ?? () from /usr/lib/libQt5XcbQpa.so.5
#33 0x00007fafb019c12a in ?? () from /usr/lib/libQt5XcbQpa.so.5
#34 0x00007fafba7ae694 in QBasicDrag::eventFilter(QObject*, QEvent*) () from /usr/lib/libQt5Gui.so.5
#35 0x00007fafba249d5c in QCoreApplicationPrivate::sendThroughApplicationEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#36 0x00007fafbb1c9e7a in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#37 0x00007fafbb1d1816 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#38 0x00007fafc4656897 in KisApplication::notify (this=<optimized out>, receiver=0x557429895660, event=0x7fff59f2a350) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:600
#39 0x00007fafba24a1e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#40 0x00007fafba7bb634 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#41 0x00007fafba7bd186 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#42 0x00007fafba794bbc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#43 0x00007fafb021328d in ?? () from /usr/lib/libQt5XcbQpa.so.5
#44 0x00007fafba24882b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#45 0x00007fafba7aee0c in QBasicDrag::drag(QDrag*) () from /usr/lib/libQt5Gui.so.5
#46 0x00007fafba7cef71 in QDragManager::drag(QDrag*) () from /usr/lib/libQt5Gui.so.5
#47 0x00007fafba7cb6e9 in QDrag::exec(QFlags<Qt::DropAction>, Qt::DropAction) () from /usr/lib/libQt5Gui.so.5
#48 0x00007fafbb42cc5f in QAbstractItemView::startDrag(QFlags<Qt::DropAction>) () from /usr/lib/libQt5Widgets.so.5
#49 0x00007fafc4672fc3 in KisNodeView::startDrag (this=0x557428e7cdd0, supportedActions=...) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisNodeView.cpp:373
#50 0x00007fafbb42b8bb in QAbstractItemView::mouseMoveEvent(QMouseEvent*) () from /usr/lib/libQt5Widgets.so.5
#51 0x00007fafbb496784 in QTreeView::mouseMoveEvent(QMouseEvent*) () from /usr/lib/libQt5Widgets.so.5
#52 0x00007fafbb209e38 in QWidget::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#53 0x00007fafbb2adb4f in QFrame::event(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#54 0x00007fafbb42c234 in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#55 0x00007fafbb495dfd in QTreeView::viewportEvent(QEvent*) () from /usr/lib/libQt5Widgets.so.5
#56 0x00007fafc4671f5b in KisNodeView::viewportEvent (this=0x557428e7cdd0, e=0x7fff59f2b0d0) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisNodeView.cpp:290
#57 0x00007fafba249eac in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#58 0x00007fafbb1c9e18 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#59 0x00007fafbb1d1d91 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#60 0x00007fafc4656897 in KisApplication::notify (this=<optimized out>, receiver=0x557428e7d3f0, event=0x7fff59f2b0d0) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:600
#61 0x00007fafba24a1e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#62 0x00007fafbb1d0d1a in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQt5Widgets.so.5
#63 0x00007fafbb225289 in ?? () from /usr/lib/libQt5Widgets.so.5
#64 0x00007fafbb2279a0 in ?? () from /usr/lib/libQt5Widgets.so.5
#65 0x00007fafbb1c9e3c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#66 0x00007fafbb1d1816 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#67 0x00007fafc4656897 in KisApplication::notify (this=<optimized out>, receiver=0x5574277101e0, event=0x7fff59f2b540) at /run/media/raghu/Data/krita-build/src/krita/libs/ui/KisApplication.cpp:600
#68 0x00007fafba24a1e0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#69 0x00007fafba7bb634 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/libQt5Gui.so.5
#70 0x00007fafba7bd186 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/libQt5Gui.so.5
#71 0x00007fafba794bbc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Gui.so.5
#72 0x00007fafb021328d in ?? () from /usr/lib/libQt5XcbQpa.so.5
#73 0x00007fafba24882b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#74 0x00007fafba251b18 in QCoreApplication::exec() () from /usr/lib/libQt5Core.so.5
#75 0x000055741a4fbd4d in main (argc=<optimized out>, argv=<optimized out>) at /run/media/raghu/Data/krita-build/src/krita/krita/main.cc:306

Reported using DrKonqi
Comment 1 Raghavendra kamath 2018-01-16 07:14:56 UTC
I can reproduce this reliably now,

You have to repeatedly hold ctrl drag and drop the transparency mask on layers one by one.
Comment 2 mvowada 2018-01-16 10:58:47 UTC
Created attachment 109904 [details]
(Video example)

Hi. I can easily reproduce this behaviour on Ubuntu 14.04 with Krita 4.0.0-beta1.1.appimage (see video)
Comment 3 Halla Rempt 2018-01-17 11:01:29 UTC
I can reproduce it easily as well, with the same backtrace. I will assign the issue to Dmitry, since there is no way that the KisProcessingApplicator owned by the KisNodeJugglerCompressed object should be 0 unless KisNodeJugglerCompressed also got deleted.
Comment 4 Dmitry Kazakov 2018-01-30 08:42:42 UTC
Git commit 21e67d8f94fd1887864151cf5d5b840e9d4554df by Dmitry Kazakov.
Committed on 30/01/2018 at 08:42.
Pushed by dkazakov into branch 'master'.

Fix crash when D&D mask with Ctrl key due to the juggler is already ended

There might be a race condition when the juggler is still alive, but
already ended (the two processes are executed by different queued Qt's
signals). We should check for that.

M  +2    -1    libs/ui/kis_node_manager.cpp

https://commits.kde.org/krita/21e67d8f94fd1887864151cf5d5b840e9d4554df