Bug 408043 - Krita 4.2.0 crashes on closing
Summary: Krita 4.2.0 crashes on closing
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.2.0
Platform: Exherbo Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-28 20:14 UTC by Heiko Becker
Modified: 2019-07-19 10:49 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 Heiko Becker 2019-05-28 20:14:28 UTC
STEPS TO REPRODUCE
1. Open krita
2. Close it again

OBSERVED RESULT
drkonqi informs about a crash


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.15.90
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3

Backtrace:

Application: krita (krita), signal: Segmentation fault
Using host libthread_db library "/usr/x86_64-pc-linux-gnu/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9b0b418ec0 (LWP 17363))]

Thread 3 (Thread 0x7f9ab5ffb700 (LWP 17436)):
#0  0x00007f9b0fa62256 in __libc_disable_asynccancel () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#1  0x00007f9b0fa4a14b in poll () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#2  0x00007f9b0d5c8c8e in g_main_context_poll (priority=<optimized out>, n_fds=1, fds=0x7f9ad80025e0, timeout=<optimized out>, context=0x7f9ad80058a0) at ../glib-2.60.3/glib/gmain.c:4228
#3  g_main_context_iterate (context=context@entry=0x7f9ad80058a0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.3/glib/gmain.c:3922
#4  0x00007f9b0d5c8daf in g_main_context_iteration (context=0x7f9ad80058a0, may_block=may_block@entry=1) at ../glib-2.60.3/glib/gmain.c:3988
#5  0x00007f9b0ffe709b in QEventDispatcherGlib::processEvents (this=0x7f9ad8018050, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#6  0x00007f9b0ff8f6fb in QEventLoop::exec (this=this@entry=0x7f9ab5ffad80, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#7  0x00007f9b0fdd6201 in QThread::exec (this=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#8  0x00007f9b0fdd7242 in QThreadPrivate::start (arg=0x557a25822e80) at thread/qthread_unix.cpp:364
#9  0x00007f9b0def363f in start_thread () from /usr/x86_64-pc-linux-gnu/lib/libpthread.so.0
#10 0x00007f9b0fa54d63 in clone () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6

Thread 2 (Thread 0x7f9b03fff700 (LWP 17365)):
#0  0x00007f9b0fdd765c in QMutex::lock (this=this@entry=0x557a1aa67370) at /usr/x86_64-pc-linux-gnu/include/c++/9.1.0/bits/atomic_base.h:769
#1  0x00007f9b0ffe6f8e in QMutexLocker::QMutexLocker (m=0x557a1aa67370, this=<synthetic pointer>) at ../../include/QtCore/../../src/corelib/thread/qmutex.h:206
#2  QThreadData::canWaitLocked (this=0x557a1aa67340) at ../../include/QtCore/5.13.0/QtCore/private/../../../../../src/corelib/thread/qthread_p.h:269
#3  postEventSourcePrepare (s=0x7f9afc004b80, timeout=timeout@entry=0x7f9b03ffeb84) at kernel/qeventdispatcher_glib.cpp:260
#4  0x00007f9b0d5c827e in g_main_context_prepare (context=context@entry=0x7f9afc000bf0, priority=priority@entry=0x7f9b03ffec08) at ../glib-2.60.3/glib/gmain.c:3499
#5  0x00007f9b0d5c8bbe in g_main_context_iterate (context=context@entry=0x7f9afc000bf0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.3/glib/gmain.c:3907
#6  0x00007f9b0d5c8daf in g_main_context_iteration (context=0x7f9afc000bf0, may_block=may_block@entry=1) at ../glib-2.60.3/glib/gmain.c:3988
#7  0x00007f9b0ffe709b in QEventDispatcherGlib::processEvents (this=0x7f9afc000b20, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#8  0x00007f9b0ff8f6fb in QEventLoop::exec (this=this@entry=0x7f9b03ffed40, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:140
#9  0x00007f9b0fdd6201 in QThread::exec (this=this@entry=0x7f9b0dfa1dc0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#10 0x00007f9b0df22347 in QDBusConnectionManager::run (this=0x7f9b0dfa1dc0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at qdbusconnection.cpp:178
#11 0x00007f9b0fdd7242 in QThreadPrivate::start (arg=0x7f9b0dfa1dc0 <(anonymous namespace)::Q_QGS__q_manager::innerFunction()::holder>) at thread/qthread_unix.cpp:364
#12 0x00007f9b0def363f in start_thread () from /usr/x86_64-pc-linux-gnu/lib/libpthread.so.0
#13 0x00007f9b0fa54d63 in clone () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6

