Bug 169986 - spell check causes crashes in KTextEdit
Summary: spell check causes crashes in KTextEdit
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kdecore (show other bugs)
Version: 4.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 167865 171833 172524 175229 195957 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-28 16:31 UTC by Maarten Storm
Modified: 2009-06-11 02:30 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
This is the debugger output (10.59 KB, text/plain)
2008-12-07 11:00 UTC, Shahar Or
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maarten Storm 2008-08-28 16:31:20 UTC
Version:            (using KDE 4.1.1)
OS:                Linux
Installed from:    Unlisted Binary Package

When spellchecking in composer window kmail crashes. Kmail also crashes when sending the message, probably because of automated spell checking (can i turn it off?)

Here is the backtrace:

Programma: KMail (kmail), signaal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb4571700 (LWP 4053)]
[KCrash handler]
#6  0xb4e1d385 in free () from /lib/libc.so.6
#7  0xb12275bd in delete_dict_radix ()
   from /usr/lib/enchant/libenchant_hspell.so
#8  0xb1224f81 in hspell_uninit () from /usr/lib/enchant/libenchant_hspell.so
#9  0xb12696cc in ~HSpellDict (this=0x96f9d40)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/sonnet/plugins/hspell/kspell_hspelldict.cpp:43
#10 0xb6060ea0 in ~Speller (this=0x1)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdecore/sonnet/speller.cpp:37
#11 0xb636462b in Sonnet::Dialog::initGui (this=0x96bfda8)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/sonnet/dialog.cpp:133
#12 0xb63648bc in Dialog (this=0x96bfda8, checker=0x96dcf80, parent=0x0)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/sonnet/dialog.cpp:75
#13 0xb63f7c0b in KTextEdit::checkSpelling (this=0x95d0dc8)
    at /home/jan/Source/packages/kde41/work/kdelibs/src/kdelibs-4.1.0/kdeui/widgets/ktextedit.cpp:516
#14 0xb72521a4 in KPIM::KMeditor::slotCheckSpelling ()
   from /usr/lib/libkdepim.so.4
#15 0xb7255998 in KPIM::KMeditor::qt_metacall () from /usr/lib/libkdepim.so.4
#16 0xb7bd7419 in KMComposerEditor::qt_metacall (this=0x95d0dc8, 
    _c=QMetaObject::InvokeMetaMethod, _id=134, _a=0xbfa1c03c)
    at /home/jan/Source/packages/kde41/work/kdepim/src/kdepim-4.1.0/kmail/kmcomposereditor.moc:63
#17 0xb5ce68d7 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0xb5ce6bb9 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#19 0xb51a2fe2 in QAction::triggered () from /usr/lib/libQtGui.so.4
#20 0xb51a3868 in QAction::activate () from /usr/lib/libQtGui.so.4
#21 0xb54fe944 in ?? () from /usr/lib/libQtGui.so.4
#22 0x09615e48 in ?? ()
#23 0x00000000 in ?? ()
#0  0xb7f02424 in __kernel_vsyscall ()
Comment 1 Allen Winter 2008-08-29 00:58:43 UTC
Reassigning, looks like a bug in Sonnet
Comment 2 Lamarque V. Souza 2008-09-10 05:30:28 UTC
Hi, Konqueror from KDE 4.1.1 also has this same problem. Running it from konsole gives this log messages:

konqueror(4250) Sonnet::Loader::loadPlugin: Successfully loaded plugin: "kspell_enchant.desktop"
konqueror(4250) Sonnet::Loader::loadPlugin: Successfully loaded plugin: "kspell_aspell.desktop"
Couldn't create speller for "pt_BR" :  The file "/usr/lib64/aspell-0.60/br-abnt2.kbd" can not be opened for reading.
ASSERT: "dict" in file /var/tmp/portage/kde-base/kdelibs-4.1.1/work/kdelibs-4.1.1/kdecore/sonnet/loader.cpp, line 116
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = konqueror path = <unknown> pid = 4250

At line 116 of loader.cpp there is an ASSERT that I think it should not be there:

    QListIterator<Client*> itr(lClients);
    while (itr.hasNext()) {
        Client* item = itr.next();
        if (!pclient.isEmpty()) {
            if (pclient == item->name()) {
                SpellerPlugin *dict = item->createSpeller(plang);
                return dict;
            }
        } else {
            //the first one is the one with the highest
            //reliability
            SpellerPlugin *dict = item->createSpeller(plang);
            Q_ASSERT(dict); <= HERE
            return dict;
        }
    }

As a workaround I created this symbolic link in my system:

ln -s standard.kbd /usr/lib64/aspell-0.60/br-abnt2.kbd

and Konqueror does not crash anymore.
Comment 3 Frank Mulder 2008-09-15 18:51:37 UTC
I have the same problem (kmail crash when sending message).
Comment 4 Maarten Storm 2008-09-15 20:27:46 UTC
*** This bug has been confirmed by popular vote. ***
Comment 5 Thomas McGuire 2008-09-17 18:09:33 UTC
Really reassigning.
Comment 6 Thomas McGuire 2008-10-12 17:52:28 UTC
*** Bug 172524 has been marked as a duplicate of this bug. ***
Comment 7 Thomas McGuire 2008-10-12 17:54:06 UTC
Could also be related to bug 156635.
Comment 8 Jordi Polo 2008-11-14 12:53:52 UTC
Possibly this is solved in trunk, can someone check?
Comment 9 Pino Toscano 2008-11-15 17:00:28 UTC
*** Bug 175229 has been marked as a duplicate of this bug. ***
Comment 10 Christophe Marin 2008-11-15 17:01:09 UTC
*** Bug 171833 has been marked as a duplicate of this bug. ***
Comment 11 Olivier Trichet 2008-11-16 13:41:54 UTC
*** Bug 167865 has been marked as a duplicate of this bug. ***
Comment 12 Shahar Or 2008-12-07 11:00:33 UTC
Created attachment 29110 [details]
This is the debugger output
Comment 13 Dario Andres 2009-05-15 03:57:37 UTC
Any news on this? Can anyone reproduce this bug using a current KDE version ?
Comment 14 Christoph Feck 2009-06-01 02:23:45 UTC
This is fixed by http://websvn.kde.org/?view=rev&revision=884134
Comment 15 Dario Andres 2009-06-11 02:30:14 UTC
*** Bug 195957 has been marked as a duplicate of this bug. ***