Bug 167283 - Segfault during background parsing
Summary: Segfault during background parsing
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 166354 171790 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-23 11:07 UTC by Manuel Nickschas
Modified: 2009-01-23 23:47 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Nickschas 2008-07-23 11:07:32 UTC
Version:           3.9.0 (using 4.1.60 (KDE 4.1.60 (KDE 4.2 >= 20080709)), Gentoo)
Compiler:          i686-pc-linux-gnu-gcc
OS:                Linux (i686) release 2.6.25-gentoo-r3

On opening a project of mine (which worked fine with kdev4 from about 2 weeks ago), kdev crashes during the background parses. Another of my projects I can open fine, but adding an attribute to a class leads to the same crash. Disabling background parsing resolves this crash.

I have just upgraded both kdevplatform and kdevelop (and most if not all of the rest of KDE), and I can reproduce the issue on two machines.

Output immediately before crashing:

kdevelop(22554)/kdevelop (cpp duchain) DeclarationBuilder::visitEnumerator: not assigned enumerator type 
kdevelop(22554)/kdevelop (cpp duchain) DeclarationBuilder::visitEnumerator: not assigned enumerator type 
kdevelop(22554)/kdevelop (cpp duchain) DeclarationBuilder::visitEnumerator: not assigned enumerator type 
kdevelop(22554)/kdevplatform (language) KDevelop::SymbolTable::removeDeclaration: Could not find declaration matching "" 

Program received signal SIGSEGV, Segmentation fault.

Backtrace from the first project (on open) follows:

Application: KDevelop (kdevelop), signal SIGSEGV
[Current thread is 0 (LWP 22650)]

Thread 4 (Thread 0xb3ac1b90 (LWP 22651)):
#0  0xb7f53424 in __kernel_vsyscall ()
#1  0xb6234501 in select () from /lib/libc.so.6
#2  0xb7e4e5e9 in QProcessManager::run () from /usr/lib/qt4/libQtCore.so.4
#3  0xb7d8b150 in QThreadPrivate::start () from /usr/lib/qt4/libQtCore.so.4
#4  0xb7d05047 in start_thread () from /lib/libpthread.so.0
#5  0xb623a9be in clone () from /lib/libc.so.6

