Bug 377781 - Krita Random Crash While Idle
Summary: Krita Random Crash While Idle
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: Tablets (tablet issues are only very rarely bugs in Krita!) (show other bugs)
Version: 3.1.2
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: drkonqi
: 377884 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-18 16:19 UTC by Leo
Modified: 2017-11-20 15:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita output including crash (2.27 MB, text/plain)
2017-03-24 17:09 UTC, Leo
Details
Krita output to shell (14.09 KB, text/plain)
2017-03-24 17:12 UTC, Leo
Details
Krita crash after turning monitors back on again. (18.38 KB, text/plain)
2017-04-20 21:24 UTC, Leo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leo 2017-03-18 16:19:24 UTC
Application: krita (3.1.2)

Qt Version: 5.7.1
Frameworks Version: 5.31.0
Operating System: Linux 4.10.1-2-default x86_64
Distribution: "openSUSE Tumbleweed"

-- Information about the crash:
While not in use and sitting in the background Krita will crash.

The crash can be reproduced sometimes.

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

Thread 5 (Thread 0x7fcab6d4c700 (LWP 2455)):
#0  0x00007fcae8a5a9a6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fcaef5757fb in QWaitConditionPrivate::wait (time=18446744073709551615, this=0xc960a60) at thread/qwaitcondition_unix.cpp:143
#2  QWaitCondition::wait (this=this@entry=0xc9606a0, mutex=mutex@entry=0xc960698, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007fcaf065f652 in QFileInfoGatherer::run (this=0xc960688) at dialogs/qfileinfogatherer.cpp:217
#4  0x00007fcaef574906 in QThreadPrivate::start (arg=0xc960688) at thread/qthread_unix.cpp:368
#5  0x00007fcae8a54537 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fcaeec6804f in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fcab754d700 (LWP 2451)):
#0  0x00007fcae8a5a9a6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fcaef5757fb in QWaitConditionPrivate::wait (time=18446744073709551615, this=0xbbadc20) at thread/qwaitcondition_unix.cpp:143
#2  QWaitCondition::wait (this=<optimized out>, mutex=mutex@entry=0xbbadc00, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007fcaef56e806 in QSemaphore::tryAcquire (this=0xbba7260, n=n@entry=1, timeout=timeout@entry=-1) at thread/qsemaphore.cpp:220
#4  0x00007fcaeca93873 in KisTileDataSwapper::waitForWork (this=this@entry=0x7fcaecf65a60 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /usr/src/debug/krita-3.1.2.1/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#5  0x00007fcaeca93aaa in KisTileDataSwapper::run (this=0x7fcaecf65a60 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at /usr/src/debug/krita-3.1.2.1/libs/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#6  0x00007fcaef574906 in QThreadPrivate::start (arg=0x7fcaecf65a60 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+64>) at thread/qthread_unix.cpp:368
#7  0x00007fcae8a54537 in start_thread () from /lib64/libpthread.so.0
#8  0x00007fcaeec6804f in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fcab7d4e700 (LWP 2450)):
#0  0x00007fcae8a5a9a6 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fcaef5757fb in QWaitConditionPrivate::wait (time=18446744073709551615, this=0xbbad9b0) at thread/qwaitcondition_unix.cpp:143
#2  QWaitCondition::wait (this=this@entry=0xbba7248, mutex=mutex@entry=0xbba7240, time=time@entry=18446744073709551615) at thread/qwaitcondition_unix.cpp:215
#3  0x00007fcaef56e513 in QSemaphore::acquire (this=this@entry=0x7fcaecf65a30 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder+16>, n=n@entry=1) at thread/qsemaphore.cpp:143
#4  0x00007fcaeca791ee in KisTileDataPooler::waitForWork (this=0x7fcaecf65a20 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>) at /usr/src/debug/krita-3.1.2.1/libs/image/tiles3/kis_tile_data_pooler.cc:165
#5  0x00007fcaeca799fa in KisTileDataPooler::run (this=0x7fcaecf65a20 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>) at /usr/src/debug/krita-3.1.2.1/libs/image/tiles3/kis_tile_data_pooler.cc:187
#6  0x00007fcaef574906 in QThreadPrivate::start (arg=0x7fcaecf65a20 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>) at thread/qthread_unix.cpp:368
#7  0x00007fcae8a54537 in start_thread () from /lib64/libpthread.so.0
#8  0x00007fcaeec6804f in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fcacbb27700 (LWP 1962)):
#0  0x00007fcaeec5e7bd in poll () from /lib64/libc.so.6
#1  0x00007fcae71ad896 in ?? () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fcae71ad9ac in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fcaef79948b in QEventDispatcherGlib::processEvents (this=0x7fcac40008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007fcaef7425ea in QEventLoop::exec (this=this@entry=0x7fcacbb26cb0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007fcaef56fb03 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:507
#6  0x00007fcae8c82b99 in ?? () from /usr/lib64/libQt5DBus.so.5
#7  0x00007fcaef574906 in QThreadPrivate::start (arg=0x7fcae8ef6d20) at thread/qthread_unix.cpp:368
#8  0x00007fcae8a54537 in start_thread () from /lib64/libpthread.so.0
#9  0x00007fcaeec6804f in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fcaf1eead40 (LWP 1923)):
[KCrash Handler]
#6  0x00007fcaf0467634 in QWidget::windowHandle (this=0x19425d0) at kernel/qwidget.cpp:2642
#7  0x00007fcaf18dab76 in QXcbConnection::addWindowFromXi2Id (this=this@entry=0x16023d0, id=<optimized out>) at /usr/src/debug/krita-3.1.2.1/libs/ui/input/wintab/qxcbconnection.cpp:357
#8  0x00007fcaf18dae7c in QXcbConnection::notifyEnterEvent (this=0x16023d0, event=event@entry=0x7fcad40033d0) at /usr/src/debug/krita-3.1.2.1/libs/ui/input/wintab/qxcbconnection.cpp:349
#9  0x00007fcaf18dc747 in KisXi2EventFilter::nativeEventFilter (this=0x7fcaf1d3efe0 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>, eventType=..., message=0x7fcad40033d0, result=<optimized out>) at /usr/src/debug/krita-3.1.2.1/libs/ui/input/wintab/kis_xi2_event_filter.cpp:163
#10 0x00007fcaef74172f in QAbstractEventDispatcher::filterNativeEvent (this=<optimized out>, eventType=..., message=message@entry=0x7fcad40033d0, result=result@entry=0x7ffc34c8a0f8) at kernel/qabstracteventdispatcher.cpp:466
#11 0x00007fcadd704014 in QXcbConnection::handleXcbEvent (this=this@entry=0x1123db0, event=event@entry=0x7fcad40033d0) at qxcbconnection.cpp:1108
#12 0x00007fcadd704cf5 in QXcbConnection::processXcbEvents (this=0x1123db0) at qxcbconnection.cpp:1743
#13 0x00007fcaef771539 in QObject::event (this=0x1123db0, e=<optimized out>) at kernel/qobject.cpp:1263
#14 0x00007fcaf043902c in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1123db0, e=0x7fcad4006190) at kernel/qapplication.cpp:3799
#15 0x00007fcaf04407d1 in QApplication::notify (this=0x7ffc34c8ac10, receiver=receiver@entry=0x1123db0, e=e@entry=0x7fcad4006190) at kernel/qapplication.cpp:3556
#16 0x00007fcaf1820e87 in KisApplication::notify (this=<optimized out>, receiver=0x1123db0, event=0x7fcad4006190) at /usr/src/debug/krita-3.1.2.1/libs/ui/KisApplication.cpp:538
#17 0x00007fcaef744638 in QCoreApplication::notifyInternal2 (receiver=0x1123db0, event=event@entry=0x7fcad4006190) at kernel/qcoreapplication.cpp:988
#18 0x00007fcaef746e20 in QCoreApplication::sendEvent (event=0x7fcad4006190, receiver=<optimized out>) at kernel/qcoreapplication.h:231
#19 QCoreApplicationPrivate::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0, data=0x1111cf0) at kernel/qcoreapplication.cpp:1649
#20 0x00007fcaef7472f8 in QCoreApplication::sendPostedEvents (receiver=receiver@entry=0x0, event_type=event_type@entry=0) at kernel/qcoreapplication.cpp:1503
#21 0x00007fcaef799063 in postEventSourceDispatch (s=0x1164310) at kernel/qeventdispatcher_glib.cpp:276
#22 0x00007fcae71ad697 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#23 0x00007fcae71ad900 in ?? () from /usr/lib64/libglib-2.0.so.0
#24 0x00007fcae71ad9ac in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#25 0x00007fcaef79946f in QEventDispatcherGlib::processEvents (this=0x1159fc0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007fcaef7425ea in QEventLoop::exec (this=this@entry=0x7ffc34c8a800, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#27 0x00007fcaef74aeec in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#28 0x00007fcaefc8c63c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1643
#29 0x00007fcaf0438f85 in QApplication::exec () at kernel/qapplication.cpp:2975
#30 0x00000000004052d2 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/krita-3.1.2.1/krita/main.cc:258

