Bug 270753 - Krita crashes at creating clone layer of group layer
Summary: Krita crashes at creating clone layer of group layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 12:43 UTC by Torio Mlshi
Modified: 2011-06-15 01:28 UTC (History)
1 user (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 Torio Mlshi 2011-04-12 12:43:13 UTC
Version:           svn trunk (using KDE 4.6.2) 
OS:                Linux

Crash trace:

Application: Krita (krita), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fc1ed7ae780 (LWP 6590))]

Thread 7 (Thread 0x7fc1cb2b1700 (LWP 6594)):
#0  0x00007fc1e4a526e3 in select () from /lib/libc.so.6
#1  0x00007fc1ed0dbd76 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fc1ed0e0cab in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fc1ed0e1b3b in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fc1ed0b1b72 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fc1ed0b1f5d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fc1ecfc11ad in QThread::exec() () from /usr/lib64/qt4/libQtCore.so.4
#7  0x00007fc1ed091f28 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#8  0x00007fc1ecfc4155 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#9  0x00007fc1ecd328f4 in start_thread () from /lib/libpthread.so.0
#10 0x00007fc1e4a58d4d in clone () from /lib/libc.so.6

Thread 6 (Thread 0x7fc1caab0700 (LWP 6599)):
#0  0x00007fc1ecd3719c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc1ecfc4ceb in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fc1ecfc099b in QSemaphore::acquire(int) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fc1ec497bae in KisTileDataPooler::waitForWork (this=0x13827e0) at /data/all/Development/Calligra/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  0x00007fc1ec4983c8 in KisTileDataPooler::run (this=0x13827e0) at /data/all/Development/Calligra/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007fc1ecfc4155 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fc1ecd328f4 in start_thread () from /lib/libpthread.so.0
#7  0x00007fc1e4a58d4d in clone () from /lib/libc.so.6

Thread 5 (Thread 0x7fc1ca2af700 (LWP 6600)):
#0  0x00007fc1ecd3719c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc1ecfc4ceb in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fc1ecfc0c4b in QSemaphore::tryAcquire(int, int) () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fc1ec4b572a in KisTileDataSwapper::run (this=0x1382818) at /data/all/Development/Calligra/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#4  0x00007fc1ecfc4155 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#5  0x00007fc1ecd328f4 in start_thread () from /lib/libpthread.so.0
#6  0x00007fc1e4a58d4d in clone () from /lib/libc.so.6

Thread 4 (Thread 0x7fc1be62b700 (LWP 6627)):
#0  0x00007fc1ecd37509 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc1ecfc4c61 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fc1ecfb8a91 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fc1ecfc4155 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fc1ecd328f4 in start_thread () from /lib/libpthread.so.0
#5  0x00007fc1e4a58d4d in clone () from /lib/libc.so.6

Thread 3 (Thread 0x7fc1bee2c700 (LWP 6628)):
#0  0x00007fc1ecd37509 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc1ecfc4c61 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fc1ecfb8a91 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fc1ecfc4155 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fc1ecd328f4 in start_thread () from /lib/libpthread.so.0
#5  0x00007fc1e4a58d4d in clone () from /lib/libc.so.6

Thread 2 (Thread 0x7fc1bf62d700 (LWP 6629)):
#0  0x00007fc1ecd37509 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fc1ecfc4c61 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007fc1ecfb8a91 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007fc1ecfc4155 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007fc1ecd328f4 in start_thread () from /lib/libpthread.so.0
#5  0x00007fc1e4a58d4d in clone () from /lib/libc.so.6