Thread 3 (Thread 0xb18dfb90 (LWP 22659)):
#0  0xb7f53424 in __kernel_vsyscall ()
#1  0xb6231c45 in poll () from /lib/libc.so.6
#2  0xb60c01ee in ?? () from /usr/lib/libglib-2.0.so.0
#3  0x083448c8 in ?? ()
#4  0x00000001 in ?? ()
#5  0xffffffff in ?? ()
#6  0x083448c8 in ?? ()
#7  0x00000001 in ?? ()
#8  0xb7d085ce in __pthread_mutex_unlock_usercnt () from /lib/libpthread.so.0
#9  0xb60c0868 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#10 0xb7e96c1d in QEventDispatcherGlib::processEvents () from /usr/lib/qt4/libQtCore.so.4
#11 0xb7e6c6ef in QEventLoop::processEvents () from /usr/lib/qt4/libQtCore.so.4
#12 0xb7e6c868 in QEventLoop::exec () from /usr/lib/qt4/libQtCore.so.4
#13 0xb7d87da1 in QThread::exec () from /usr/lib/qt4/libQtCore.so.4
#14 0xb60311ee in KDevelop::CodeCompletionWorker::run () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#15 0xb7d8b150 in QThreadPrivate::start () from /usr/lib/qt4/libQtCore.so.4
#16 0xb7d05047 in start_thread () from /lib/libpthread.so.0
#17 0xb623a9be in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb0f2eb90 (LWP 22694)):
[KCrash Handler]
#6  0xb5fc4b42 in KDevelop::DocumentRangeObject::smartRange () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#7  0xb1f1b0cc in CppHighlighting::highlightDeclaration () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#8  0xb1f19353 in CppHighlighting::highlightDUChainSimple () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#9  0xb1f19c29 in CppHighlighting::highlightDUChain () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#10 0xb1f116bb in CPPInternalParseJob::run () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#11 0xb1f0e820 in CPPParseJob::parseForeground () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#12 0xb1f1661c in PreprocessJob::sourceNeeded () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#13 0xb1f640dd in rpp::pp::handle_include () from /usr/kde/svn/lib/libkdev4cpprpp.so
#14 0xb1f66853 in rpp::pp::handle_directive () from /usr/kde/svn/lib/libkdev4cpprpp.so
#15 0xb1f66c82 in rpp::pp::operator() () from /usr/kde/svn/lib/libkdev4cpprpp.so
#16 0xb1f67151 in rpp::pp::processFile () from /usr/kde/svn/lib/libkdev4cpprpp.so
#17 0xb1f157e3 in PreprocessJob::run () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#18 0xb6ffdfb9 in ThreadWeaver::JobRunHelper::runTheJob () from /usr/kde/svn/lib/libthreadweaver.so.4
#19 0xb6ffe310 in ThreadWeaver::Job::execute () from /usr/kde/svn/lib/libthreadweaver.so.4
#20 0xb6fff900 in ThreadWeaver::JobCollectionJobRunner::execute () from /usr/kde/svn/lib/libthreadweaver.so.4
#21 0xb70001fe in ThreadWeaver::JobCollection::execute () from /usr/kde/svn/lib/libthreadweaver.so.4
#22 0xb6ffd137 in ThreadWeaver::ThreadRunHelper::run () from /usr/kde/svn/lib/libthreadweaver.so.4
#23 0xb6ffd6d2 in ThreadWeaver::Thread::run () from /usr/kde/svn/lib/libthreadweaver.so.4
#24 0xb7d8b150 in QThreadPrivate::start () from /usr/lib/qt4/libQtCore.so.4
#25 0xb7d05047 in start_thread () from /lib/libpthread.so.0
#26 0xb623a9be in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb5bcdb30 (LWP 22650)):
#0  0xb7f53424 in __kernel_vsyscall ()
#1  0xb7d09445 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb7d8a504 in QMutexPrivate::wait () from /usr/lib/qt4/libQtCore.so.4
#3  0xb7d86023 in QMutex::lock () from /usr/lib/qt4/libQtCore.so.4
#4  0xb5fc5583 in KDevelop::DocumentRangeObject::syncFromSmart () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#5  0xb5fc5731 in KDevelop::DocumentRangeObject::range () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#6  0xb3268554 in ClassModel::filterObject () from /usr/kde/svn/lib/kde4/kdevclassbrowser.so
#7  0xb326aa5a in ClassModel::refreshNode () from /usr/kde/svn/lib/kde4/kdevclassbrowser.so
#8  0xb326b73a in ClassModel::branchModified () from /usr/kde/svn/lib/kde4/kdevclassbrowser.so
#9  0xb326ba76 in ClassModel::qt_metacall () from /usr/kde/svn/lib/kde4/kdevclassbrowser.so
#10 0xb7e7aea9 in QMetaCallEvent::placeMetaCall () from /usr/lib/qt4/libQtCore.so.4
#11 0xb7e7d1bc in QObject::event () from /usr/lib/qt4/libQtCore.so.4
#12 0xb64dc562 in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#13 0xb64e039a in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#14 0xb777abfc in KApplication::notify () from /usr/kde/svn/lib/libkdeui.so.5
#15 0xb7e6d2f1 in QCoreApplication::notifyInternal () from /usr/lib/qt4/libQtCore.so.4
#16 0xb7e6e375 in QCoreApplicationPrivate::sendPostedEvents () from /usr/lib/qt4/libQtCore.so.4
#17 0xb7e6e5e1 in QCoreApplication::sendPostedEvents () from /usr/lib/qt4/libQtCore.so.4
#18 0xb7e967e9 in postEventSourceDispatch () from /usr/lib/qt4/libQtCore.so.4
#19 0xb60bd2ae in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#20 0xb60c03e6 in ?? () from /usr/lib/libglib-2.0.so.0
#21 0x080bd0c0 in ?? ()
#22 0x00000000 in ?? ()
Comment 1 Manuel Nickschas 2008-07-23 12:05:23 UTC
Reproducable with Quassel's source:

