Bug 225867 - Kate crashes while spell-checking
Summary: Kate crashes while spell-checking
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 225361 230055 231453 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-07 23:41 UTC by Oleksandr Senkovych
Modified: 2010-03-21 11:27 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Problem document (23.74 KB, application/x-tex)
2010-02-07 23:43 UTC, Oleksandr Senkovych
Details
Don't spell check an empty string. (1.74 KB, patch)
2010-02-09 14:20 UTC, Michel Ludwig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleksandr Senkovych 2010-02-07 23:41:53 UTC
Application: kate (3.3.98)
KDE Platform Version: 4.3.98 (KDE 4.3.98 (KDE 4.4 RC3))
Qt Version: 4.6.1
Operating System: Linux 2.6.32-pf1-bj i686
Distribution: Ubuntu 9.10

-- Information about the crash:
Kate crashes when it tries to check spelling in this file

Steps to reproduce:
1) Open kate
2) Turn on spelling highlight
3) Scroll down to the bottom of the document
4) Whatch as kate crashes

The crash can be reproduced every time.

 -- Backtrace:
Application: Kate (kdeinit4), signal: Aborted
[Current thread is 1 (Thread 0xb780ea50 (LWP 17670))]

Thread 3 (Thread 0xb5edbb70 (LWP 17678)):
#0  0x00ead416 in __kernel_vsyscall ()
#1  0x4e9e7f55 in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:122
#2  0x02174ef7 in ?? () from /usr/lib/libQtScript.so.4
#3  0x02174f41 in ?? () from /usr/lib/libQtScript.so.4
#4  0x4e9e38de in start_thread (arg=<value optimized out>) at pthread_create.c:300
#5  0x4e92795e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb4fbeb70 (LWP 17707)):
#0  0x4ea13e16 in *__GI_clock_gettime (clock_id=<value optimized out>, tp=<value optimized out>) at ../sysdeps/unix/clock_gettime.c:100
#1  0x005214db in ?? () from /usr/lib/libQtCore.so.4
#2  0x00526605 in ?? () from /usr/lib/libQtCore.so.4
#3  0x0052664a in ?? () from /usr/lib/libQtCore.so.4
#4  0x005245f8 in ?? () from /usr/lib/libQtCore.so.4
#5  0x00524685 in ?? () from /usr/lib/libQtCore.so.4
#6  0x4ea8ae3a in IA__g_main_context_prepare (context=<value optimized out>, priority=<value optimized out>) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2280
#7  0x4ea8b259 in g_main_context_iterate (context=<value optimized out>, block=<value optimized out>, dispatch=<value optimized out>, self=) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2571
#8  0x4ea8b818 in IA__g_main_context_iteration (context=<value optimized out>, may_block=<value optimized out>) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2654
#9  0x005243ef in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#10 0x004f6e29 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#11 0x004f727a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#12 0x003f3568 in QThread::exec() () from /usr/lib/libQtCore.so.4
#13 0x004d6afb in ?? () from /usr/lib/libQtCore.so.4
#14 0x003f62ee in ?? () from /usr/lib/libQtCore.so.4
#15 0x4e9e38de in start_thread (arg=<value optimized out>) at pthread_create.c:300
#16 0x4e92795e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb780ea50 (LWP 17670)):
[KCrash Handler]
#6  0x00ead416 in __kernel_vsyscall ()
#7  0x4e8845e1 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#8  0x4e887a42 in *__GI_abort () at abort.c:92
#9  0x4edba7bf in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
#10 0x4edb86f5 in ?? () from /usr/lib/libstdc++.so.6
#11 0x4edb8732 in std::terminate() () from /usr/lib/libstdc++.so.6
#12 0x4edb8871 in __cxa_throw () from /usr/lib/libstdc++.so.6
#13 0x003ecaa5 in qBadAlloc() () from /usr/lib/libQtCore.so.4
#14 0x0044e6d0 in QTextBoundaryFinder::operator=(QTextBoundaryFinder const&) () from /usr/lib/libQtCore.so.4
#15 0x009ab855 in Sonnet::Filter::setBuffer (this=0xa362f28, buffer=...) at ../../kdecore/sonnet/filter.cpp:83
#16 0x009aed97 in Sonnet::BackgroundEngine::setText (this=0xa362db8, text=...) at ../../kdecore/sonnet/backgroundengine.cpp:49
#17 0x009ae143 in Sonnet::BackgroundChecker::setText (this=0xa362f58, text=...) at ../../kdecore/sonnet/backgroundchecker.cpp:70
#18 0x01bc4154 in KateOnTheFlyChecker::performSpellCheck (this=0x9b6ff38) at ../../kate/spellcheck/ontheflycheck.cpp:458
#19 0x01bc7380 in KateOnTheFlyChecker::qt_metacall (this=0x9b6ff38, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0xbf95c20c) at ./ontheflycheck.moc:121
#20 0x004fda6a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#21 0x0050c1f5 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#22 0x00513ce7 in ?? () from /usr/lib/libQtCore.so.4
#23 0x00513dfc in ?? () from /usr/lib/libQtCore.so.4
#24 0x00509094 in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#25 0x00fe32dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#26 0x00fe9f2e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#27 0x00c9248a in KApplication::notify (this=0xbf95caf4, receiver=0xa37ec58, event=0xbf95c740) at ../../kdeui/kernel/kapplication.cpp:302
#28 0x004f880b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#29 0x00527b36 in ?? () from /usr/lib/libQtCore.so.4
#30 0x005246f7 in ?? () from /usr/lib/libQtCore.so.4
#31 0x4ea87955 in g_main_dispatch (context=<value optimized out>) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:1960
#32 IA__g_main_context_dispatch (context=<value optimized out>) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2513
#33 0x4ea8b658 in g_main_context_iterate (context=<value optimized out>, block=<value optimized out>, dispatch=<value optimized out>, self=) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2591
#34 0x4ea8b818 in IA__g_main_context_iteration (context=<value optimized out>, may_block=<value optimized out>) at /build/buildd/glib2.0-2.23.2/glib/gmain.c:2654
#35 0x005243b5 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#36 0x010a23f5 in ?? () from /usr/lib/libQtGui.so.4
#37 0x004f6e29 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#38 0x004f727a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#39 0x004fb46f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#40 0x00fe3377 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#41 0x06380a25 in kdemain (argc=2, argv=0x90cf8f0) at ../../../kate/app/katemain.cpp:377
#42 0x0804dff7 in launch (argc=<value optimized out>, _name=<value optimized out>, args=<value optimized out>, cwd=0x0, envc=1, envs=0x90cfc11 "DISPLAY=:0.0", reset_env=false, tty=0x0, 
    avoid_loops=false, startup_id_str=0x90cfc22 "bj;1265582100;846939;18699_TIME49784839") at ../../kinit/kinit.cpp:717
