Bug 238239

Summary: crash in SmartRenderRange::advanceTo
Product: [Applications] kate Reporter: Leandro Santiago da Silva <leandrosansilva>
Component: smartAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: christoph
Priority: VHI    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Leandro Santiago da Silva 2010-05-19 22:57:17 UTC
Application: kdevelop (4.0.60 (using KDevPlatform 1.0.60))
KDE Platform Version: 4.4.2 (KDE 4.4.2) (Compiled from sources)
Qt Version: 4.6.2
Operating System: Linux 2.6.31-21-generic x86_64
Distribution: Ubuntu 9.10

-- Information about the crash:
KDevelop crashed when I closed a file tab

I'm using kdevelop and co (php plugin, kdevplataform and kdevelop-pg-qt)  from git (I got them today) with a php and a c++ project opened.

 -- Backtrace:
Application: KDevelop (kdevelop.bin), signal: Segmentation fault
The current source language is "auto; currently c".
[Current thread is 1 (Thread 0x7f46f61a0750 (LWP 22111))]

Thread 6 (Thread 0x7f46e1391910 (LWP 22112)):
#0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:220
#1  0x00007f46f2ab9692 in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x24d18d0, time=200000) at thread/qwaitcondition_unix.cpp:85
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x24d18d0, time=200000) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f46ef702e1e in KDevelop::DUChainPrivate::CleanupThread::run (this=0x24d18b0) at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/language/duchain/duchain.cpp:286
#4  0x00007f46f2ab8775 in QThreadPrivate::start (arg=0x24d18b0) at thread/qthread_unix.cpp:248
#5  0x00007f46f2829a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#6  0x00007f46f0ef780d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#7  0x0000000000000000 in ?? ()

Thread 5 (Thread 0x7f46d5b49910 (LWP 22210)):
#0  *__GI___poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:85
#1  0x00007f46ec3cb37c in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f46ec3cb6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f46f2bd6386 in QEventDispatcherGlib::processEvents (this=0x31847a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:414
#4  0x00007f46f2bab732 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#5  0x00007f46f2babb0c in QEventLoop::exec (this=0x7f46d5b49040, flags=) at kernel/qeventloop.cpp:201
#6  0x00007f46f2ab5d59 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:487
#7  0x00007f46f2ab8775 in QThreadPrivate::start (arg=0x33b2c00) at thread/qthread_unix.cpp:248
#8  0x00007f46f2829a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f46f0ef780d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()
The current source language is "auto; currently asm".

Thread 4 (Thread 0x7f46d634a910 (LWP 22219)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007f46f2ab972b in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x1f0c7b0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:87
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1f0c7b0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f46f4619096 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1f1ab50, th=0x4365f70) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f46f461b74b in ThreadWeaver::WorkingHardState::applyForWork (this=0x1e5dc50, th=0x4365f70) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f46f461b764 in ThreadWeaver::WorkingHardState::applyForWork (this=0x1e5dc50, th=0x4365f70) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74
#6  0x00007f46f4619bff in ThreadWeaver::ThreadRunHelper::run (this=0x7f46d634a050, parent=0x1f1ab50, th=0x4365f70) at ../../../threadweaver/Weaver/Thread.cpp:87
#7  0x00007f46f461a058 in ThreadWeaver::Thread::run (this=0x4365f70) at ../../../threadweaver/Weaver/Thread.cpp:142
#8  0x00007f46f2ab8775 in QThreadPrivate::start (arg=0x4365f70) at thread/qthread_unix.cpp:248
#9  0x00007f46f2829a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#10 0x00007f46f0ef780d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()
The current source language is "auto; currently c".

