Bug 400072 - Crash when using Quick Group on masks solely, applies for all mask types
Summary: Crash when using Quick Group on masks solely, applies for all mask types
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Layer Stack (show other bugs)
Version: 4.1.5
Platform: Compiled Sources Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 399969 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-10-20 18:29 UTC by Kepa
Modified: 2018-11-20 08:58 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
File with several masks to test the crashes with. (31.83 KB, application/x-krita)
2018-10-20 18:29 UTC, Kepa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kepa 2018-10-20 18:29:48 UTC
Created attachment 115784 [details]
File with several masks to test the crashes with.

SUMMARY
The program freezes and crashes when applying Quick Group solely on masks. It happens with Transparency Masks, Filter Masks, Colorize Masks, Transform Masks and Local Selections, without selecting any other regular layer with them.

STEPS TO REPRODUCE
1. Create a new blank document. 
2. Right-click on the base layer, Add-> Transparency Mask/Filter Mask/...
3. Select the new mask, right-click -> Group -> Quick Group, or ctrl-G.

OBSERVED RESULT
Program freezes over for about 15 seconds, and then closes entirely without any warning, losing all progress up to the latest autosave.

EXPECTED RESULT
Create a new group containing the mask alone.

Additionally, selecting a group of layers along with masks and using Quick Group on said selection puts the layers in the group, while leaving the masks outside; in this case, no crashes have been observed so far though.
Comment 1 Kepa 2018-10-20 21:36:20 UTC
I confirm this also happens in my desktop using Mint/Ubuntu based.
Comment 2 Halla Rempt 2018-10-21 11:31:33 UTC
Backtrace:


