Bug 228789 - Crash related to using the spell check dialog in KatePart due to an empty string (reported against Kile)
Summary: Crash related to using the spell check dialog in KatePart due to an empty str...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: SVN
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-27 18:31 UTC by Luis Silva
Modified: 2010-03-14 11:12 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (6.13 KB, text/plain)
2010-03-04 07:30 UTC, Swarnendu Biswas
Details
New crash information added by DrKonqi (6.10 KB, text/plain)
2010-03-05 06:45 UTC, Swarnendu Biswas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Silva 2010-02-27 18:31:01 UTC
Application: kile (2.0.83)
KDE Platform Version: 4.4.00 (KDE 4.4.0)
Qt Version: 4.6.1
Operating System: Linux 2.6.31-20-generic i686
Distribution: Ubuntu 9.10

-- Information about the crash:
Kile crashes when I try to enter a new reference to a previous chapter. This behavior is new as other references in the text seem to not bother the program. Right now, on this document, simply entering \ref{ makes kile crash and burn.

The crash can be reproduced some of the time.

 -- Backtrace:
Application: Kile (kile), signal: Aborted
[Current thread is 1 (Thread 0xb77bea80 (LWP 30591))]

Thread 2 (Thread 0xb5ffab70 (LWP 30592)):
#0  0x008bf422 in __kernel_vsyscall ()
#1  0x0094be15 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0x0687887d in __pthread_cond_wait (cond=0x5ee28c, mutex=0x5ee274) at forward.c:139
#3  0x00510887 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x5e91a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#4  0x005108d1 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x5e91a0) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#5  0x0094780e in start_thread (arg=0xb5ffab70) at pthread_create.c:300
#6  0x0686b8de in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb77bea80 (LWP 30591)):
[KCrash Handler]
#6  0x008bf422 in __kernel_vsyscall ()
#7  0x067c94d1 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0x067cc932 in *__GI_abort () at abort.c:92
#9  0x0131e4df in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#10 0x0131c415 in ?? () from /usr/lib/libstdc++.so.6
#11 0x0131c452 in std::terminate() () from /usr/lib/libstdc++.so.6
#12 0x0131c591 in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0x02660ae5 in qBadAlloc () at global/qglobal.cpp:2004
#14 0x026c27a0 in QTextBoundaryFinder::operator= (this=0xb28a538, other=...) at tools/qtextboundaryfinder.cpp:200
#15 0x04d002a5 in Sonnet::Filter::setBuffer (this=0xb28a530, buffer=...) at ../../kdecore/sonnet/filter.cpp:83
#16 0x04d037e7 in Sonnet::BackgroundEngine::setText (this=0xb7d41e8, text=...) at ../../kdecore/sonnet/backgroundengine.cpp:49
#17 0x04d02b93 in Sonnet::BackgroundChecker::setText (this=0xb7d3e30, text=...) at ../../kdecore/sonnet/backgroundchecker.cpp:70
#18 0x015bbbb4 in KateOnTheFlyChecker::performSpellCheck (this=0xbc8c5d8) at ../../kate/spellcheck/ontheflycheck.cpp:458
#19 0x015bedd0 in KateOnTheFlyChecker::qt_metacall (this=0xbc8c5d8, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbfb269cc) at ./ontheflycheck.moc:121
#20 0x02771f6a in QMetaObject::metacall (object=0xbc8c5d8, cl=30591, idx=11, argv=0xbfb269cc) at kernel/qmetaobject.cpp:237
#21 0x02780705 in QMetaObject::activate (sender=0xbc1d948, m=0x2880188, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3275
#22 0x02788217 in QSingleShotTimer::timeout (this=0xbc1d948) at .moc/release-shared/qtimer.moc:82
#23 0x0278832c in QSingleShotTimer::timerEvent (this=0xbc1d948) at kernel/qtimer.cpp:308
#24 0x0277d5a4 in QObject::event (this=0xbc1d948, e=0x6) at kernel/qobject.cpp:1212
#25 0x053f227c in QApplicationPrivate::notify_helper (this=0x9c80be8, receiver=0xbc1d948, e=0xbfb26f00) at kernel/qapplication.cpp:4298
#26 0x053f8ede in QApplication::notify (this=0xbfb27270, receiver=0xbc1d948, e=0xbfb26f00) at kernel/qapplication.cpp:3702
#27 0x01d381fa in KApplication::notify (this=0xbfb27270, receiver=0xbc1d948, event=0xbfb26f00) at ../../kdeui/kernel/kapplication.cpp:302
#28 0x0276ccfb in QCoreApplication::notifyInternal (this=0xbfb27270, receiver=0xbc1d948, event=0xbfb26f00) at kernel/qcoreapplication.cpp:704
#29 0x0279bf96 in QCoreApplication::sendEvent (this=0x9c83b34) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#30 QTimerInfoList::activateTimers (this=0x9c83b34) at kernel/qeventdispatcher_unix.cpp:603
#31 0x02798c27 in timerSourceDispatch (source=0x9c836b0) at kernel/qeventdispatcher_glib.cpp:184
#32 idleTimerSourceDispatch (source=0x9c836b0) at kernel/qeventdispatcher_glib.cpp:231
#33 0x0905ee88 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#34 0x09062730 in ?? () from /lib/libglib-2.0.so.0
#35 0x09062863 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#36 0x027988e5 in QEventDispatcherGlib::processEvents (this=0x9c63cf0, flags=...) at kernel/qeventdispatcher_glib.cpp:412
#37 0x054b1485 in QGuiEventDispatcherGlib::processEvents (this=0x9c63cf0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#38 0x0276b319 in QEventLoop::processEvents (this=0xbfb271c4, flags=) at kernel/qeventloop.cpp:149
#39 0x0276b76a in QEventLoop::exec (this=0xbfb271c4, flags=...) at kernel/qeventloop.cpp:201
#40 0x0276f95f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#41 0x053f2317 in QApplication::exec () at kernel/qapplication.cpp:3577
#42 0x081ee3f3 in _start ()

Reported using DrKonqi
Comment 1 Michel Ludwig 2010-02-27 19:36:14 UTC
Does your document contain double primes ('') inside math mode somewhere?
Comment 2 Luis Silva 2010-02-27 23:39:15 UTC
Not that I can find, no. But the crash doesn't happen if I disable the automatic spell-check. After creating the reference I can enable it again and everything seems to work fine. Creating new refs seems to work normally now.
Comment 3 Michel Ludwig 2010-02-28 21:03:48 UTC
Can you try to create a small test case (by removing text from document) and then post it here?
Comment 4 Swarnendu Biswas 2010-03-04 07:30:15 UTC
Created attachment 41314 [details]
New crash information added by DrKonqi

Whenever I was trying to check spelling from the cursor, kile was crashing. This was getting reproduced several times.
Comment 5 Michel Ludwig 2010-03-04 15:03:36 UTC
(In reply to comment #4)
> Whenever I was trying to check spelling from the cursor, kile was crashing.
> This was getting reproduced several times.

Could you maybe provide a small test case so that I can reproduce the problem? Thanks.
Comment 6 Swarnendu Biswas 2010-03-05 06:42:47 UTC
Hi,

Seeing your comment, I have tried to reproduce the test myself several times. I was able to reproduce the crash some of the times. What I did was this:

1. Opened a latex document, and selected the option "Define current document as master document".
2. Then I moved the cursor to the position after the preamble in the document.
3. I selected the option "Spell check from cursor".
4. Kile crashes mostly immediately after this step. However, in some cases, Kile did work properly.
5. Note that Kile was crashing even when I did not check the option "Define current document as master document".

As I am not very sure whether this crash is any way related to the issue with references, therefore, just to avoid creating new bugs, I reported the logs with bug 228789 only. I have also submitted another crash report, hope it helps.
Comment 7 Swarnendu Biswas 2010-03-05 06:45:33 UTC
Created attachment 41341 [details]
New crash information added by DrKonqi

My kile version is 2.0.84, beta 3, and I have kde 4.4.1 installed on ubuntu karmic.
Comment 8 Michel Ludwig 2010-03-05 19:05:57 UTC
(In reply to comment #6)
> Seeing your comment, I have tried to reproduce the test myself several times. I
> was able to reproduce the crash some of the times. What I did was this:

Sorry, but this didn't work here, i.e. it didn't cause a crash. I think that the contents of the document also matter for this issue.

Can you maybe try to create a small document which triggers the crash for you?
Comment 9 Michel Ludwig 2010-03-13 21:58:13 UTC
(In reply to comment #2)
> Not that I can find, no. But the crash doesn't happen if I disable the
> automatic spell-check. After creating the reference I can enable it again and
> everything seems to work fine. Creating new refs seems to work normally now.

The issue that you describe has already been fixed in KDE 4.4.1 (bug 225867).
However, the problem reported in comment #4 seems to be a different one.
Comment 10 Michel Ludwig 2010-03-14 11:12:40 UTC
The problem reported in comment #4 has now been rectified in revision 1103086. 

The fix will be included in kdelibs 4.4.2.