Thread 3 (Thread 0x7f46cd0ff910 (LWP 22220)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007f46f2ab972b in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x1f0c7b0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:87
#2  QWaitCondition::wait (this=<value optimized out>, mutex=0x1f0c7b0, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:159
#3  0x00007f46f4619096 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x1f1ab50, th=0x4231ac0) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365
#4  0x00007f46f461b74b in ThreadWeaver::WorkingHardState::applyForWork (this=0x1e5dc50, th=0x4231ac0) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71
#5  0x00007f46f4619bff in ThreadWeaver::ThreadRunHelper::run (this=0x7f46cd0ff050, parent=0x1f1ab50, th=0x4231ac0) at ../../../threadweaver/Weaver/Thread.cpp:87
#6  0x00007f46f461a058 in ThreadWeaver::Thread::run (this=0x4231ac0) at ../../../threadweaver/Weaver/Thread.cpp:142
#7  0x00007f46f2ab8775 in QThreadPrivate::start (arg=0x4231ac0) at thread/qthread_unix.cpp:248
#8  0x00007f46f2829a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#9  0x00007f46f0ef780d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#10 0x0000000000000000 in ?? ()
The current source language is "auto; currently asm".

Thread 2 (Thread 0x7f46cc674910 (LWP 22231)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:261
#1  0x00007f46f02c0396 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f46f059e220) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2304
#2  0x00007f46f02c03d9 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f46f05ac2ec) at ../3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1438
#3  0x00007f46f2829a04 in start_thread (arg=<value optimized out>) at pthread_create.c:300
#4  0x00007f46f0ef780d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#5  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f46f61a0750 (LWP 22111)):
[KCrash Handler]
#5  0x00007f46d14bd360 in ?? ()
#6  0x00007f46ce2a7d89 in operator> (ranges=..., pos=...) at ../../interfaces/ktexteditor/cursor.h:272
#7  lowerBound (ranges=..., pos=...) at ../../kate/render/katerenderrange.cpp:93
#8  0x00007f46ce2a7faf in SmartRenderRange::advanceTo (this=0x4b63a40, pos=...) at ../../kate/render/katerenderrange.cpp:178
#9  0x00007f46ce2a6643 in RenderRangeList::advanceTo (this=0x7fff802838e0, pos=...) at ../../kate/render/katerenderrange.cpp:365
#10 0x00007f46ce2a2f39 in KateRenderer::decorationsForLine (this=0x43762b0, textLine=<value optimized out>, line=<value optimized out>, selectionsOnly=<value optimized out>, completionHighlight=0x0, 
    completionSelected=false) at ../../kate/render/katerenderer.cpp:393
#11 0x00007f46ce2a3e43 in KateRenderer::layoutLine (this=0x43762b0, lineLayout=<value optimized out>, maxwidth=-1, cacheLayout=<value optimized out>) at ../../kate/render/katerenderer.cpp:847
#12 0x00007f46ce2aab74 in KateLayoutCache::line (this=0x4377260, realLine=0, virtualLine=<value optimized out>) at ../../kate/render/katelayoutcache.cpp:312
#13 0x00007f46ce2abae9 in KateLayoutCache::updateViewCache (this=0x4377260, startPos=..., newViewLineCount=40, viewLinesScrolled=0) at ../../kate/render/katelayoutcache.cpp:229
#14 0x00007f46ce30e731 in KateViewInternal::doUpdateView (this=0x43766c0, changed=false, viewLinesScrolled=<value optimized out>) at ../../kate/view/kateviewinternal.cpp:597
#15 0x00007f46ce30eed6 in KateViewInternal::updateView (this=0x43766c0, changed=64, viewLinesScrolled=0) at ../../kate/view/kateviewinternal.cpp:573
#16 0x00007f46ce30ff4d in KateViewInternal::showEvent (this=0x7f46d174c940, e=0x7fff80284980) at ../../kate/view/kateviewinternal.cpp:744
#17 0x00007f46f1da112d in QWidget::event (this=0x43766c0, event=0x7fff80284980) at kernel/qwidget.cpp:8205
#18 0x00007f46f1d4b12c in QApplicationPrivate::notify_helper (this=0x13fab50, receiver=0x43766c0, e=0x7fff80284980) at kernel/qapplication.cpp:4300
#19 0x00007f46f1d5171b in QApplication::notify (this=0x7fff802868e0, receiver=0x43766c0, e=0x7fff80284980) at kernel/qapplication.cpp:4183
#20 0x00007f46f3370076 in KApplication::notify (this=0x7fff802868e0, receiver=0x43766c0, event=0x7fff80284980) at ../../kdeui/kernel/kapplication.cpp:302
#21 0x00007f46f2bace0c in QCoreApplication::notifyInternal (this=0x7fff802868e0, receiver=0x43766c0, event=0x7fff80284980) at kernel/qcoreapplication.cpp:704
#22 0x00007f46f1da660a in QCoreApplication::sendEvent (this=0x43769f0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#23 QWidgetPrivate::show_helper (this=0x43769f0) at kernel/qwidget.cpp:7196
#24 0x00007f46f1da878a in QWidget::setVisible (this=0x43766c0, visible=<value optimized out>) at kernel/qwidget.cpp:7418
#25 0x00007f46f1da6976 in QWidget::show (this=<value optimized out>, spontaneous=false) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:485
#26 QWidgetPrivate::showChildren (this=<value optimized out>, spontaneous=false) at kernel/qwidget.cpp:7506
#27 0x00007f46f1da64ff in QWidgetPrivate::show_helper (this=0x437adf0) at kernel/qwidget.cpp:7143
#28 0x00007f46f1da878a in QWidget::setVisible (this=0x437ac70, visible=<value optimized out>) at kernel/qwidget.cpp:7418
#29 0x00007f46f1da6976 in QWidget::show (this=<value optimized out>, spontaneous=false) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:485
#30 QWidgetPrivate::showChildren (this=<value optimized out>, spontaneous=false) at kernel/qwidget.cpp:7506
#31 0x00007f46f1da64ff in QWidgetPrivate::show_helper (this=0x4374000) at kernel/qwidget.cpp:7143
#32 0x00007f46f1da878a in QWidget::setVisible (this=0x4373da0, visible=<value optimized out>) at kernel/qwidget.cpp:7418
#33 0x00007f46f1da6976 in QWidget::show (this=<value optimized out>, spontaneous=false) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:485
#34 QWidgetPrivate::showChildren (this=<value optimized out>, spontaneous=false) at kernel/qwidget.cpp:7506
#35 0x00007f46f1da64ff in QWidgetPrivate::show_helper (this=0x43db050) at kernel/qwidget.cpp:7143
#36 0x00007f46f1da878a in QWidget::setVisible (this=0x41741b0, visible=<value optimized out>) at kernel/qwidget.cpp:7418
#37 0x00007f46f1d8adcd in QWidget::show (this=0x32dbfe0, index=0) at ../../include/QtGui/../../src/gui/kernel/qwidget.h:485
#38 QStackedLayout::setCurrentIndex (this=0x32dbfe0, index=0) at kernel/qstackedlayout.cpp:311
#39 0x00007f46f1d8b163 in QStackedLayout::takeAt (this=0x32dbfe0, index=0) at kernel/qstackedlayout.cpp:265
#40 0x00007f46f1d7bb2f in QLayout::removeWidget (this=0x32dbfe0, widget=0x44e2430) at kernel/qlayout.cpp:1457
#41 0x00007f46ef413000 in Sublime::Container::removeWidget (this=0x3184f10, w=0x44e2430) at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/sublime/container.cpp:357
#42 0x00007f46ef423936 in Sublime::MainWindowPrivate::aboutToRemoveView (this=0x1d9c460, index=0x1ddf210, view=0x354ae40)
    at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/sublime/mainwindow_p.cpp:443
#43 0x00007f46ef41a5c4 in Sublime::MainWindow::qt_metacall (this=0x1dae820, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff802853e0)
    at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/kdevplatform/sublime/mainwindow.moc:125
#44 0x00007f46f565b300 in KDevelop::MainWindow::qt_metacall (this=0x7f46d174c940, _c=2150120256, _id=2, _a=0x0)
    at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/kdevplatform/shell/mainwindow.moc:89
#45 0x00007f46f2bbfc0f in QMetaObject::activate (sender=0x1de4470, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293
#46 0x00007f46ef40c8fb in Sublime::Area::aboutToRemoveView (this=0x7f46d174c940, _t1=0x1ddf210, _t2=0x354ae40)
    at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/kdevplatform/sublime/area.moc:122
#47 0x00007f46ef40cd0f in Sublime::Area::removeView (this=0x1de4470, view=0x354ae40) at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/sublime/area.cpp:211
#48 0x00007f46f5680839 in KDevelop::PartDocument::close (this=0x3690840, mode=<value optimized out>) at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/shell/partdocument.cpp:135
#49 0x00007f46f56821a9 in KDevelop::TextDocument::close (this=0x7f46d174c940, mode=2150120256) at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/shell/textdocument.cpp:495
#50 0x00007f46ef40cd96 in Sublime::Area::closeView (this=0x1de4470, view=<value optimized out>) at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/sublime/area.cpp:431
#51 0x00007f46f5688998 in KDevelop::DocumentController::qt_metacall (this=0x1e58760, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff80285840)
    at /home/tenchi/firefox-downloads/kdevelop/kdevplatform/kdevplatform/shell/documentcontroller.moc:121
#52 0x00007f46f2bbfc0f in QMetaObject::activate (sender=0x1e778f0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3293
#53 0x00007f46f1d45022 in QAction::triggered (this=0x7f46d174c940, _t1=false) at .moc/release-shared/moc_qaction.cpp:263
#54 0x00007f46f1d4709b in QAction::activate (this=0x1e778f0, event=<value optimized out>) at kernel/qaction.cpp:1255
#55 0x00007f46f1d489a7 in QAction::event (this=0x7f46d174c940, e=<value optimized out>) at kernel/qaction.cpp:1181
#56 0x00007f46f329a19d in KAction::event (this=0x7f46d174c940, event=0x7fff80285eb0) at ../../kdeui/actions/kaction.cpp:129
#57 0x00007f46f1d4b12c in QApplicationPrivate::notify_helper (this=0x13fab50, receiver=0x1e778f0, e=0x7fff80285eb0) at kernel/qapplication.cpp:4300
#58 0x00007f46f1d5171b in QApplication::notify (this=0x7fff802868e0, receiver=0x1e778f0, e=0x7fff80285eb0) at kernel/qapplication.cpp:4183
#59 0x00007f46f3370076 in KApplication::notify (this=0x7fff802868e0, receiver=0x1e778f0, event=0x7fff80285eb0) at ../../kdeui/kernel/kapplication.cpp:302
#60 0x00007f46f2bace0c in QCoreApplication::notifyInternal (this=0x7fff802868e0, receiver=0x1e778f0, event=0x7fff80285eb0) at kernel/qcoreapplication.cpp:704
#61 0x00007f46f1d86e76 in QCoreApplication::sendEvent (this=<value optimized out>, e=0x33d5170) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#62 QShortcutMap::dispatchEvent (this=<value optimized out>, e=0x33d5170) at kernel/qshortcutmap.cpp:879
#63 0x00007f46f1d88c77 in QShortcutMap::tryShortcutEvent (this=0x13fac78, o=<value optimized out>, e=0x33d5170) at kernel/qshortcutmap.cpp:364
#64 0x00007f46f1d53273 in QApplication::notify (this=0x7fff802868e0, receiver=0x43c1930, e=0x33d5170) at kernel/qapplication.cpp:3746
#65 0x00007f46f3370076 in KApplication::notify (this=0x7fff802868e0, receiver=0x43c1930, event=0x33d5170) at ../../kdeui/kernel/kapplication.cpp:302
#66 0x00007f46f2bace0c in QCoreApplication::notifyInternal (this=0x7fff802868e0, receiver=0x43c1930, event=0x33d5170) at kernel/qcoreapplication.cpp:704
#67 0x00007f46f2baf587 in QCoreApplication::sendEvent (receiver=0x0, event_type=<value optimized out>, data=0x13c3e50) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#68 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=<value optimized out>, data=0x13c3e50) at kernel/qcoreapplication.cpp:1345
#69 0x00007f46f2bd67f3 in QCoreApplication::sendPostedEvents (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#70 postEventSourceDispatch (s=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:276
#71 0x00007f46ec3c7bce in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#72 0x00007f46ec3cb598 in ?? () from /lib/libglib-2.0.so.0
#73 0x00007f46ec3cb6c0 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#74 0x00007f46f2bd6333 in QEventDispatcherGlib::processEvents (this=0x13c35a0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412
#75 0x00007f46f1dfaf0e in QGuiEventDispatcherGlib::processEvents (this=0x7f46d174c940, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#76 0x00007f46f2bab732 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#77 0x00007f46f2babb0c in QEventLoop::exec (this=0x7fff80286710, flags=) at kernel/qeventloop.cpp:201
#78 0x00007f46f2baf84b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#79 0x0000000000408a1f in main (argc=<value optimized out>, argv=<value optimized out>) at /home/tenchi/firefox-downloads/kdevelop/kdevelop/app/main_internal.cpp:232
The current source language is "auto; currently c".

Reported using DrKonqi
Comment 1 Christoph Cullmann 2010-06-10 17:28:40 UTC
SmartInterface problem, will be fixed in KDE 4.5, by kate part not using smart internally for anything beside code completion and in KDE 4.6 by deletion of this.
Perhaps no optimal solution, but nobody will fix it, sad, but true.
Comment 2 Christoph Cullmann 2010-09-01 17:29:36 UTC
KDE 4.5 is out, the code which does create this problem is inactive there in Kate and even already removed in /trunk for KDE 4.6.