Bug 345562

Summary: krita crashed when using color to alpha filter
Product: [Applications] krita Reporter: adrick <mracheniya>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: freebox64, halla
Priority: NOR Keywords: drkonqi
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description adrick 2015-03-26 23:13:03 UTC
Application: krita (2.9.0)
KDE Platform Version: 4.14.6
Qt Version: 4.8.6
Operating System: Linux 3.19.0-10-generic x86_64
Distribution: Ubuntu Vivid Vervet (development branch)

-- Information about the crash:
- What I was doing when the application crashed: I had imported a picture as a layer and wanted to change the background color to alpha but invisible layer was selected instead of that one. left dialog open and selected proper layer. dialog, I bielieve, closed it's self, if it did I reopened it, then clicked the background again. it crashed. tried it again and same. haven't tried with different picture yet. using krita lime 2.9 I bielieve. updated to ubuntu vivid vervet after install.

The crash can be reproduced every time.

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

Thread 8 (Thread 0x7f51aa5a7700 (LWP 5020)):
#0  0x00007f51c14eb8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f51bb9e1ebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f51bb9e2242 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f51b09f7ae6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007f51bba08955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f51bbecf6aa in start_thread (arg=0x7f51aa5a7700) at pthread_create.c:333
#6  0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 7 (Thread 0x7f51a9da6700 (LWP 5021)):
#0  0x00007f51c14eb8dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f51bb9e1ebc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f51bb9e1fcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f51bb9e2009 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f51bba08955 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f51bbecf6aa in start_thread (arg=0x7f51a9da6700) at pthread_create.c:333
#6  0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 6 (Thread 0x7f51a95a5700 (LWP 5031)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f51c1d64c56 in wait (time=18446744073709551615, this=0x1fd4540) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x1fd44f0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f51c1d60a7b in QSemaphore::acquire (this=this@entry=0x1fd4220, n=n@entry=1) at thread/qsemaphore.cpp:144
#4  0x00007f51c04030be in waitForWork (this=0x1fd4210) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/image/tiles3/kis_tile_data_pooler.cc:162
#5  KisTileDataPooler::run (this=0x1fd4210) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/image/tiles3/kis_tile_data_pooler.cc:184
#6  0x00007f51c1d646ff in QThreadPrivate::start (arg=0x1fd4210) at thread/qthread_unix.cpp:349
#7  0x00007f51bbecf6aa in start_thread (arg=0x7f51a95a5700) at pthread_create.c:333
#8  0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 5 (Thread 0x7f51875a6700 (LWP 5032)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f51c1d64c56 in wait (time=18446744073709551615, this=0x1fd48f0) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0x1fd48a0, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f51c1d60eb3 in QSemaphore::tryAcquire (this=0x1fd45b0, n=n@entry=1, timeout=timeout@entry=-1) at thread/qsemaphore.cpp:221
#4  0x00007f51c042cfd3 in KisTileDataSwapper::waitForWork (this=this@entry=0x1fd4248) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#5  0x00007f51c042d23a in KisTileDataSwapper::run (this=0x1fd4248) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#6  0x00007f51c1d646ff in QThreadPrivate::start (arg=0x1fd4248) at thread/qthread_unix.cpp:349
#7  0x00007f51bbecf6aa in start_thread (arg=0x7f51875a6700) at pthread_create.c:333
#8  0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 4 (Thread 0x7f5187da7700 (LWP 5033)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f51c1d64c56 in wait (time=18446744073709551615, this=0x215c510) at thread/qwaitcondition_unix.cpp:86
#2  QWaitCondition::wait (this=this@entry=0x2156178, mutex=mutex@entry=0x2156170, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:158
#3  0x00007f51c2d9a8dd in QFileInfoGatherer::run (this=0x2156160) at dialogs/qfileinfogatherer.cpp:214
#4  0x00007f51c1d646ff in QThreadPrivate::start (arg=0x2156160) at thread/qthread_unix.cpp:349
#5  0x00007f51bbecf6aa in start_thread (arg=0x7f5187da7700) at pthread_create.c:333
#6  0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f5186da5700 (LWP 5034)):
#0  0x00007f51bba267a4 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f51bb9e13f0 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f51bb9e1de8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f51bb9e1fcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f51c1e9e82e in QEventDispatcherGlib::processEvents (this=0x7f517c0ca360, flags=...) at kernel/qeventdispatcher_glib.cpp:452
#5  0x00007f51c1e6dcd1 in QEventLoop::processEvents (this=this@entry=0x7f5186da4dc0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007f51c1e6e035 in QEventLoop::exec (this=this@entry=0x7f5186da4dc0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007f51c1d61e89 in QThread::exec (this=this@entry=0x21398f0) at thread/qthread.cpp:538
#8  0x00007f51c1e4e443 in QInotifyFileSystemWatcherEngine::run (this=0x21398f0) at io/qfilesystemwatcher_inotify.cpp:265
#9  0x00007f51c1d646ff in QThreadPrivate::start (arg=0x21398f0) at thread/qthread_unix.cpp:349
#10 0x00007f51bbecf6aa in start_thread (arg=0x7f5186da5700) at pthread_create.c:333
#11 0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f516c297700 (LWP 5061)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00007f5185fb4d7b in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#2  0x00007f5185fb4507 in ?? () from /usr/lib/x86_64-linux-gnu/dri/r600_dri.so
#3  0x00007f51bbecf6aa in start_thread (arg=0x7f516c297700) at pthread_create.c:333
#4  0x00007f51c14f6eed in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f51c417f7c0 (LWP 5019)):
[KCrash Handler]
#6  0x00007f51c1425267 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
#7  0x00007f51c1426eca in __GI_abort () at abort.c:89
#8  0x00007f51c1d59a8a in qt_message_output (msgType=msgType@entry=QtFatalMsg, buf=0x1d792808 "ASSERT: \"!m_d->readyShortcut\" in file /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_shortcut_matcher.cpp, line 433") at global/qglobal.cpp:2386
#9  0x00007f51c1d59df9 in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=msgType@entry=QtFatalMsg, msg=msg@entry=0x7f51c1ed3e00 "ASSERT: \"%s\" in file %s, line %d", ap=ap@entry=0x7ffc288e04a0) at global/qglobal.cpp:2432
#10 0x00007f51c1d5a6e1 in qFatal (msg=msg@entry=0x7f51c1ed3e00 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2615
#11 0x00007f51c1d5a736 in qt_assert (assertion=assertion@entry=0x7f51c3c009e5 "!m_d->readyShortcut", file=file@entry=0x7f51c3c00978 "/build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_shortcut_matcher.cpp", line=line@entry=433) at global/qglobal.cpp:2060
#12 0x00007f51c39c0e6d in KisShortcutMatcher::tryEndRunningShortcut (this=this@entry=0x1d82650, button=Qt::LeftButton, event=event@entry=0x7ffc288e0710) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_shortcut_matcher.cpp:433
#13 0x00007f51c39c218a in KisShortcutMatcher::buttonReleased (this=0x1d82650, button=Qt::LeftButton, event=event@entry=0x7ffc288e0710) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_shortcut_matcher.cpp:193
#14 0x00007f51c39af212 in KisInputManager::eventFilter (this=0x1d82580, object=<optimized out>, event=0x7ffc288e0710) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_input_manager.cpp:640
#15 0x00007f51c39ae8ef in KisInputManager::Private::handleKisTabletEvent (this=0x1d82630, object=object@entry=0x1cf915a0, tevent=tevent@entry=0x7ffc288e0ca0) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_input_manager.cpp:876
#16 0x00007f51c39af148 in KisInputManager::eventFilter (this=0x1d82580, object=<optimized out>, event=0x7ffc288e0ca0) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/kis_input_manager.cpp:807
#17 0x00007f51c1e6f2e6 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x14028a0, receiver=receiver@entry=0x1cf915a0, event=event@entry=0x7ffc288e0ca0) at kernel/qcoreapplication.cpp:1065
#18 0x00007f51c288899c in QApplicationPrivate::notify_helper (this=this@entry=0x14028a0, receiver=receiver@entry=0x1cf915a0, e=e@entry=0x7ffc288e0ca0) at kernel/qapplication.cpp:4566
#19 0x00007f51c288f4d8 in QApplication::notify (this=0x7ffc288e1760, receiver=receiver@entry=0x1cf915a0, e=e@entry=0x7ffc288e0ca0) at kernel/qapplication.cpp:4356
#20 0x00007f51c39f8977 in KisApplication::notify (this=<optimized out>, receiver=0x1cf915a0, event=0x7ffc288e0ca0) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/KisApplication.cpp:488
#21 0x00007f51c1e6f17d in QCoreApplication::notifyInternal (this=0x7ffc288e1760, receiver=receiver@entry=0x1cf915a0, event=event@entry=0x7ffc288e0ca0) at kernel/qcoreapplication.cpp:955
#22 0x00007f51c3a97a16 in sendEvent (event=0x7ffc288e0ca0, receiver=0x1cf915a0) at /usr/include/qt4/QtCore/qcoreapplication.h:231
#23 translateXinputEvent (ev=ev@entry=0x7ffc288e1020, tablet=tablet@entry=0x1682f70, defaultWidget=<optimized out>) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/wintab/kis_tablet_support_x11.cpp:732
#24 0x00007f51c3a98706 in KisTabletSupportX11::eventFilter (ev=0x7ffc288e1020) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/ui/input/wintab/kis_tablet_support_x11.cpp:802
#25 0x00007f51c28f62e5 in qt_x11EventFilter (ev=0x7ffc288e1020) at kernel/qapplication_x11.cpp:432
#26 0x00007f51c2906d0b in QApplication::x11ProcessEvent (this=0x7ffc288e1760, event=event@entry=0x7ffc288e1020) at kernel/qapplication_x11.cpp:3460
#27 0x00007f51c2930ba2 in x11EventSourceDispatch (s=0x1404000, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#28 0x00007f51bb9e1c3d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007f51bb9e1f20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007f51bb9e1fcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f51c1e9e80e in QEventDispatcherGlib::processEvents (this=0x129d260, flags=...) at kernel/qeventdispatcher_glib.cpp:450
#32 0x00007f51c2930c66 in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007f51c1e6dcd1 in QEventLoop::processEvents (this=this@entry=0x7ffc288e1400, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007f51c1e6e035 in QEventLoop::exec (this=this@entry=0x7ffc288e1400, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007f51c1e73ab9 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1227
#36 0x00007f51c2886c1c in QApplication::exec () at kernel/qapplication.cpp:3828
#37 0x000000000040271c in main (argc=<optimized out>, argv=<optimized out>) at /build/buildd/krita-2.9-2+git20150309+r74111-52/krita/main.cc:179