Reported using DrKonqi
Comment 1 Halla Rempt 2017-03-21 13:49:18 UTC
*** Bug 377884 has been marked as a duplicate of this bug. ***
Comment 2 Halla Rempt 2017-03-21 13:50:26 UTC
These are the official OpenSUSE packages? Does this also happen with the 3.1.2 appimage we release?
Comment 3 Leo 2017-03-22 10:35:32 UTC
(In reply to Boudewijn Rempt from comment #2)
> These are the official OpenSUSE packages? Does this also happen with the
> 3.1.2 appimage we release?

Yes, official OpenSuse package.

3.1.2.1-2.1-x86_64 from openSUSE:Tumbleweed

I am also running the appimage now to see if the same crash occurs. Give me a few days. I use Krita frequently and for long periods.
Comment 4 Halla Rempt 2017-03-22 10:51:27 UTC
Sure, that's fine!
Comment 5 Leo 2017-03-22 21:15:19 UTC
(In reply to Boudewijn Rempt from comment #4)
> Sure, that's fine!

Yes, I can confirm a similar crash with the most current Krita appimage.

In all instances, I have file/s open that I have been working on. I will leave the computer for a break, perhaps an hour or more and return to find that Krita has crashed and no longer running.
Comment 6 Halla Rempt 2017-03-23 08:29:28 UTC
Hm... And are you using plain X11 or Wayland + X11? What desktop environment? And do you have a drawing tablet connected?


The crash happens somewhere in the xcb code, apparently we get a window/widget that doesn't have a valid windowHandle.

I don't have tumbleweed, just the latest leap. But I'll start krita, load some stuff and wait a while...
Comment 7 Halla Rempt 2017-03-23 09:15:54 UTC
Could you also start krita from a terminal and attach all terminal output? Especially xcb errors are interesting.
Comment 8 Leo 2017-03-23 12:44:05 UTC
(In reply to Boudewijn Rempt from comment #7)
> Could you also start krita from a terminal and attach all terminal output?
> Especially xcb errors are interesting.

(In reply to Boudewijn Rempt from comment #6)
> Hm... And are you using plain X11 or Wayland + X11? What desktop
> environment? And do you have a drawing tablet connected?
> 
> 
> The crash happens somewhere in the xcb code, apparently we get a
> window/widget that doesn't have a valid windowHandle.
> 
> I don't have tumbleweed, just the latest leap. But I'll start krita, load
> some stuff and wait a while...


loginctl show-session 2 -p Type
Type=x11

Desktop: KDE 5 Plasma

No drawing tablet. =( I want one.
Comment 9 Leo 2017-03-24 17:09:59 UTC
Created attachment 104725 [details]
Krita output including crash

This output from Krita also includes when it crashed as I reported.
Comment 10 Leo 2017-03-24 17:12:55 UTC
Created attachment 104726 [details]
Krita output to shell

This is the output from Krita to the shell, without any crash.
Comment 11 Dmitry Kazakov 2017-04-10 12:03:30 UTC
Looks like it is *not* wayland, but some problem is XCB...

QXcbConnection: XCB error: 3 (BadWindow), sequence: 56311, resource id: 34089088, major code: 40 (TranslateCoords), minor code: 0

Leo, does your computer sleeps/hibernates in the meantime?
Comment 12 Leo 2017-04-10 14:58:25 UTC
(In reply to Dmitry Kazakov from comment #11)
> Looks like it is *not* wayland, but some problem is XCB...
> 
> QXcbConnection: XCB error: 3 (BadWindow), sequence: 56311, resource id:
> 34089088, major code: 40 (TranslateCoords), minor code: 0
> 
> Leo, does your computer sleeps/hibernates in the meantime?

sleeps/hibernates no, but when it goes idle after 30min, I have the screen set to blank and lock. So when I log back in, Krita has already crashed. 

I am now running Krita 3.1.3-beta.1 appimage.
Comment 13 Leo 2017-04-20 21:22:47 UTC
(In reply to Dmitry Kazakov from comment #11)
> Looks like it is *not* wayland, but some problem is XCB...
> 
> QXcbConnection: XCB error: 3 (BadWindow), sequence: 56311, resource id:
> 34089088, major code: 40 (TranslateCoords), minor code: 0
> 
> Leo, does your computer sleeps/hibernates in the meantime?

If I turn the monitors off, and then on again, even in a short time, so hence, no lock screen, this will cause Krita to crash.

This occurs with the current Krita 3.1.3-beta.1 appimage.
Comment 14 Leo 2017-04-20 21:24:33 UTC
Created attachment 105119 [details]
Krita crash after turning monitors back on again.
Comment 15 Halla Rempt 2017-04-21 13:45:14 UTC
Um... htat's not a krita crash, it's a crash in plasmashell.
Comment 16 Christoph Feck 2017-04-26 22:42:27 UTC
Comment #14 is unrelated to the original reported crash. Reassigning back.

If this crash is not caused by Krita's KisXi2EventFilter, then it is most likely an upstream (Qt) bug.
Comment 17 Halla Rempt 2017-11-20 15:28:48 UTC
I'm really sorry, but there just isn't anything we can do with this report. It's not reproducible on any of my test devices, and without a gdb backtrace we cannot even begin to figure out where the problem could be :-(