git clone git://git.quassel-irc.org/quassel.git

Import this as a cmake project and open it. After that, open chatitem.h and try adding an attribute to the class. I can reproduce the crash 100% of the time by trying to add "int debugflg" to the private section of class ChatItem.

If that doesn't help, please ping me again ("Sput" on IRC) so I can try to find another testcase.
Comment 2 Andreas Pakulat 2008-07-23 12:48:48 UTC
Adding David to Cc as I can't reproduce this. David let me know if you're reading kdevelop-bugs regurlarly, then I can stop adding you to the Cc.
Comment 3 David Nolden 2008-07-25 01:07:22 UTC
Am Mittwoch, 23. Juli 2008 12:48:50 schrieb Andreas Pakulat:
[bugs.kde.org quoted mail]

You don't need to add me to the CC list, I do read the kdevelop-bugs mailing 
list.

Greetings, David
Comment 4 David Nolden 2008-07-25 01:12:10 UTC
I've downloaded the project, and tried what you said. Could not reproduce the problem though. Maybe a mis-compilation? Try rebuilding kdevplatform + kdevelop completely.
Comment 5 Manuel Nickschas 2008-07-28 15:09:19 UTC
Have rebuilt everything completely, also removed my config files just to be sure, and I can still reproduce this on both machines with both projects :/ Also I've found out that with background parsing enabled, it doesn't even matter what I type where. Just entering anything anywhere in an open file leads to the crash after a few seconds.

However, the backtrace slightly changed (still the same general area though):

Application: KDevelop (kdevelop), signal SIGSEGV
[Current thread is 0 (LWP 23402)]

Thread 4 (Thread 0xb1daeb90 (LWP 23404)):
#0  0xb6102fde in clock_gettime () from /lib/librt.so.1
#1  0xb7e2cde0 in QTimerInfoList::getTime () from /usr/lib/qt4/libQtCore.so.4
#2  0xb7e2ce7d in QTimerInfoList::updateCurrentTime () from /usr/lib/qt4/libQtCore.so.4
#3  0xb7e2d76a in QTimerInfoList::timerWait () from /usr/lib/qt4/libQtCore.so.4
#4  0xb7e2b77f in timerSourcePrepare () from /usr/lib/qt4/libQtCore.so.4
#5  0xb6069940 in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#6  0xb606a035 in ?? () from /usr/lib/libglib-2.0.so.0
#7  0x085f8e18 in ?? ()
#8  0xb1dae238 in ?? ()
#9  0xb7c9c10e in pthread_mutex_lock () from /lib/libpthread.so.0
#10 0xb606a868 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#11 0xb7e2bc1d in QEventDispatcherGlib::processEvents () from /usr/lib/qt4/libQtCore.so.4
#12 0xb7e016ef in QEventLoop::processEvents () from /usr/lib/qt4/libQtCore.so.4
#13 0xb7e01868 in QEventLoop::exec () from /usr/lib/qt4/libQtCore.so.4
#14 0xb7d1cda1 in QThread::exec () from /usr/lib/qt4/libQtCore.so.4
#15 0xb5fd986e in KDevelop::CodeCompletionWorker::run () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#16 0xb7d20150 in QThreadPrivate::start () from /usr/lib/qt4/libQtCore.so.4
#17 0xb7c9a047 in start_thread () from /lib/libpthread.so.0
#18 0xb61e59be in clone () from /lib/libc.so.6

Thread 3 (Thread 0xb15adb90 (LWP 23405)):
#0  0xb7ee8424 in __kernel_vsyscall ()
#1  0xb61df501 in select () from /lib/libc.so.6
#2  0xb7de35e9 in QProcessManager::run () from /usr/lib/qt4/libQtCore.so.4
#3  0xb7d20150 in QThreadPrivate::start () from /usr/lib/qt4/libQtCore.so.4
#4  0xb7c9a047 in start_thread () from /lib/libpthread.so.0
#5  0xb61e59be in clone () from /lib/libc.so.6
Current language:  auto; currently asm