Thread 1 (Thread 0x7f64fe71ecc0 (LWP 21880)):
[KCrash Handler]
#6  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#7  0x00007f64fa7d1801 in __GI_abort () at abort.c:79
#8  0x00007f64fb1a35db in QMessageLogger::fatal(char const*, ...) const () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f64fb1a2dd1 in qt_assert(char const*, char const*, int) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f64fd8b286e in QList<KisSharedPtr<KisNode> >::last (this=0x7ffeebf47e50) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:348
#11 KisNodeManager::createQuickGroupImpl (this=this@entry=0x5617a1b85278, juggler=juggler@entry=0x5617a486e8a0, overrideGroupName=..., newGroup=newGroup@entry=0x7ffeebf47ee0, newLastChild=newLastChild@entry=0x7ffeebf47ee8) at /home/boud/dev/krita/libs/ui/kis_node_manager.cpp:1396
#12 0x00007f64fd8b2a52 in KisNodeManager::createQuickGroup (this=0x5617a1b85278) at /home/boud/dev/krita/libs/ui/kis_node_manager.cpp:1407
#13 0x00007f64fdc90ebd in KisNodeManager::qt_static_metacall (_o=0x5617a1b85278, _c=<optimized out>, _id=<optimized out>, _a=0x7ffeebf48090) at /home/boud/dev/b-krita/libs/ui/kritaui_autogen/EWIEGA46WW/moc_kis_node_manager.cpp:358
#14 0x00007f64fb3cdad5 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007f64fc125732 in QAction::triggered(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f64fc127d6c in QAction::activate(QAction::ActionEvent) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f64fc29b4bc in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f64fc2a2a3b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f64fc2a38f3 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f64fc16ab08 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f64fc2a5c2b in QMenu::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f64fc12be8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f64fc133ff7 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f64fdb65bd7 in KisApplication::notify (this=<optimized out>, receiver=0x5617a84c2cc0, event=0x7ffeebf48720) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#25 0x00007f64fb39eab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007f64fc132942 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f64fc1859aa in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f64fc188289 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f64fc12be8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f64fc13345f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f64fdb65bd7 in KisApplication::notify (this=<optimized out>, receiver=0x5617a77a3f00, event=0x7ffeebf48b90) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#32 0x00007f64fb39eab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f64fb9302ab in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#34 0x00007f64fb931e55 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007f64fb90af0b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#36 0x00007f64e5cf9edb in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#37 0x00007f64fb39cdea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#38 0x00007f64fc2a0710 in QMenu::exec(QPoint const&, QAction*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007f64bee2bb61 in KisLayerBox::slotContextMenuRequested (this=<optimized out>, pos=..., index=...) at /home/boud/dev/krita/plugins/dockers/defaultdockers/kis_layer_box.cpp:685
#40 0x00007f64bee2c1fd in KisLayerBox::qt_static_metacall (_o=0x5617a3cbe4a0, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-krita/plugins/dockers/defaultdockers/kritadefaultdockers_autogen/include/moc_kis_layer_box.cpp:228
#41 0x00007f64fb3cdad5 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007f64fdc7e077 in KisNodeView::contextMenuRequested (this=this@entry=0x5617a3dbc720, _t1=..., _t2=...) at /home/boud/dev/b-krita/libs/ui/kritaui_autogen/EWIEGA46WW/moc_KisNodeView.cpp:221
#43 0x00007f64fdb84db5 in KisNodeView::showContextMenu (index=..., globalPos=..., this=<optimized out>) at /home/boud/dev/krita/libs/ui/KisNodeView.cpp:312
#44 KisNodeView::contextMenuEvent (this=0x5617a3dbc720, e=0x7ffeebf498c0) at /home/boud/dev/krita/libs/ui/KisNodeView.cpp:307
#45 0x00007f64fc16b8ea in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#46 0x00007f64fc20c71e in QFrame::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#47 0x00007f64fc3838eb in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#48 0x00007f64fc3ececc in QTreeView::viewportEvent(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#49 0x00007f64fdb8419b in KisNodeView::viewportEvent (this=0x5617a3dbc720, e=0x7ffeebf498c0) at /home/boud/dev/krita/libs/ui/KisNodeView.cpp:298
#50 0x00007f64fb39e83d in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x00007f64fc12be65 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#52 0x00007f64fc1339ce in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#53 0x00007f64fdb65bd7 in KisApplication::notify (this=<optimized out>, receiver=0x5617a3dbce30, event=0x7ffeebf498c0) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#54 0x00007f64fb39eab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#55 0x00007f64fc185da8 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#56 0x00007f64fc188289 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#57 0x00007f64fc12be8c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#58 0x00007f64fc13345f in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#59 0x00007f64fdb65bd7 in KisApplication::notify (this=<optimized out>, receiver=0x5617a1cfb5b0, event=0x7ffeebf49d30) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#60 0x00007f64fb39eab8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#61 0x00007f64fb9302ab in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#62 0x00007f64fb931e55 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#63 0x00007f64fb90af0b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#64 0x00007f64e5cf9edb in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#65 0x00007f64fb39cdea in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#66 0x00007f64fb3a5fa0 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#67 0x0000561797c5a78b in main (argc=<optimized out>, argv=0x7ffeebf4a2a8) at /home/boud/dev/krita/krita/main.cc:456
Comment 3 Halla Rempt 2018-10-21 11:37:01 UTC
Git commit 668c2711fdb115f15022795dbd2eb8ff474c7893 by Boudewijn Rempt.
Committed on 21/10/2018 at 11:35.
Pushed by rempt into branch 'master'.

Do not try to group an empty set of nodes

We cannot disable the action, since the list of nodes that's
going to be grouped is only available this deep in the function,
so check if there nodes left to group, and if there aren't,
return.

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

https://commits.kde.org/krita/668c2711fdb115f15022795dbd2eb8ff474c7893
Comment 4 Halla Rempt 2018-10-21 11:41:50 UTC
*** Bug 399969 has been marked as a duplicate of this bug. ***
Comment 5 Halla Rempt 2018-11-20 08:58:13 UTC
Git commit 1a9546d5ad739944a0fb19c556a45059c533342e by Boudewijn Rempt.
Committed on 20/11/2018 at 08:23.
Pushed by rempt into branch 'krita/4.1'.

Do not try to group an empty set of nodes

We cannot disable the action, since the list of nodes that's
going to be grouped is only available this deep in the function,
so check if there nodes left to group, and if there aren't,
return.

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

https://commits.kde.org/krita/1a9546d5ad739944a0fb19c556a45059c533342e