#43 0x0804ec15 in handle_launcher_request (sock=<value optimized out>, who=<value optimized out>) at ../../kinit/kinit.cpp:1209
#44 0x0804f153 in handle_requests (waitForPid=<value optimized out>) at ../../kinit/kinit.cpp:1402
#45 0x0804fe3f in main (argc=4, argv=0xbf95da44, envp=0xbf95da58) at ../../kinit/kinit.cpp:1841
The current source language is "auto; currently c".

Reported using DrKonqi
Comment 1 Oleksandr Senkovych 2010-02-07 23:43:11 UTC
Created attachment 40597 [details]
Problem document
Comment 2 Milian Wolff 2010-02-08 13:12:31 UTC
I can reproduce it at will. The CLI shows me:

Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

I fear this is a Sonnet or even Qt bug, but I'm not sure...
Comment 3 Michel Ludwig 2010-02-08 19:17:24 UTC
I've narrowed the test case down to

$A'' \test$

and it only crashes if LaTeX highlighting is enabled.

I think I know where the problem could be...
Comment 4 Michel Ludwig 2010-02-09 14:20:35 UTC
Created attachment 40616 [details]
Don't spell check an empty string.

This patch fixes the problems for me.

Can someone please confirm? Thanks.
Comment 5 Michel Ludwig 2010-02-10 10:36:51 UTC
Fixed in revision 1088130.
Comment 6 Michel Ludwig 2010-02-10 11:05:22 UTC
*** Bug 225361 has been marked as a duplicate of this bug. ***
Comment 7 Michel Ludwig 2010-03-13 21:44:53 UTC
*** Bug 230055 has been marked as a duplicate of this bug. ***
Comment 8 Michel Ludwig 2010-03-21 11:27:32 UTC
*** Bug 231453 has been marked as a duplicate of this bug. ***