Thread 2 (Thread 0xb0bfbb90 (LWP 23518)):
[KCrash Handler]
#6  0xb5f9bc4c in KDevelop::Declaration::identifier () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#7  0xb5f81d83 in KDevelop::DUContext::localDeclarations () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#8  0xb240b10d in CppHighlighting::highlightDUChainSimple () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#9  0xb240b6de in CppHighlighting::highlightDUChain () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#10 0xb2403083 in CPPInternalParseJob::run () from /usr/kde/svn/lib/kde4/kdevcpplanguagesupport.so
#11 0xb6fa9579 in ThreadWeaver::JobRunHelper::runTheJob () from /usr/kde/svn/lib/libthreadweaver.so.4
#12 0xb6fa98d0 in ThreadWeaver::Job::execute () from /usr/kde/svn/lib/libthreadweaver.so.4
#13 0xb6faaec0 in ThreadWeaver::JobCollectionJobRunner::execute () from /usr/kde/svn/lib/libthreadweaver.so.4
#14 0xb6fa86f7 in ThreadWeaver::ThreadRunHelper::run () from /usr/kde/svn/lib/libthreadweaver.so.4
#15 0xb6fa8c92 in ThreadWeaver::Thread::run () from /usr/kde/svn/lib/libthreadweaver.so.4
#16 0xb7d20150 in QThreadPrivate::start () from /usr/lib/qt4/libQtCore.so.4
#17 0xb7c9a047 in start_thread () from /lib/libpthread.so.0
#18 0xb61e59be in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb5b69b30 (LWP 23402)):
#0  0xb7ee8424 in __kernel_vsyscall ()
#1  0xb7c9e445 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb7d20bbe in QWaitCondition::wait () from /usr/lib/qt4/libQtCore.so.4
#3  0xb7d1fd9a in QThread::wait () from /usr/lib/qt4/libQtCore.so.4
#4  0xb7de41f1 in QProcessManager::~QProcessManager () from /usr/lib/qt4/libQtCore.so.4
#5  0xb7de2a94 in __tcf_0 () from /usr/lib/qt4/libQtCore.so.4
#6  0xb614f992 in exit () from /lib/libc.so.6
#7  0xb64e373f in ?? () from /usr/lib/qt4/libQtGui.so.4
#8  0xb7712155 in KApplication::xioErrhandler () from /usr/kde/svn/lib/libkdeui.so.5
#9  0xb7712190 in kde_xio_errhandler () from /usr/kde/svn/lib/libkdeui.so.5
#10 0xb738a1eb in _XIOError () from /usr/lib/libX11.so.6
#11 0xb7390974 in _XPutXCBBuffer () from /usr/lib/libX11.so.6
#12 0xb7390cb5 in ?? () from /usr/lib/libX11.so.6
#13 0x080cd770 in ?? ()
#14 0x00000070 in ?? ()
#15 0xb7367683 in XCreateGC () from /usr/lib/libX11.so.6
#16 0xb73836e6 in XSetClipRectangles () from /usr/lib/libX11.so.6
#17 0xb6640a14 in ?? () from /usr/lib/qt4/libQtGui.so.4
#18 0xb663c36f in ?? () from /usr/lib/qt4/libQtGui.so.4
#19 0xb663dfcb in ?? () from /usr/lib/qt4/libQtGui.so.4
#20 0xb663e689 in ?? () from /usr/lib/qt4/libQtGui.so.4
#21 0xb64df2e9 in QWidget::event () from /usr/lib/qt4/libQtGui.so.4
#22 0xb683b6a5 in QMainWindow::event () from /usr/lib/qt4/libQtGui.so.4
#23 0xb77cd6d0 in KMainWindow::event () from /usr/kde/svn/lib/libkdeui.so.5
#24 0xb780a10d in KXmlGuiWindow::event () from /usr/kde/svn/lib/libkdeui.so.5
#25 0xb6487562 in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#26 0xb648b2ab in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#27 0xb771270c in KApplication::notify () from /usr/kde/svn/lib/libkdeui.so.5
#28 0xb7e022f1 in QCoreApplication::notifyInternal () from /usr/lib/qt4/libQtCore.so.4
#29 0xb65074a2 in QWidgetPrivate::dirtyWidget_sys () from /usr/lib/qt4/libQtGui.so.4
#30 0xb663c5e5 in ?? () from /usr/lib/qt4/libQtGui.so.4
#31 0xb663e408 in QWidget::repaint () from /usr/lib/qt4/libQtGui.so.4
#32 0xb64d5476 in QWidget::repaint () from /usr/lib/qt4/libQtGui.so.4
#33 0xb6889ee6 in QStatusBar::reformat () from /usr/lib/qt4/libQtGui.so.4
#34 0xb688aa4d in QStatusBar::insertPermanentWidget () from /usr/lib/qt4/libQtGui.so.4
#35 0xb688ab23 in QStatusBar::addPermanentWidget () from /usr/lib/qt4/libQtGui.so.4
#36 0xb78d0926 in KDevelop::StatusBar::showProgress () from /usr/kde/svn/lib/libkdevplatformshell.so.1
#37 0xb78d18e8 in KDevelop::StatusBar::qt_metacall () from /usr/kde/svn/lib/libkdevplatformshell.so.1
#38 0xb7e16129 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#39 0xb7e16798 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#40 0xb5f6bcdc in KDevelop::BackgroundParser::showProgress () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#41 0xb5f6ca4b in KDevelop::BackgroundParser::updateProgressBar () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#42 0xb5f7043e in KDevelop::BackgroundParserPrivate::parseDocumentsInternal () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#43 0xb5f6e028 in KDevelop::BackgroundParser::parseDocuments () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#44 0xb5f6e128 in KDevelop::BackgroundParser::qt_metacall () from /usr/kde/svn/lib/libkdevplatformlanguage.so.1
#45 0xb7e16129 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#46 0xb7e16798 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#47 0xb7e512ed in QTimer::timeout () from /usr/lib/qt4/libQtCore.so.4
#48 0xb7e1cc46 in QTimer::timerEvent () from /usr/lib/qt4/libQtCore.so.4
#49 0xb7e11f7d in QObject::event () from /usr/lib/qt4/libQtCore.so.4
#50 0xb6487562 in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#51 0xb648b39a in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#52 0xb771270c in KApplication::notify () from /usr/kde/svn/lib/libkdeui.so.5
#53 0xb7e022f1 in QCoreApplication::notifyInternal () from /usr/lib/qt4/libQtCore.so.4
#54 0xb7e2dc5e in QTimerInfoList::activateTimers () from /usr/lib/qt4/libQtCore.so.4
#55 0xb7e2b712 in timerSourceDispatch () from /usr/lib/qt4/libQtCore.so.4
#56 0xb60672ae in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#57 0xb606a3e6 in ?? () from /usr/lib/libglib-2.0.so.0
#58 0x080c4240 in ?? ()
#59 0x00000000 in ?? ()

