Bug 292921 - Kate has some weird crashes related to comments in C
Summary: Kate has some weird crashes related to comments in C
Status: RESOLVED DUPLICATE of bug 294241
Alias: None
Product: kate
Classification: Applications
Component: folding (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-31 02:44 UTC by Alex Lowe
Modified: 2012-02-28 22:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Lowe 2012-01-31 02:44:05 UTC
Application: kate (3.8.0)
KDE Platform Version: 4.8.00 (4.8.0
Qt Version: 4.7.4
Operating System: Linux 3.0.0-15-generic x86_64
Distribution: Ubuntu 11.10

-- Information about the crash:
Sometimes (though not always), Kate will crash when erasing the beginning of a C-style comment.

Example:
start with the following code in a c source file:
/* this is a comment */

Place the cursor after 'comment' (but before the end of the comment itself) and hold backspace until it looks as follows:

/  */

Kate often (but not always) crashes in this state (if C highlighting is on).

The crash can be reproduced some of the time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
[Current thread is 1 (Thread 0x7fd96829e780 (LWP 1539))]

Thread 4 (Thread 0x7fd953cb4700 (LWP 1540)):
#0  __libc_enable_asynccancel () at ../nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S:66
#1  0x00007fd967bfd758 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:85
#2  0x00007fd964d56f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fd964d57429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fd965b12f3e in QEventDispatcherGlib::processEvents (this=0x2ab0580, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#5  0x00007fd965ae6cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fd965ae6ef7 in QEventLoop::exec (this=0x7fd953cb3dd0, flags=...) at kernel/qeventloop.cpp:201
#7  0x00007fd9659fe27f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#8  0x00007fd965ac9cbf in QInotifyFileSystemWatcherEngine::run (this=0x2aaf9e0) at io/qfilesystemwatcher_inotify.cpp:248
#9  0x00007fd965a00d05 in QThreadPrivate::start (arg=0x2aaf9e0) at thread/qthread_unix.cpp:331
#10 0x00007fd965228efc in start_thread (arg=0x7fd953cb4700) at pthread_create.c:304
#11 0x00007fd967c0989d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#12 0x0000000000000000 in ?? ()

Thread 3 (Thread 0x7fd95334f700 (LWP 1541)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007fd956da6fe2 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007fd956da7019 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007fd965228efc in start_thread (arg=0x7fd95334f700) at pthread_create.c:304
#4  0x00007fd967c0989d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7fd95150c700 (LWP 1542)):
#0  0x00007fd967bfd773 in __GI___poll (fds=<optimized out>, nfds=<optimized out>, timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87
#1  0x00007fd964d56f68 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fd964d57429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fd965b12f3e in QEventDispatcherGlib::processEvents (this=0x7fd94c000910, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007fd965ae6cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fd965ae6ef7 in QEventLoop::exec (this=0x7fd95150bdd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007fd9659fe27f in QThread::exec (this=<optimized out>) at thread/qthread.cpp:498
#7  0x00007fd965ac9cbf in QInotifyFileSystemWatcherEngine::run (this=0x2f80290) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007fd965a00d05 in QThreadPrivate::start (arg=0x2f80290) at thread/qthread_unix.cpp:331
#9  0x00007fd965228efc in start_thread (arg=0x7fd95150c700) at pthread_create.c:304
#10 0x00007fd967c0989d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fd96829e780 (LWP 1539)):
[KCrash Handler]
#6  getStartMatching (endNode=0x3356c00, this=0x33b8540) at ../../part/syntax/katecodefolding.cpp:151
#7  KateCodeFoldingTree::getLineDepth (this=<optimized out>, line=<optimized out>, validEndings=<optimized out>) at ../../part/syntax/katecodefolding.cpp:945
#8  0x00007fd95745d22a in KateCodeFoldingTree::getLineDepth (this=0x27aba30, line=196) at ../../part/syntax/katecodefolding.cpp:918
#9  0x00007fd95745d282 in KateCodeFoldingTree::getLineInfo (this=0x27aba30, info=0x7fff3e23c090, line=196) at ../../part/syntax/katecodefolding.cpp:971
#10 0x00007fd95748a8ca in KateIconBorder::paintBorder (this=0x2aa3b70, y=<optimized out>, height=<optimized out>) at ../../part/view/kateviewhelpers.cpp:1194
#11 0x00007fd967094c9c in QWidget::event (this=0x2aa3b70, event=0x7fff3e23c800) at kernel/qwidget.cpp:8441
#12 0x00007fd967044474 in notify_helper (e=0x7fff3e23c800, receiver=0x2aa3b70, this=0x24982a0) at kernel/qapplication.cpp:4486
#13 QApplicationPrivate::notify_helper (this=0x24982a0, receiver=0x2aa3b70, e=0x7fff3e23c800) at kernel/qapplication.cpp:4458
#14 0x00007fd9670492e1 in QApplication::notify (this=0x7fff3e240b40, receiver=0x2aa3b70, e=0x7fff3e23c800) at kernel/qapplication.cpp:4365
#15 0x00007fd9662c6ae6 in KApplication::notify (this=0x7fff3e240b40, receiver=0x2aa3b70, event=0x7fff3e23c800) at ../../kdeui/kernel/kapplication.cpp:311
#16 0x00007fd965ae7afc in QCoreApplication::notifyInternal (this=0x7fff3e240b40, receiver=0x2aa3b70, event=0x7fff3e23c800) at kernel/qcoreapplication.cpp:787
#17 0x00007fd967091bd4 in sendSpontaneousEvent (event=0x7fff3e23c800, receiver=0x2aa3b70) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#18 QWidgetPrivate::drawWidget (this=0x2aa3c50, pdev=0x2c46b80, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5528
#19 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2d13330, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#20 0x00007fd967092690 in QWidgetPrivate::paintSiblingsRecursive (this=0x2d13330, pdev=0x2c46b80, siblings=..., index=1, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5722
#21 0x00007fd967092690 in QWidgetPrivate::paintSiblingsRecursive (this=0x2d13330, pdev=0x2c46b80, siblings=..., index=2, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5722
#22 0x00007fd967092690 in QWidgetPrivate::paintSiblingsRecursive (this=0x2d13330, pdev=0x2c46b80, siblings=..., index=3, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5722
#23 0x00007fd967092690 in QWidgetPrivate::paintSiblingsRecursive (this=0x2d13330, pdev=0x2c46b80, siblings=..., index=4, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5722
#24 0x00007fd967092690 in QWidgetPrivate::paintSiblingsRecursive (this=0x2d13330, pdev=0x2c46b80, siblings=..., index=5, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5722
#25 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2d13330, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#26 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2cecb50, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#27 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2cecb50, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#28 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2832600, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#29 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2832600, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#30 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2832130, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#31 0x00007fd967092690 in QWidgetPrivate::paintSiblingsRecursive (this=0x2832130, pdev=0x2c46b80, siblings=..., index=1, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5722
#32 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2832130, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#33 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x282aa10, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#34 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x282aa10, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#35 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x281ba80, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#36 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x281ba80, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#37 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x281ad50, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#38 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x281ad50, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#39 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2819840, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#40 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2819840, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#41 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2818ed0, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#42 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2818ed0, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#43 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x2817ca0, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#44 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x2817ca0, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#45 0x00007fd9670927b0 in QWidgetPrivate::paintSiblingsRecursive (this=0x280fdc0, pdev=0x2c46b80, siblings=..., index=<optimized out>, rgn=..., offset=..., flags=4, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5735
#46 0x00007fd96709192c in QWidgetPrivate::drawWidget (this=0x280fdc0, pdev=0x2c46b80, rgn=..., offset=..., flags=<optimized out>, sharedPainter=0x0, backingStore=0x2654ea0) at kernel/qwidget.cpp:5581
#47 0x00007fd967255273 in QWidgetBackingStore::sync (this=0x2654ea0) at painting/qbackingstore.cpp:1338
#48 0x00007fd9670883b0 in QWidgetPrivate::syncBackingStore (this=0x280fdc0) at kernel/qwidget.cpp:1862
#49 0x00007fd9670951ac in QWidget::event (this=0x280fc50, event=0x2e3dad0) at kernel/qwidget.cpp:8588
#50 0x00007fd967456dab in QMainWindow::event (this=0x280fc50, event=0x2e3dad0) at widgets/qmainwindow.cpp:1478
#51 0x00007fd9663c2de8 in KXmlGuiWindow::event (this=0x280fc50, ev=0x2e3dad0) at ../../kdeui/xmlgui/kxmlguiwindow.cpp:126
#52 0x00007fd967044474 in notify_helper (e=0x2e3dad0, receiver=0x280fc50, this=0x24982a0) at kernel/qapplication.cpp:4486
#53 QApplicationPrivate::notify_helper (this=0x24982a0, receiver=0x280fc50, e=0x2e3dad0) at kernel/qapplication.cpp:4458
#54 0x00007fd9670492e1 in QApplication::notify (this=0x7fff3e240b40, receiver=0x280fc50, e=0x2e3dad0) at kernel/qapplication.cpp:4365
#55 0x00007fd9662c6ae6 in KApplication::notify (this=0x7fff3e240b40, receiver=0x280fc50, event=0x2e3dad0) at ../../kdeui/kernel/kapplication.cpp:311
#56 0x00007fd965ae7afc in QCoreApplication::notifyInternal (this=0x7fff3e240b40, receiver=0x280fc50, event=0x2e3dad0) at kernel/qcoreapplication.cpp:787
#57 0x00007fd965aeb51f in sendEvent (event=0x2e3dad0, receiver=0x280fc50) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#58 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x24638b0) at kernel/qcoreapplication.cpp:1428
#59 0x00007fd965b12a73 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#60 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:277
#61 0x00007fd964d56a5d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#62 0x00007fd964d57258 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#63 0x00007fd964d57429 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#64 0x00007fd965b12ed6 in QEventDispatcherGlib::processEvents (this=0x2497e70, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#65 0x00007fd9670ec10e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#66 0x00007fd965ae6cf2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#67 0x00007fd965ae6ef7 in QEventLoop::exec (this=0x7fff3e240a80, flags=...) at kernel/qeventloop.cpp:201
#68 0x00007fd965aeb789 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#69 0x00007fd967ecd0d5 in kdemain (argc=<optimized out>, argv=<optimized out>) at ../../../kate/app/katemain.cpp:377
#70 0x00007fd967b4930d in __libc_start_main (main=0x400630 <main(int, char**)>, argc=2, ubp_av=0x7fff3e242078, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff3e242068) at libc-start.c:226
#71 0x0000000000400661 in _start ()

Reported using DrKonqi
Comment 1 Heikki Naski 2012-02-28 17:40:43 UTC
Can't reproduce on a newer version (KDE version is older, tho). I tried several times doing as described and several times after typing in some C code and putting the comment in between it.

Alex, do you have something else in the file which causes this crash or does it occur when you have only the line /* this is a comment */ in a file?

Application: Kate pulled in and compiled from repos just now
KDE Platform Version: 4.6.5 (4.6.5)
Qt Version: 4.7.4
Operating System: 3.2.0-1-amd64
Distribution: Debian Wheezy
Comment 2 Dominik Haumann 2012-02-28 22:06:08 UTC
Known issue: #294241.

*** This bug has been marked as a duplicate of bug 294241 ***