Bug 401911 - Krita crashes after grouping masks converted from layers
Summary: Krita crashes after grouping masks converted from layers
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.1.5
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2018-12-09 03:03 UTC by Andras
Modified: 2019-01-17 10:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andras 2018-12-09 03:03:35 UTC
Application: krita (4.1.5)

Qt Version: 5.11.2
Frameworks Version: 5.52.0
Operating System: Linux 4.15.0-42-generic x86_64
Distribution: KDE neon User Edition 5.14

-- Information about the crash:
- What I was doing when the application crashed at the first time I noticed this:
Grouped some (5) layers of the image with several modification, different opacity for example.
Inside above group, insert new layer and convert it to transparency mask and hide som area with it.
Also inside this group, insert two layers and convert them to filter masks, the first one with color adjustment the second one with levels. Try to group these last two masks converted from layers.

However, I think you can repruduce this issue with these simple steps:
Simple make a new empty file, duplicate, qkuick group, 2x insert (2 new layers I mean), convert the last 2 layers to any type of filter masks and try to group them.

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe551845cc0 (LWP 14460))]

Thread 6 (Thread 0x7fe4da64c700 (LWP 14495)):
#0  0x00007fe54dc030b4 in __GI___libc_read (fd=39, buf=0x7fe4da64bae0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x00007fe545f59cd0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe545f15027 in g_main_context_check () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe545f154e0 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fe545f1564c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fe54e75a04b in QEventDispatcherGlib::processEvents (this=0x7fe4cc000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#6  0x00007fe54e6fe30a in QEventLoop::exec (this=this@entry=0x7fe4da64bcf0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#7  0x00007fe54e529bba in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#8  0x00007fe52ee16826 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Quick.so.5
#9  0x00007fe54e534adb in QThreadPrivate::start (arg=0x55cce44ac390) at thread/qthread_unix.cpp:367
#10 0x00007fe5478116db in start_thread (arg=0x7fe4da64c700) at pthread_create.c:463
#11 0x00007fe54dc1488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7fe4dbd55700 (LWP 14494)):
#0  0x00007fe54dc07bf9 in __GI___poll (fds=0x7fe4d4004e00, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe545f15539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe545f1564c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe54e75a04b in QEventDispatcherGlib::processEvents (this=0x7fe4d4000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fe54e6fe30a in QEventLoop::exec (this=this@entry=0x7fe4dbd54d40, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007fe54e529bba in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#6  0x00007fe52e99b4f5 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Qml.so.5
#7  0x00007fe54e534adb in QThreadPrivate::start (arg=0x55cce4383780) at thread/qthread_unix.cpp:367
#8  0x00007fe5478116db in start_thread (arg=0x7fe4dbd55700) at pthread_create.c:463
#9  0x00007fe54dc1488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7fe50a61c700 (LWP 14483)):
#0  0x00007fe54dbd79d0 in __GI___nanosleep (requested_time=requested_time@entry=0x7fe50a61bd80, remaining=remaining@entry=0x7fe50a61bd80) at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1  0x00007fe54e7599ad in qt_nanosleep (amount=...) at kernel/qelapsedtimer_unix.cpp:195
#2  0x00007fe54b79ed0a in KisTileDataSwapper::run (this=0x7fe54bc94ca0 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at ./libs/image/tiles3/swap/kis_tile_data_swapper.cpp:97
#3  0x00007fe54e534adb in QThreadPrivate::start (arg=0x7fe54bc94ca0 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at thread/qthread_unix.cpp:367
#4  0x00007fe5478116db in start_thread (arg=0x7fe50a61c700) at pthread_create.c:463
#5  0x00007fe54dc1488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7fe51165e700 (LWP 14481)):
#0  0x00007fe54dc07bf9 in __GI___poll (fds=0x7fe50c004a10, nfds=1, timeout=9387) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe545f15539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe545f1564c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe54e75a04b in QEventDispatcherGlib::processEvents (this=0x7fe50c000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fe54e6fe30a in QEventLoop::exec (this=this@entry=0x7fe51165dd60, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007fe54e529bba in QThread::exec (this=<optimized out>) at thread/qthread.cpp:525
#6  0x00007fe54e534adb in QThreadPrivate::start (arg=0x55cce1dfc9a0) at thread/qthread_unix.cpp:367
#7  0x00007fe5478116db in start_thread (arg=0x7fe51165e700) at pthread_create.c:463
#8  0x00007fe54dc1488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7fe5290fb700 (LWP 14462)):
#0  0x00007fe54dc07bf9 in __GI___poll (fds=0x7fe524019610, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fe545f15539 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fe545f1564c in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fe54e75a04b in QEventDispatcherGlib::processEvents (this=0x7fe524000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fe54e6fe30a in QEventLoop::exec (this=this@entry=0x7fe5290fad30, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#5  0x00007fe54e529bba in QThread::exec (this=this@entry=0x7fe547cb6d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread.cpp:525
#6  0x00007fe547a3ee45 in QDBusConnectionManager::run (this=0x7fe547cb6d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#7  0x00007fe54e534adb in QThreadPrivate::start (arg=0x7fe547cb6d60 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:367
#8  0x00007fe5478116db in start_thread (arg=0x7fe5290fb700) at pthread_create.c:463
#9  0x00007fe54dc1488f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fe551845cc0 (LWP 14460)):
[KCrash Handler]
#6  0x00007fe550b396ec in KisSharedPtr<KisNode>::operator= (o=..., this=0x7ffd869eae68) at ./libs/global/kis_shared_ptr.h:113
#7  KisNodeManager::createQuickGroupImpl (this=this@entry=0x55cce12e5d88, juggler=juggler@entry=0x55ccd3faf320, overrideGroupName=..., newGroup=newGroup@entry=0x7ffd869eae60, newLastChild=newLastChild@entry=0x7ffd869eae68) at ./libs/ui/kis_node_manager.cpp:1387
#8  0x00007fe550b399b3 in KisNodeManager::createQuickGroup (this=0x55cce12e5d88) at ./libs/ui/kis_node_manager.cpp:1398
#9  0x00007fe550e47275 in KisNodeManager::qt_static_metacall (_o=0x55cce12e5d88, _c=<optimized out>, _id=<optimized out>, _a=0x7ffd869eb000) at ./obj-x86_64-linux-gnu/libs/ui/kritaui_autogen/EWIEGA46WW/moc_kis_node_manager.cpp:366
#10 0x00007fe54e72f075 in QMetaObject::activate (sender=sender@entry=0x55ccd74983e0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffd869eb000) at kernel/qobject.cpp:3771
#11 0x00007fe54e72f747 in QMetaObject::activate (sender=sender@entry=0x55ccd74983e0, m=m@entry=0x7fe54fb57840 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7ffd869eb000) at kernel/qobject.cpp:3633
#12 0x00007fe54f4866b2 in QAction::triggered (this=this@entry=0x55ccd74983e0, _t1=<optimized out>) at .moc/moc_qaction.cpp:376
#13 0x00007fe54f488cec in QAction::activate (this=0x55ccd74983e0, event=<optimized out>) at kernel/qaction.cpp:1166
#14 0x00007fe54f489641 in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1092
#15 0x00007fe54f48ce1c in QApplicationPrivate::notify_helper (this=this@entry=0x55ccd3acaa60, receiver=receiver@entry=0x55ccd74983e0, e=e@entry=0x7ffd869eb320) at kernel/qapplication.cpp:3727
#16 0x00007fe54f4943ef in QApplication::notify (this=0x7ffd869eb7c0, receiver=receiver@entry=0x55ccd74983e0, e=e@entry=0x7ffd869eb320) at kernel/qapplication.cpp:3486
#17 0x00007fe550d49267 in KisApplication::notify (this=<optimized out>, receiver=0x55ccd74983e0, event=0x7ffd869eb320) at ./libs/ui/KisApplication.cpp:600
#18 0x00007fe54e6fffe8 in QCoreApplication::notifyInternal2 (receiver=0x55ccd74983e0, event=event@entry=0x7ffd869eb320) at kernel/qcoreapplication.cpp:1048
#19 0x00007fe54ecbb787 in QCoreApplication::sendEvent (event=0x7ffd869eb320, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:234
#20 QShortcutMap::dispatchEvent (this=this@entry=0x55ccd3acab40, e=e@entry=0x7ffd869eb3d0) at kernel/qshortcutmap.cpp:687
#21 0x00007fe54ecbb85a in QShortcutMap::tryShortcut (this=this@entry=0x55ccd3acab40, e=e@entry=0x7ffd869eb3d0) at kernel/qshortcutmap.cpp:351
#22 0x00007fe54ec6ee23 in QWindowSystemInterface::handleShortcutEvent (window=<optimized out>, window@entry=0x55cce12d0100, timestamp=19206179, keyCode=71, modifiers=..., nativeScanCode=42, nativeVirtualKey=103, nativeModifiers=20, text=..., autorepeat=false, count=1) at kernel/qwindowsysteminterface.cpp:461
#23 0x00007fe54ec8ce67 in QGuiApplicationPrivate::processKeyEvent (e=0x55cd0080a7e0) at kernel/qguiapplication.cpp:2189
#24 0x00007fe54ec92315 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x55cd0080a7e0) at kernel/qguiapplication.cpp:1823
#25 0x00007fe54ec6af5b in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1032
#26 0x00007fe5387a976b in QPAEventDispatcherGlib::processEvents (this=0x55ccd3b7f870, flags=...) at qeventdispatcher_glib.cpp:70
#27 0x00007fe54e6fe30a in QEventLoop::exec (this=this@entry=0x7ffd869eb640, flags=..., flags@entry=...) at kernel/qeventloop.cpp:214
#28 0x00007fe54e7074d0 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1336
#29 0x000055ccd0776028 in main (argc=<optimized out>, argv=0x7ffd869eb928) at ./krita/main.cc:438