I really hope that helps somehow. Otherwise, if I can help you debug in any way, please let me know! I miss background parsing... :/
Comment 6 Manuel Nickschas 2008-08-03 00:00:48 UTC
OK, compiling kdevplatform in debug mode, I seem to be able to start kdevelop most of the time and have a project open without crashing, whereas in release mode, apparently I can reproduce a segfault in smartRange() every time...

This is true even with background parsing enabled, i.e. with kdevplatform in debug mode, I can successfully open the project most of the time, including all features.

To make things more interesting, with this configuration and that same project, I still get regular crashes on startup that seem to be unrelated to above bug:

#0  0xb6493454 in _int_malloc () from /lib/libc.so.6
#1  0xb649498e in malloc_check () from /lib/libc.so.6
#2  0xb6495415 in malloc () from /lib/libc.so.6
#3  0xb664a1c9 in operator new () from /usr/lib/gcc/i686-pc-linux-gnu/4.2.4/libstdc++.so.6
#4  0xb6359863 in QList<KDevelop::QualifiedIdentifier>::node_construct (this=0xb081da18, n=0xa143a9c, t=@0xb081d8d0)
    at /usr/include/qt4/QtCore/qlist.h:338
#5  0xb6359aed in QList<KDevelop::QualifiedIdentifier>::append (this=0xb081da18, t=@0xb081d8d0)
    at /usr/include/qt4/QtCore/qlist.h:424