Possible duplicates by query: bug 330637, bug 329162, bug 324432, bug 324106, bug 323829.

Reported using DrKonqi
Comment 1 mvowada 2015-03-28 13:26:07 UTC
Sorry, I can't reproduce the issue with Krita 2.9.1 on Ubuntu 14.04 Unity. My steps:

1. hide the current layer
2. insert a new image as layer (by dragging an image on the Krita window)
3. click on the hidden layer in the layerbox to select it
4. (main menu) -> "Filter" -> "Colors" -> "Color to Alpha..." 
5. click over the image you see on the canvas, a box pop-up inform that you're on an hidden layer. Close it by clicking "Ok".
6. with the "Color to Alpha" dialog still open, click on the layer with the inserted image, to select it
7. then repeat: (main menu) -> Filters -> Color to Alpha 
8. and click over the image you see on the canvas.
Comment 2 Halla Rempt 2015-11-04 07:59:45 UTC
Hm, I think that the steps to reproduce have little to do with the crash. There's apparently some way to confuse the shortcut matcher system so the assert goes off: I'm not sure why that assert is there, though...
Comment 3 Halla Rempt 2015-11-04 08:05:24 UTC
Git commit 05acd211695aa67c674e92c0cbeb723a53e8cb7d by Boudewijn Rempt.
Committed on 04/11/2015 at 08:01.
Pushed by rempt into branch 'calligra/2.9'.

If we shouldn't arrive in tryEndRunningShortcut if there is a
readyShortcut, check for that condition before calling
tryEndRunningShortcut.

M  +1    -1    krita/ui/input/kis_shortcut_matcher.cpp

http://commits.kde.org/calligra/05acd211695aa67c674e92c0cbeb723a53e8cb7d
Comment 4 Halla Rempt 2015-11-04 08:05:47 UTC
Git commit fcd64eeafb17e83c78902957846cd648a79b5f0a by Boudewijn Rempt.
Committed on 04/11/2015 at 08:05.
Pushed by rempt into branch 'master'.

If we shouldn't arrive in tryEndRunningShortcut if there is a
readyShortcut, check for that condition before calling
tryEndRunningShortcut.

M  +1    -1    krita/ui/input/kis_shortcut_matcher.cpp

http://commits.kde.org/krita/fcd64eeafb17e83c78902957846cd648a79b5f0a