Thread 1 (Thread 0x7fc1ed7ae780 (LWP 6590)):
[KCrash Handler]
#6  isValid (this=0x7fc1e4cdbe60) at /data/all/Development/Calligra/src/calligra/krita/image/kis_shared_ptr.h:402
#7  KisNode::parent (this=0x7fc1e4cdbe60) at /data/all/Development/Calligra/src/calligra/krita/image/kis_node.cpp:136
#8  0x00007fc1ec995bc6 in KisLayerManager::addCloneLayer (this=0x1a42cc0, parent=<value optimized out>, above=<value optimized out>) at /data/all/Development/Calligra/src/calligra/krita/ui/kis_layer_manager.cc:397
#9  0x00007fc1ec9ac9cc in KisNodeManager::createNode (this=0x1a42c00, nodeType=<value optimized out>) at /data/all/Development/Calligra/src/calligra/krita/ui/kis_node_manager.cpp:309
#10 0x00007fc1c30d6789 in KisLayerBox::slotNewCloneLayer (this=0x1431160) at /data/all/Development/Calligra/src/calligra/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp:350
#11 0x00007fc1c30dba0d in KisLayerBox::qt_metacall (this=0x1431160, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffb17f4120) at /data/all/Development/Calligra/build/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.moc:140
#12 0x00007fc1ed0ca67f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#13 0x00007fc1e601a3e2 in QAction::triggered(bool) () from /usr/lib64/qt4/libQtGui.so.4
#14 0x00007fc1e601ba6b in QAction::activate(QAction::ActionEvent) () from /usr/lib64/qt4/libQtGui.so.4
#15 0x00007fc1e6475f7a in ?? () from /usr/lib64/qt4/libQtGui.so.4
#16 0x00007fc1e647b802 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#17 0x00007fc1e607701d in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#18 0x00007fc1e647d90b in QMenu::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#19 0x00007fc1e602195c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007fc1e602752e in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#21 0x00007fc1e6d90386 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#22 0x00007fc1ed0b2deb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007fc1e6025d95 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/qt4/libQtGui.so.4
#24 0x00007fc1e60aa115 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#25 0x00007fc1e60a8cd9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#26 0x00007fc1e60d34c7 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#27 0x00007fc1ed0b1b72 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#28 0x00007fc1ed0b1f5d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#29 0x00007fc1e6478ff9 in QMenu::exec(QPoint const&, QAction*) () from /usr/lib64/qt4/libQtGui.so.4
#30 0x00007fc1c30da5fe in KisLayerBox::slotContextMenuRequested (this=0x1431160, pos=..., index=<value optimized out>) at /data/all/Development/Calligra/src/calligra/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp:320
#31 0x00007fc1c30db8f9 in KisLayerBox::qt_metacall (this=0x1431160, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffb17f5cb0) at /data/all/Development/Calligra/build/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.moc:122
#32 0x00007fc1ed0ca67f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#33 0x00007fc1ebc95617 in KoDocumentSectionView::contextMenuRequested (this=0x7fffb17f3d50, _t1=<value optimized out>, _t2=<value optimized out>) at /data/all/Development/Calligra/build/libs/main/KoDocumentSectionView.moc:99
#34 0x00007fc1ebc959df in KoDocumentSectionView::contextMenuEvent (this=0x1709b90, e=0x7fffb17f6e80) at /data/all/Development/Calligra/src/calligra/libs/main/KoDocumentSectionView.cpp:142
#35 0x00007fc1e6076a22 in QWidget::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#36 0x00007fc1e64375d6 in QFrame::event(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#37 0x00007fc1e656ab8b in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#38 0x00007fc1e65a8765 in QTreeView::viewportEvent(QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#39 0x00007fc1ebc9634b in KoDocumentSectionView::viewportEvent (this=0x1709b90, e=0x7fffb17f6e80) at /data/all/Development/Calligra/src/calligra/libs/main/KoDocumentSectionView.cpp:133
#40 0x00007fc1ed0b262e in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#41 0x00007fc1e602192c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#42 0x00007fc1e6026ee1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#43 0x00007fc1e6d90386 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#44 0x00007fc1ed0b2deb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#45 0x00007fc1e60a9ca3 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#46 0x00007fc1e60a8cd9 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#47 0x00007fc1e60d34c7 in ?? () from /usr/lib64/qt4/libQtGui.so.4
#48 0x00007fc1ed0b1b72 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#49 0x00007fc1ed0b1f5d in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#50 0x00007fc1ed0b5f53 in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#51 0x00007fc1ed3e73f5 in kdemain (argc=<value optimized out>, argv=<value optimized out>) at /data/all/Development/Calligra/src/calligra/krita/main.cc:49
#52 0x00007fc1e49a8bad in __libc_start_main () from /lib/libc.so.6
#53 0x0000000000400949 in _start ()


Reproducible: Always

Steps to Reproduce:
1. Create group layer

2. Create clone layer, when group layer is selected



I've tried 2.3 also and it crashed too.
Comment 1 Halla Rempt 2011-04-12 13:05:49 UTC
Hi Torio! Thanks for your report, definitely confirmed.
Comment 2 Sven Langkamp 2011-06-14 18:34:05 UTC
Here it doesn't crash anymore. I still think that group shouldn't allow cloning as that can lead to infinite loops.
Comment 3 Sven Langkamp 2011-06-15 01:28:44 UTC
Git commit eed624db271e756b9bb4f24fd52ce9deae1e96bc by Sven Langkamp.
Committed on 15/06/2011 at 01:25.
Pushed by langkamp into branch 'master'.

disabled actions when needed, fixes some crashes when adding mask or clone layer when there are no layers
also clone layers can no longer be added for group layers
BUG:270753

M  +41   -18   krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp     
M  +9    -0    krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h     
M  +1    -0    krita/ui/kis_layer_manager.cc     

http://commits.kde.org/calligra/eed624db271e756b9bb4f24fd52ce9deae1e96bc