#6  0xb6359b19 in QList<KDevelop::QualifiedIdentifier>::operator<< (this=0xb081da18, t=@0xb081d8d0)
    at /usr/include/qt4/QtCore/qlist.h:302
#7  0xb634a95b in KDevelop::DUContext::SearchItem::toList (this=0xb18ca50, prefix=@0xb081da08)
    at /var/tmp/portage/kde-base/kdevplatform-9999/work/kdevplatform-9999/language/duchain/ducontext.cpp:1519
#8  0xb18ec65b in Cpp::CppDUContext<KDevelop::TopDUContext>::findDeclarationsInternal ()
   from /usr/kde/svn/lib/libkdev4cppduchain.so
#9  0xb193e103 in DelayedTypeResolver::exchange () from /usr/kde/svn/lib/libkdev4cppduchain.so
#10 0xb1937cb8 in Cpp::resolveDelayedTypes () from /usr/kde/svn/lib/libkdev4cppduchain.so
#11 0xb18ebe88 in Cpp::CppDUContext<KDevelop::TopDUContext>::findDeclarationsInternal ()
   from /usr/kde/svn/lib/libkdev4cppduchain.so
#12 0xb18ec713 in Cpp::CppDUContext<KDevelop::TopDUContext>::findDeclarationsInternal ()
   from /usr/kde/svn/lib/libkdev4cppduchain.so
#13 0xb634b869 in KDevelop::DUContext::findDeclarations (this=0xab162a8, identifier=@0xb081e958, position=@0xb081e950,
    dataType=@0xb081e974, topContext=0xab162a8, flags=@0xb081e970)
    at /var/tmp/portage/kde-base/kdevplatform-9999/work/kdevplatform-9999/language/duchain/ducontext.cpp:704
#14 0xb190bf6e in TypeBuilder::openTypeFromName () from /usr/kde/svn/lib/libkdev4cppduchain.so
#15 0xb190cfbb in TypeBuilder::visitSimpleTypeSpecifier () from /usr/kde/svn/lib/libkdev4cppduchain.so
#16 0xb187ef87 in Visitor::visit () from /usr/kde/svn/lib/libkdev4cppparser.so
#17 0xb190b9e9 in TypeBuilder::visitSimpleDeclaration () from /usr/kde/svn/lib/libkdev4cppduchain.so
#18 0xb18f0b6b in DeclarationBuilder::visitSimpleDeclaration () from /usr/kde/svn/lib/libkdev4cppduchain.so
#19 0xb187ef87 in Visitor::visit () from /usr/kde/svn/lib/libkdev4cppparser.so
#20 0xb187dee8 in visitNodes<DeclarationAST*> () from /usr/kde/svn/lib/libkdev4cppparser.so
#21 0xb187ef87 in Visitor::visit () from /usr/kde/svn/lib/libkdev4cppparser.so
#22 0xb18e14dc in ContextBuilder::startVisiting () from /usr/kde/svn/lib/libkdev4cppduchain.so
#23 0xb18f8dc0 in KDevelop::AbstractTypeBuilder<AST, NameAST, ContextBuilder>::supportBuild ()
[...]
Comment 7 Andreas Pakulat 2008-09-29 10:22:28 UTC
*** Bug 171790 has been marked as a duplicate of this bug. ***
Comment 8 Andreas Pakulat 2008-09-29 10:24:42 UTC
*** Bug 166354 has been marked as a duplicate of this bug. ***
Comment 9 Ian Monroe 2008-11-23 03:22:51 UTC
I get this backtrace when trying to import a cmake project (Amarok). It looks more similar to Bug 171790 then it does this bug report.

I'm eean on freenode.

Using Alpha3

