Recent kdelibs (r998008) here, on each exit of KDevelop I get a crash from the spell-checking stuff. Backtrace: #0 QHash<str_enchant_dict*, int>::duplicateNode (node=0x7000018, newNode=0xbc89940) at /usr/local/include/QtCore/qhash.h:214 #1 0xf6bc6673 in QHashData::detach_helper (this=0xbe22758, node_duplicate=0xe57d04f0 <QHash<str_enchant_dict*, int>::duplicateNode(QHashData::Node*, void*)>, nodeSize=16) at /home/andreas/src/kde-qt/src/corelib/tools/qhash.cpp:207 #2 0xe57cf782 in QSpellEnchantClient::removeDictRef (this=0xb2fc6f0, dict=0xd40fa00) at /usr/local/include/QtCore/qhash.h:565 #3 0xe57ce214 in ~QSpellEnchantDict (this=0xd414850, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/sonnet/plugins/enchant/enchantdict.cpp:45 #4 0xf7dfd3a1 in ~Speller (this=0xcc36df4, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kdecore/sonnet/speller.cpp:42 #5 0xf7e01a7c in ~BackgroundEngine (this=0xcc36de8, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kdecore/sonnet/backgroundengine.cpp:40 #6 0xf6cc4d5a in QObjectPrivate::deleteChildren (this=0xd411210) at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:1846 #7 0xf6ccda1a in ~QObject (this=0xb896e30, __in_chrg=<value optimized out>) at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:836 #8 0xf7e00f9c in ~BackgroundChecker (this=0xb896e30, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kdecore/sonnet/backgroundchecker.cpp:65 #9 0xf6cc4d5a in QObjectPrivate::deleteChildren (this=0xd415250) at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:1846 #10 0xf6ccda1a in ~QObject (this=0xd411be8, __in_chrg=<value optimized out>) at /home/andreas/src/kde-qt/src/corelib/kernel/qobject.cpp:836 #11 0xe5956160 in ~KateOnTheFlyChecker (this=0xd411be8, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kate/spellcheck/ontheflycheck.cpp:70 #12 0xe59597f1 in ~KateSpellCheckManager (this=0xb35bbc0, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kate/spellcheck/spellcheck.cpp:51 #13 0xe599ef07 in ~KateGlobal (this=0xbfa75c0, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kate/utils/kateglobal.cpp:205 #14 0xe5971b30 in ~KateFactory (this=0xb5d36c0, __in_chrg=<value optimized out>) at /home/andreas/src/kdelibs/kate/utils/kateglobal.h:170 #15 0xf6cd14b3 in QObjectCleanupHandler::clear (this=0x9f430c8) at /home/andreas/src/kde-qt/src/corelib/kernel/qobjectcleanuphandler.cpp:140 #16 0xf6cd1647 in ~QObjectCleanupHandler (this=0x9f430c8, __in_chrg=<value optimized out>) at /home/andreas/src/kde-qt/src/corelib/kernel/qobjectcleanuphandler.cpp:86 #17 0xf7ea09c5 in destroy () at /home/andreas/src/kdelibs/kdecore/util/kpluginfactory.cpp:29 #18 0xf7d432bb in ~KCleanUpGlobalStatic (this=0xf7ef2e14, __in_chrg=<value optimized out>) ---Type <return> to continue, or q <return> to quit--- at /home/andreas/src/kdelibs/kdecore/kernel/kglobal.h:62 #19 0xf5c960e9 in exit () from /lib/libc.so.6 #20 0xf5c7d77d in __libc_start_main () from /lib/libc.so.6 #21 0x0804bd51 in _start () at ../sysdeps/i386/elf/start.S:119
With revision 998207 of kdelibs/kdevplatform/kdevelop and with one open .cpp file, I cannot reproduce the crash. KDevelop doesn't terminate properly, though. I get a constant stream of kdevelop(29166)/kdevelop (cpp support) UIBlockTester::lockup: ui is blocking
Still reproduceable here with kdelibs r998175. I also get a warning about 1 dictionary not being free'd during shutdown. I've had 2 projects opened and parsed by kdevelop and one file open from one of the projects.
Ok, I've installed enchant and now I get the warning, but still no crash. Anyway, this looks like a Sonnet issue to me. Does it also crash for you in Kate/KWrite?
No, kate doesn't crash. I'm wondering wether the problem is order of cleanup of global statics... KDevelop has a couple more than kate I'm guessing. Still very annoying, is there a way to disable the spellchecker, code-wise? As I won't be diving into the sonnet code, we might have to disable creation of the on-the-fly-spellchecker in kdevelop if nobody else can fix this.
Once I disable the CPP language support, termination doesn't block anymore and I get the crash as well. I've just committed a fix which ensures that no Sonnet-related object is created as long as no spell checking is taking place. This should help until the real problem is fixed. I'll try and see what I can do about it.
(In reply to comment #5) > Once I disable the CPP language support, termination doesn't block anymore and > I get the crash as well. Hmm, that shouldn't be needed of course... > I've just committed a fix which ensures that no Sonnet-related object is > created as long as no spell checking is taking place. This should help until > the real problem is fixed. I'll try and see what I can do about it. Thanks a lot, I'll re-assign this to sonnet then.
In revision 1002673 I've now changed the way how Sonnet::Speller objects are handled. More specifically, they are destroyed whenever documents are deleted. It seems that this fixes the problems with KDevelop.
*** Bug 200250 has been marked as a duplicate of this bug. ***
Thank you for the report, Andreas. As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Lets assume this has been fixed, it appears I did not retest the last fix 11 years ago but I wouldn't be able to retest this these days anymore anyway.