Reported using DrKonqi
Comment 1 Andras 2018-12-09 04:12:18 UTC
Also I'd like to note my thoughts about this issue what should be ignored if it's simple nonsense, right now as I see masks can't be handled in the same way you handle layers, for example, I am able to create above groups in question what contains only masks by moving out every layers from given group however they're worthless in this way, seemingly masks aren't able the activate the changes when there is no layer directly next to them in the very same group.
I don't know how is it work in deep etc however if this issue and crash can be avoided only by removing the option for detached masks than please don't hide that option because it's just really useful having masks separated from layers.
Comment 2 mvowada 2019-01-15 10:58:24 UTC
Hi Andras,

I'm sorry but I'm not able to reproduce the bug using 4.2.0. Here are my steps, please tell if they are wrong and how to exactly reproduce the crash:

    1. fresh configs
    2. "CTRL+N" (new)
    3. change top layer opacity
    4. "INS" x4 (four times)
    5. change layers opacity and casually paint on them
    6. group the top 5 layers
    7. click the group layer once
    8. add a transparency mask and paint on it
    9. INS x2 (two times: it creates two layers inside the group at the top)
    10. convert them two to "Filter Mask"
    11. group them

Actual Results: no crash
Comment 3 mvowada 2019-01-15 10:59:19 UTC
(Tested with Krita 4.2.0-pre-alpha (git 0c1da95) on Ubuntu 14.04)
Comment 4 mvowada 2019-01-15 11:07:15 UTC
Same results with Krita 1.4.7 (converted layers do not group and no crash).
Comment 5 Andras 2019-01-16 15:25:15 UTC
(In reply to mvowada from comment #4)

There are several changes since then:
Krita 4.1.7.101
Qt Version: 5.11.2
KDE Frameworks Version: 5.54.0
Kernel Version: 4.15.0-43-generic
Distribution: KDE neon User Edition 5.14

Thank you so much for your time and effort. I should have describe it more simple:
1) group 1 or two layer
2) create two new layer inside the group above and and convert this two new layer to any type of filter mask
3) try to group the filter masks above

Anyways, now with this Krita version on the also upgraded system yes, making group is still appears as option also for Filter Masks converted from layer inside a group but it won't work so there is no crash anymore. It seems grouping standalone Filter Masks had been disabled what's solved this bug. Thank you so much again and although it's late, I wish a happy new year for you and for Krita team!
Comment 6 Bug Janitor Service 2019-01-17 04:33:14 UTC
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.
Comment 7 mvowada 2019-01-17 10:45:43 UTC
Hi Andras, thanks for reporting back. I'm going to close the report for now: in case feel free to reopen it. Thanks for the wishes and happy new year you too.