Thread 1 (Thread 0x7f37a9d46700 (LWP 27891)):
[KCrash Handler]
#5  KDevelop::DocumentRangeObject::syncFromSmart (this=0x0) at /usr/src/debug/kdevplatform/language/editor/documentrangeobject.cpp:60
#6  0x00007f37a41702cd in KDevelop::DocumentRangeObject::range (this=0x0) at /usr/src/debug/kdevplatform/language/editor/documentrangeobject.cpp:172
#7  0x00007f37a41a7908 in KDevelop::DUContextDynamicData::addDeclaration (this=0x17d11a0, newDeclaration=0x17c0410) at /usr/src/debug/kdevplatform/language/duchain/ducontext.cpp:368
#8  0x00007f37a41c70e7 in KDevelop::Declaration::setContext (this=0x17c0410, context=0x176e160, anonymous=false) at /usr/src/debug/kdevplatform/language/duchain/declaration.cpp:391
#9  0x00007f378e1332a6 in CMakeProjectVisitor::createDefinitions (this=0x7fffb1d8c7f0, ast=<value optimized out>)
    at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp:1915
#10 0x00007f378e13c2f9 in CMakeProjectVisitor::walk (this=0x7fffb1d8c7f0, fc=@0x17d1350, line=74) at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp:1883
#11 0x00007f378e13d810 in CMakeProjectVisitor::visit (this=0x7fffb1d8c7f0, ifast=0x17d1340) at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp:1024
#12 0x00007f378e13c3d2 in CMakeProjectVisitor::walk (this=0x7fffb1d8c7f0, fc=@0x7fffb1d8ca40, line=67) at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/parser/cmakeprojectvisitor.cpp:1886
#13 0x00007f378e36cdde in CMakeProjectManager::includeScript (this=0xb79120, file=@0x7fffb1d8cc70, project=0x16cd070) at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/cmakemanager.cpp:367
#14 0x00007f378e36ddaa in CMakeProjectManager::initializeProject (this=0xb79120, project=0x16cd070, baseUrl=@0x7fffb1d8cf30)
    at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/cmakemanager.cpp:287
#15 0x00007f378e36f0f0 in CMakeProjectManager::import (this=0xb79120, project=0x16cd070) at /usr/src/debug/kdevelop-3.9.82/buildtools/managers/cmake/cmakemanager.cpp:338
#16 0x00007f37a92d969e in KDevelop::Project::open (this=0x16cd070, projectFileUrl_=<value optimized out>) at /usr/src/debug/kdevplatform/shell/project.cpp:338
#17 0x00007f37a92d22ea in KDevelop::ProjectController::openProject (this=0xa077c0, projectFile=<value optimized out>) at /usr/src/debug/kdevplatform/shell/projectcontroller.cpp:360
#18 0x00007f379783f7e7 in ImportProject::accept (this=0x7fffb1d8efa0) at /usr/src/debug/kdevelop-3.9.82/plugins/appwizard/importproject.cpp:102
#19 0x00007f37a68c20ed in QDialog::qt_metacall () from /usr/lib64/libQtGui.so.4
#20 0x00007f37978368ee in ImportProject::qt_metacall (this=0x0, _c=11, _id=1, _a=0x1) at /usr/src/debug/kdevelop-3.9.82/build/plugins/appwizard/moc_importproject.cpp:62
[snip]
Comment 10 David Nolden 2008-11-25 00:19:41 UTC
@Ian Monroe: 
Please update kdevplatform and kdevelop and try again, and re-post the backtrace if you still get the crash. The problem is that your line-numbers are totally off, and it looks like your version is from before many changes in that Area.
Comment 11 Manuel Nickschas 2008-11-25 02:30:17 UTC
I can still reproduce that one with kdevplatform in release mode. Still works fine in debug mode. Current backtrace follows; note how it looks different from the original one now, but still crashes at the same location...

Application: KDevelop (kdevelop), signal SIGSEGV
0x00007f623f3c7af1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 2099)]

