Bug 280581 - KDevelop-4.2.3 crashes on startup.
Summary: KDevelop-4.2.3 crashes on startup.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: 4.2.3
Platform: Gentoo Packages Linux
: HI crash
Target Milestone: 4.2.3
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-22 16:20 UTC by Nils Larsson
Modified: 2011-12-13 17:17 UTC (History)
1 user (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 Nils Larsson 2011-08-22 16:20:57 UTC
Application: kdevelop (4.2.3)
KDE Platform Version: 4.7.00 (4.7.0)
Qt Version: 4.7.3
Operating System: Linux 2.6.38.5-zen-juno i686
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:
I was coding away and all of the sudden kdevelop crashed and now it crashes every time I start.

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
[Current thread is 1 (Thread 0xb1d0e980 (LWP 4470))]

Thread 5 (Thread 0xaed27b70 (LWP 4472)):
#0  0xb774e424 in __kernel_vsyscall ()
#1  0xb5e4af44 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5f4d9e5 in pthread_cond_timedwait () from /lib/libc.so.6
#3  0xb6be31af in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/qt4/libQtCore.so.4
#4  0xb565c60a in KDevelop::DUChainPrivate::CleanupThread::run (this=0x8ca60d0) at /tmp/portage/dev-util/kdevplatform-1.2.3/work/kdevplatform-1.2.3/language/duchain/duchain.cpp:286
#5  0xb6be2d14 in ?? () from /usr/lib/qt4/libQtCore.so.4
#6  0xb5e46cdc in start_thread () from /lib/libpthread.so.0
#7  0xb5f3e9ce in clone () from /lib/libc.so.6

Thread 4 (Thread 0xae114b70 (LWP 4474)):
[KCrash Handler]
#7  0xb6c2e0a3 in QString::operator=(QString const&) () from /usr/lib/qt4/libQtCore.so.4
#8  0xae364599 in parseFunctionInfo (func=..., this=0xab3d8e78) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/projectmanagers/cmake/parser/cmakeast.cpp:2476
#9  OptionAst::parseFunctionInfo (this=0xab3d8e78, func=...) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/projectmanagers/cmake/parser/cmakeast.cpp:2471
#10 0xae3978e8 in CMakeProjectVisitor::walk (this=0xae113d6c, fc=..., line=39, isClean=true) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/projectmanagers/cmake/parser/cmakeprojectvisitor.cpp:2123
#11 0xae3aad61 in CMakeParserUtils::includeScript (file=..., parent=..., data=0x9399144, sourcedir=...) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/projectmanagers/cmake/parser/cmakeparserutils.cpp:165
#12 0xae336fb6 in CMakeManager::includeScript (this=0x8faf3a8, file=..., project=0x8f7a368, dir=..., parent=...) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/projectmanagers/cmake/cmakemanager.cpp:349
#13 0xae33938c in CMakeManager::parse (this=0x8faf3a8, item=0x8fbd3b8) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/projectmanagers/cmake/cmakemanager.cpp:404
#14 0xb584fba2 in KDevelop::ImportProjectJobPrivate::import (this=0x8fbf618, folder=0x8fbd3b8) at /tmp/portage/dev-util/kdevplatform-1.2.3/work/kdevplatform-1.2.3/project/importprojectjob.cpp:53
#15 0xb584f5d9 in QtConcurrent::VoidStoredMemberFunctionPointerCall1<void, KDevelop::ImportProjectJobPrivate, KDevelop::ProjectFolderItem*, KDevelop::ProjectFolderItem*>::runFunctor (this=0x8fbe668) at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:426
#16 0xb584f78f in run (this=0x8fbe668) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:120
#17 QtConcurrent::RunFunctionTask<void>::run (this=0x8fbe668) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:114
#18 0xb6bd6e21 in ?? () from /usr/lib/qt4/libQtCore.so.4
#19 0xb6be2d14 in ?? () from /usr/lib/qt4/libQtCore.so.4
#20 0xb5e46cdc in start_thread () from /lib/libpthread.so.0
#21 0xb5f3e9ce in clone () from /lib/libc.so.6

Thread 3 (Thread 0xac068b70 (LWP 4550)):
#0  0xb5c1a50c in clock_gettime () from /lib/librt.so.1
#1  0xb6c3a376 in ?? () from /usr/lib/qt4/libQtCore.so.4
#2  0xb6d0e017 in ?? () from /usr/lib/qt4/libQtCore.so.4
#3  0xb6d0e37b in ?? () from /usr/lib/qt4/libQtCore.so.4
#4  0xb6d0cb93 in ?? () from /usr/lib/qt4/libQtCore.so.4
#5  0xb6d0cc2d in ?? () from /usr/lib/qt4/libQtCore.so.4
#6  0xb50e002c in g_main_context_prepare () from /usr/lib/libglib-2.0.so.0
#7  0xb50e0ea8 in ?? () from /usr/lib/libglib-2.0.so.0
#8  0xb50e151b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#9  0xb6d0d697 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#10 0xb6cde1ee in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#11 0xb6cde441 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#12 0xb6bdfe7c in QThread::exec() () from /usr/lib/qt4/libQtCore.so.4
#13 0xb6cbea7e in ?? () from /usr/lib/qt4/libQtCore.so.4
#14 0xb6be2d14 in ?? () from /usr/lib/qt4/libQtCore.so.4
#15 0xb5e46cdc in start_thread () from /lib/libpthread.so.0
#16 0xb5f3e9ce in clone () from /lib/libc.so.6

Thread 2 (Thread 0xac869b70 (LWP 4613)):
#0  0xb774e424 in __kernel_vsyscall ()
#1  0xb5e4af44 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0xb5f4d9e5 in pthread_cond_timedwait () from /lib/libc.so.6
#3  0xb6be31af in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib/qt4/libQtCore.so.4
#4  0xb6bd6eb4 in ?? () from /usr/lib/qt4/libQtCore.so.4
#5  0xb6be2d14 in ?? () from /usr/lib/qt4/libQtCore.so.4
#6  0xb5e46cdc in start_thread () from /lib/libpthread.so.0
#7  0xb5f3e9ce in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb1d0e980 (LWP 4470)):
#0  0xb774e424 in __kernel_vsyscall ()
#1  0xb5f32e30 in poll () from /lib/libc.so.6
#2  0xb387c688 in ?? () from /usr/lib/libxcb.so.1
#3  0xb387cc9c in ?? () from /usr/lib/libxcb.so.1
#4  0xb387cd52 in xcb_writev () from /usr/lib/libxcb.so.1
#5  0xb539b7f0 in _XSend () from /usr/lib/libX11.so.6
#6  0xb539be2c in _XReply () from /usr/lib/libX11.so.6
#7  0xb5380cba in XGetSelectionOwner () from /usr/lib/libX11.so.6
#8  0xb62b539e in ?? () from /usr/lib/qt4/libQtGui.so.4
#9  0xb62b6c24 in ?? () from /usr/lib/qt4/libQtGui.so.4
#10 0xb623b346 in ?? () from /usr/lib/qt4/libQtGui.so.4
#11 0xb6cedf76 in ?? () from /usr/lib/qt4/libQtCore.so.4
#12 0xb6cee886 in QMimeData::data(QString const&) const () from /usr/lib/qt4/libQtCore.so.4
#13 0xb59267d6 in KFilePreviewGenerator::Private::decodeIsCutSelection(QMimeData const*) () from /usr/lib/libkfile.so.4
#14 0xb59293a0 in KFilePreviewGenerator::Private::applyCutItemEffect(KFileItemList const&) () from /usr/lib/libkfile.so.4
#15 0xb5929a05 in KFilePreviewGenerator::Private::updateIcons(KFileItemList const&) () from /usr/lib/libkfile.so.4
#16 0xb592ab06 in KFilePreviewGenerator::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkfile.so.4
#17 0xb6ce56de in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#18 0xb6cf456a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#19 0xb5a4eb66 in KDirLister::newItems(KFileItemList const&) () from /usr/lib/libkio.so.5
#20 0xb5a4f294 in KDirLister::Private::emitItems() () from /usr/lib/libkio.so.5
#21 0xb5a57d43 in ?? () from /usr/lib/libkio.so.5
#22 0xb5a60f3c in ?? () from /usr/lib/libkio.so.5
#23 0xb6ce56de in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#24 0xb6cf456a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#25 0xb5a3528e in KIO::ListJob::entries(KIO::Job*, QList<KIO::UDSEntry> const&) () from /usr/lib/libkio.so.5
#26 0xb5a3b300 in ?? () from /usr/lib/libkio.so.5
#27 0xb5a3b4ee in KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#28 0xb6ce56de in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#29 0xb6cf456a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#30 0xb5aec8a6 in KIO::SlaveInterface::listEntries(QList<KIO::UDSEntry> const&) () from /usr/lib/libkio.so.5
#31 0xb5af00a2 in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib/libkio.so.5
#32 0xb5aebdbb in KIO::SlaveInterface::dispatch() () from /usr/lib/libkio.so.5
#33 0xb5add258 in KIO::Slave::gotInput() () from /usr/lib/libkio.so.5
#34 0xb5adda8c in KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#35 0xb6ce56de in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#36 0xb6cf456a in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#37 0xb59fabd6 in KIO::Connection::readyRead() () from /usr/lib/libkio.so.5
#38 0xb59fb41a in ?? () from /usr/lib/libkio.so.5
#39 0xb59fb4ef in KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkio.so.5
#40 0xb6ce56de in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#41 0xb6cf0106 in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/qt4/libQtCore.so.4
#42 0xb6cf767f in QObject::event(QEvent*) () from /usr/lib/qt4/libQtCore.so.4
#43 0xb6226214 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/qt4/libQtGui.so.4
#44 0xb622b5f3 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt4/libQtGui.so.4
#45 0xb7099912 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#46 0x0805216d in KDevelopApplication::notify (this=0xbff85800, receiver=0x8f6e778, event=0x9398ed8) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/app/main.cpp:90
#47 0xb6cdf1be in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/qt4/libQtCore.so.4
#48 0xb6ce2a64 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/qt4/libQtCore.so.4
#49 0xb6ce2bad in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/qt4/libQtCore.so.4
#50 0xb6d0d1f5 in ?? () from /usr/lib/qt4/libQtCore.so.4
#51 0xb50e0a8f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#52 0xb50e11f0 in ?? () from /usr/lib/libglib-2.0.so.0
#53 0xb50e151b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#54 0xb6d0d638 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#55 0xb62d9e1b in ?? () from /usr/lib/qt4/libQtGui.so.4
#56 0xb6cde1ee in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#57 0xb6cde441 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#58 0xb6750a5a in QDialog::exec() () from /usr/lib/qt4/libQtGui.so.4
#59 0xb6fef66c in KMessageBox::createKMessageBox(KDialog*, QIcon const&, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&, QMessageBox::Icon) () from /usr/lib/libkdeui.so.5
#60 0xb6fefecb in KMessageBox::createKMessageBox(KDialog*, QMessageBox::Icon, QString const&, QStringList const&, QString const&, bool*, QFlags<KMessageBox::Option>, QString const&) () from /usr/lib/libkdeui.so.5
#61 0xb6ff38d3 in KMessageBox::warningContinueCancelListWId(unsigned long, QString const&, QStringList const&, QString const&, KGuiItem const&, KGuiItem const&, QString const&, QFlags<KMessageBox::Option>) () from /usr/lib/libkdeui.so.5
#62 0xb6ff3adc in KMessageBox::warningContinueCancelList(QWidget*, QString const&, QStringList const&, QString const&, KGuiItem const&, KGuiItem const&, QString const&, QFlags<KMessageBox::Option>) () from /usr/lib/libkdeui.so.5
#63 0xb73cca12 in KDevelop::SessionControllerPrivate::performRecovery (this=0x8c84de8) at /tmp/portage/dev-util/kdevplatform-1.2.3/work/kdevplatform-1.2.3/shell/sessioncontroller.cpp:402
#64 0xb73cb568 in lateInitialization (this=0x8c84de8) at /tmp/portage/dev-util/kdevplatform-1.2.3/work/kdevplatform-1.2.3/shell/sessioncontroller.cpp:352
#65 KDevelop::SessionControllerPrivate::qt_metacall (this=0x8c84de8, _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0x94f18c0) at /tmp/portage/dev-util/kdevplatform-1.2.3/work/kdevplatform-1.2.3_build/shell/sessioncontroller.moc:79
#66 0xb6ce56de in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#67 0xb6cf0106 in QMetaCallEvent::placeMetaCall(QObject*) () from /usr/lib/qt4/libQtCore.so.4
#68 0xb6cf767f in QObject::event(QEvent*) () from /usr/lib/qt4/libQtCore.so.4
#69 0xb6226214 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/qt4/libQtGui.so.4
#70 0xb622b5f3 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt4/libQtGui.so.4
#71 0xb7099912 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#72 0x0805216d in KDevelopApplication::notify (this=0xbff85800, receiver=0x8c84de8, event=0x94f21d8) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/app/main.cpp:90
#73 0xb6cdf1be in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/qt4/libQtCore.so.4
#74 0xb6ce2a64 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/qt4/libQtCore.so.4
#75 0xb6ce2bad in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/qt4/libQtCore.so.4
#76 0xb6d0d1f5 in ?? () from /usr/lib/qt4/libQtCore.so.4
#77 0xb50e0a8f in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#78 0xb50e11f0 in ?? () from /usr/lib/libglib-2.0.so.0
#79 0xb50e151b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#80 0xb6d0d638 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#81 0xb62d9e1b in ?? () from /usr/lib/qt4/libQtGui.so.4
#82 0xb6cde1ee in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#83 0xb6cde441 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/qt4/libQtCore.so.4
#84 0xb6ce2c5b in QCoreApplication::exec() () from /usr/lib/qt4/libQtCore.so.4
#85 0xb6224165 in QApplication::exec() () from /usr/lib/qt4/libQtGui.so.4
#86 0x08051819 in main (argc=<optimized out>, argv=) at /tmp/portage/dev-util/kdevelop-4.2.3/work/kdevelop-4.2.3/app/main.cpp:467

Reported using DrKonqi
Comment 1 Milian Wolff 2011-08-27 02:09:26 UTC
please run kdevelop through valgrind and show us the output:

valgrind --track-origins=yes --num-callers=25 kdevelop
Comment 2 Milian Wolff 2011-08-28 13:52:27 UTC
Aleix, I just had a look at the sources:


bool OptionAst::parseFunctionInfo( const CMakeFunctionDesc& func )
{
    if(func.name.toLower()!="option" || (func.arguments.count()<2 && func.arguments.count()>3))
        return false;
    ...

the || (...) stuff is always false as func.arguments.count() cannot be <2 && >3! This is most definitely an error which could lead to crashes like the above in the following code in release-builds.
Comment 3 Nils Larsson 2011-12-08 17:07:24 UTC
Completly forgot about this one. Sorry.

Anyway, I havnt triggerd it in ages, so WORKSFORME now?
Comment 4 Milian Wolff 2011-12-13 17:12:54 UTC
not closing it until aleix commented on my "code review" - there is an error there as far as I saw the last time (see above)
Comment 5 Aleix Pol 2011-12-13 17:17:09 UTC
Git commit 1bb44fda994a15846fb3107bc3afa0fed818d00b by Aleix Pol.
Committed on 13/12/2011 at 18:16.
Pushed by apol into branch 'master'.

Fix OptionAST precondition.

BUG: 280581

M  +1    -1    projectmanagers/cmake/parser/cmakeast.cpp

http://commits.kde.org/kdevelop/1bb44fda994a15846fb3107bc3afa0fed818d00b