Thread 1 (Thread 0x7f9b0b418ec0 (LWP 17363)):
[KCrash Handler]
#6  QThreadStorageData::get (this=0x0) at thread/qthreadstorage.cpp:122
#7  0x00007f9b0fe87e27 in QThreadStorage<QPcreJitStackPointer*>::hasLocalData (this=<optimized out>) at ../../include/QtCore/../../src/corelib/thread/qthreadstorage.h:141
#8  qtPcreCallback () at tools/qregularexpression.cpp:1094
#9  0x00007f9b0d6f9aec in pcre2_jit_match_16 () from /usr/x86_64-pc-linux-gnu/lib/libpcre2-16.so.0
#10 0x00007f9b0d6fd7c7 in pcre2_match_16 () from /usr/x86_64-pc-linux-gnu/lib/libpcre2-16.so.0
#11 0x00007f9b0fe87fb8 in safe_pcre2_match_16 (code=0x557a23a10740, subject=0x557a2350c318, length=30, startOffset=0, options=0, matchData=0x557a23eceea0, matchContext=0x557a24c2e580) at tools/qregularexpression.cpp:1173
#12 0x00007f9b0fe8b5aa in QRegularExpressionPrivate::doMatch (this=0x557a24cd2890, subject=..., subjectStart=0, subjectLength=30, offset=0, matchType=<optimized out>, matchOptions=..., checkSubjectStringOption=QRegularExpressionPrivate::CheckSubjectString, previous=0x0) at tools/qregularexpression.cpp:1273
#13 0x00007f9b0fe8b9dc in QRegularExpression::match (this=this@entry=0x7ffc4dc49430, subject=..., offset=offset@entry=0, matchType=matchType@entry=QRegularExpression::NormalMatch, matchOptions=matchOptions@entry=...) at ../../include/QtCore/../../src/corelib/tools/qstring.h:932
#14 0x00007f9b0e7d0535 in QDomDocumentPrivate::saveDocument (this=0x557a1d6d1870, s=..., indent=1, encUsed=<optimized out>) at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#15 0x00007f9b0e7d4c34 in QDomDocument::toString (this=0x7ffc4dc49520, indent=1) at dom/qdom.cpp:6840
#16 0x00007f9b0f1d3c27 in KoResourceTagStore::writeXMLFile(QString const&) () from /usr/x86_64-pc-linux-gnu/lib/libkritawidgets.so.18
#17 0x00007f9b0f1d40f4 in KoResourceTagStore::serializeTags() () from /usr/x86_64-pc-linux-gnu/lib/libkritawidgets.so.18
#18 0x00007f9b0f1d422e in KoResourceTagStore::~KoResourceTagStore() () from /usr/x86_64-pc-linux-gnu/lib/libkritawidgets.so.18
#19 0x00007f9b1223f898 in KoResourceServer<KisResourceBundle, PointerStoragePolicy<KisResourceBundle> >::~KoResourceServer() () from /usr/x86_64-pc-linux-gnu/lib/libkritaui.so.18
#20 0x00007f9b1223fbb3 in KoResourceServerSimpleConstruction<KisResourceBundle, PointerStoragePolicy<KisResourceBundle> >::~KoResourceServerSimpleConstruction() () from /usr/x86_64-pc-linux-gnu/lib/libkritaui.so.18
#21 0x00007f9b1223e4d1 in KisResourceBundleServerProvider::~KisResourceBundleServerProvider() () from /usr/x86_64-pc-linux-gnu/lib/libkritaui.so.18
#22 0x00007f9b1223e4e9 in (anonymous namespace)::Q_QGS_s_instance::innerFunction()::Holder::~Holder() () from /usr/x86_64-pc-linux-gnu/lib/libkritaui.so.18
#23 0x00007f9b0f9955cc in __run_exit_handlers () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#24 0x00007f9b0f99570e in exit () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#25 0x00007f9b0f97f67a in __libc_start_main () from /usr/x86_64-pc-linux-gnu/lib/libc.so.6
#26 0x0000557a180625ce in _start ()
[Inferior 1 (process 17363) detached]
Comment 1 Halla Rempt 2019-05-28 20:45:35 UTC
Which linux distribution and which version of Qt is this?
Comment 2 Heiko Becker 2019-05-28 20:47:18 UTC
(In reply to Boudewijn Rempt from comment #1)
> Which linux distribution and which version of Qt is this?

Exherbo Linux and as mentioned above Qt 5.12.3.
Comment 3 Halla Rempt 2019-05-28 20:48:31 UTC
Okay, fixed the platform. Does the appimage also crash for you?
Comment 4 Heiko Becker 2019-05-28 20:56:12 UTC
Doesn't seem so, it only throws some python error at me:

[cut away similar messages]
NOT COOL: Duplicated action name from xml data:  "execute_script_9"
NOT COOL: Duplicated action name from xml data:  "execute_script_10"
NOT COOL: Duplicated action name from xml data:  "krita_filter_threshold"
krita.lib.widgets: The file could not be parsed.
QObject::startTimer: Timers cannot have negative intervals
/tmp/.mount_krita-IILTfz/usr/lib/krita-python-libs/krita added to PYTHONPATH
Exception ignored in: <module 'threading' from '/tmp/.mount_krita-IILTfz/usr/lib/python3.5/threading.py'>
Traceback (most recent call last):
  File "/tmp/.mount_krita-IILTfz/usr/lib/python3.5/threading.py", line 1283, in _shutdown
    assert tlock.locked()
SystemError: <built-in method locked of _thread.lock object at 0x7f1b0f65b990> returned a result with an error set
Comment 5 Halla Rempt 2019-05-29 07:08:46 UTC
That's pretty weird, I'm wondering if you've got some debug version of pthreads installed or something like that, since both asserts happen in threading code that we didn't even write ourselves.
Comment 6 Halla Rempt 2019-07-19 08:30:16 UTC
Does this still happen with 4.2.3 and your distribution packages and the appimage?
Comment 7 Heiko Becker 2019-07-19 10:05:14 UTC
No, doesn't happen anymore with the packages. Didn't test the appimage.
Comment 8 Halla Rempt 2019-07-19 10:49:05 UTC
Thanks for checking!