Summary: | Krita crashes on exit when saving tags in Qt's pcre code | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Raghavendra kamath <raghu> |
Component: | Tagging | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bennycaguilera, frutidoody, gianluca.pettinello, griffinvalley, halla, kristopher.ives, noelboettcher2004 |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kde/krita/commit/132c646e1eead9ca1f541abe54c78b2564534050 | Version Fixed In: |
Description
Raghavendra kamath
2019-08-13 06:33:36 UTC
Do you have any special tags you created yourself? This happens deep inside Qt and the pcre regular expression matching engine. No I don't have any tags in brush presets other than the default ones, I don't have any tags other than all in brush tips, pattern or other resources Since all of this is happening in Qt, I'm wondering whether this is a bug in Qt 5.13, which I don't have on any system yet. *** Bug 411694 has been marked as a duplicate of this bug. *** *** Bug 411833 has been marked as a duplicate of this bug. *** I am going to set this to confirmed, despite the source being mysterious still. This likely happens because Krita saves the tag file in a thread other than the application thread: (gdb) bt #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff284a801 in __GI_abort () at abort.c:79 #2 0x00007ffff3222c8b in qt_message_fatal (context=..., message=<synthetic pointer>...) at global/qlogging.cpp:1907 #3 QMessageLogger::fatal (this=this@entry=0x7fffffffd410, msg=msg@entry=0x7ffff3515c80 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:888 #4 0x00007ffff3222481 in qt_assert ( assertion=assertion@entry=0x7ffff0f6bd68 "qApp && qApp->thread() == QThread::currentThread()", file=file@entry=0x7ffff0f6bc50 "/home/boud/dev/krita/libs/widgets/KoResourceTagStore.cpp", line=line@entry=296) at global/qglobal.cpp:3261 #5 0x00007ffff0ea2db0 in KoResourceTagStore::writeXMLFile (this=0x55555b2b6e70, tagstore=...) at /home/boud/dev/krita/libs/widgets/KoResourceTagStore.cpp:296 #6 0x00007ffff0edafe9 in KoResourceTagStore::serializeTags() () at /usr/include/x86_64-linux-gnu/qt5/QtCore/qstringbuilder.h:313 #7 0x00007ffff0edb1ae in KoResourceTagStore::~KoResourceTagStore (this=0x55555b2b6e70, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/widgets/KoResourceTagStore.cpp:61 #8 0x00007ffff69cea74 in KoResourceServer<KisResourceBundle, PointerStoragePolicy<KisResourceBundle> >::~KoResourceServer (this=this@entry=0x55555b2a2520, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/widgets/KoResourceServer.h:146 #9 0x00007ffff69cef13 in KoResourceServerSimpleConstruction<KisResourceBundle, PointerStoragePolicy<KisResourceBundle> >::~KoResourceServerSimpleConstruction (this=0x55555b2a2520, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/widgets/KoResourceServer.h:746 #10 KoResourceServerSimpleConstruction<KisResourceBundle, PointerStoragePolicy<KisResourceBundle> >::~KoResourceServerSimpleConstruction (this=0x55555b2a2520, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/widgets/KoResourceServer.h:746 #11 0x00007ffff69cd301 in KisResourceBundleServerProvider::~KisResourceBundleServerProvider ( this=0x7ffff7dc7940 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/ui/KisResourceBundleServerProvider.cpp:56 #12 0x00007ffff69cd319 in (anonymous namespace)::Q_QGS_s_instance::Holder::~Holder (this=<optimized out>, __in_chrg=<optimized out>) at /home/boud/dev/krita/libs/ui/KisResourceBundleServerProvider.cpp:38 #13 0x00007ffff284d041 in __run_exit_handlers (status=0, listp=0x7ffff2bf5718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108 #14 0x00007ffff284d13a in __GI_exit (status=<optimized out>) at exit.c:139 #15 0x00007ffff282bb9e in __libc_start_main (main=0x555555e4c470 <main>, argc=1, argv=0x7fffffffd898, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd888) at ../csu/libc-start.c:344 #16 0x0000555555e4eb6a in _start () at /home/boud/dev/krita/krita/main.cc:451 Git commit ca07d42ca64271689f1a1ea2219b4909bd97f7c1 by Boudewijn Rempt. Committed on 02/10/2019 at 10:48. Pushed by rempt into branch 'master'. Work around a crash in Qt when converting a QDomDocument to a string In Qt 5.14, if that is done in a thread which is not the gui thread, QRegularExpression won't have a QThreadStorage and will crash. It is weird, though, that Qt's exit handlers clear static variables in non-gui threads. I'm not sure what changed in Qt: the exit handler or QRegularExpression. Since we save the tags on every change, the saving on exit isn't strictly needed, so we can remove that to work around this issue in Qt. M +3 -2 libs/widgets/KoResourceTagStore.cpp https://invent.kde.org/kde/krita/commit/ca07d42ca64271689f1a1ea2219b4909bd97f7c1 It might even be coincidence in Q_GLOBAL_STATIC(QThreadStorage<QPcreJitStackPointer *>, jitStacks) being destroyed now before KoResourceTagStore. *** Bug 414584 has been marked as a duplicate of this bug. *** Git commit 132c646e1eead9ca1f541abe54c78b2564534050 by Boudewijn Rempt. Committed on 04/12/2019 at 12:54. Pushed by rempt into branch 'krita/4.2'. Work around a crash in Qt when converting a QDomDocument to a string In Qt 5.14, if that is done in a thread which is not the gui thread, QRegularExpression won't have a QThreadStorage and will crash. It is weird, though, that Qt's exit handlers clear static variables in non-gui threads. I'm not sure what changed in Qt: the exit handler or QRegularExpression. Since we save the tags on every change, the saving on exit isn't strictly needed, so we can remove that to work around this issue in Qt. M +3 -2 libs/widgets/KoResourceTagStore.cpp https://invent.kde.org/kde/krita/commit/132c646e1eead9ca1f541abe54c78b2564534050 *** Bug 415996 has been marked as a duplicate of this bug. *** *** Bug 409908 has been marked as a duplicate of this bug. *** *** Bug 422510 has been marked as a duplicate of this bug. *** |