Thread 3 (Thread 0x40d35950 (LWP 2100)):
#0  0x00007f623fe2bfdd in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007f62400981b7 in QWaitCondition::wait () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f623e2af3d8 in KDevelop::DUChainPrivate::CleanupThread::run () from /usr/kde/live/lib64/libkdevplatformlanguage.so.1
#3  0x00007f62400970b2 in QThreadPrivate::start () from /usr/lib64/qt4/libQtCore.so.4
#4  0x00007f623fe28017 in start_thread () from /lib/libpthread.so.0
#5  0x00007f623f3f79fd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x41536950 (LWP 2101)):
#0  0x00007f623f3f1212 in select () from /lib/libc.so.6
#1  0x00007f624015efb5 in QProcessManager::run () from /usr/lib64/qt4/libQtCore.so.4
#2  0x00007f62400970b2 in QThreadPrivate::start () from /usr/lib64/qt4/libQtCore.so.4
#3  0x00007f623fe28017 in start_thread () from /lib/libpthread.so.0
#4  0x00007f623f3f79fd in clone () from /lib/libc.so.6
#5  0x0000000000000000 in ?? ()
Current language:  auto; currently asm

Thread 1 (Thread 0x7f6243ed0750 (LWP 2099)):
[KCrash Handler]
#5  0x00007f623e27e1eb in KDevelop::DocumentRangeObject::syncFromSmart () from /usr/kde/live/lib64/libkdevplatformlanguage.so.1
#6  0x00007f623e27e3cd in KDevelop::DocumentRangeObject::range () from /usr/kde/live/lib64/libkdevplatformlanguage.so.1
#7  0x00007f623e2baee9 in KDevelop::DUContextDynamicData::addDeclaration () from /usr/kde/live/lib64/libkdevplatformlanguage.so.1
#8  0x00007f623e2d9a37 in KDevelop::Declaration::setContext () from /usr/kde/live/lib64/libkdevplatformlanguage.so.1
#9  0x00007f623687de2c in CMakeProjectVisitor::visit () from /usr/kde/live/lib64/libkdev4cmakecommon.so
#10 0x00007f623687f4e2 in CMakeProjectVisitor::walk () from /usr/kde/live/lib64/libkdev4cmakecommon.so
#11 0x00007f6236881927 in CMakeProjectVisitor::visit () from /usr/kde/live/lib64/libkdev4cmakecommon.so
#12 0x00007f623687f4e2 in CMakeProjectVisitor::walk () from /usr/kde/live/lib64/libkdev4cmakecommon.so
#13 0x00007f6236882345 in CMakeProjectVisitor::visit () from /usr/kde/live/lib64/libkdev4cmakecommon.so
#14 0x00007f623687f4e2 in CMakeProjectVisitor::walk () from /usr/kde/live/lib64/libkdev4cmakecommon.so
#15 0x00007f6236aaf766 in CMakeProjectManager::includeScript () from /usr/kde/live/lib64/kde4/kdevcmakemanager.so
#16 0x00007f6236ab077a in CMakeProjectManager::initializeProject () from /usr/kde/live/lib64/kde4/kdevcmakemanager.so
#17 0x00007f6236ab1e8a in CMakeProjectManager::import () from /usr/kde/live/lib64/kde4/kdevcmakemanager.so
#18 0x00007f624344b3af in KDevelop::Project::open () from /usr/kde/live/lib64/libkdevplatformshell.so.1
#19 0x00007f6243444360 in KDevelop::ProjectController::openProject () from /usr/kde/live/lib64/libkdevplatformshell.so.1
#20 0x00007f6243444c3f in KDevelop::ProjectController::initialize () from /usr/kde/live/lib64/libkdevplatformshell.so.1
#21 0x00007f624343e473 in KDevelop::CorePrivate::initialize () from /usr/kde/live/lib64/libkdevplatformshell.so.1
#22 0x000000000040765d in main ()

Comment 12 Dario Andres 2008-12-06 14:32:30 UTC
Backtrace in comment 11 looks similar to the one in bug 176380.
Comment 13 David Nolden 2009-01-20 21:51:07 UTC
The crash reported in the last comment was most probably one of the release/debug problem crashes, that are fixed now, so I'm closing.

If you encounter it again, reopen.