Summary: | KDevelop crashes when files are added/removed by external program in the project directory [AbstractFileManagerPlugin::Private::addJobItems] | ||
---|---|---|---|
Product: | [Developer tools] kdevplatform | Reporter: | Alexander <ashaduri> |
Component: | filemanager | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | aleixpol, alsantos123, aspotashev, avkhanov, gbk2011, jb, rjwgnr27, stasnel, tootse, xrigou, yp1995 |
Priority: | VHI | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kde/kdevelop/commit/06b526e81f9f9065d1725b4f35985e71dc0dc2e3 | Version Fixed In: | |
Sentry Crash Report: |
Description
Alexander
2010-12-19 22:02:43 UTC
that is the newest git code (from git.kde.org - not gitorious)? damn, I hoped I had fixed all issues there. Please run KDevelop through valgrind and show me the log it creates when you reproduced the crash: valgrind --track-origins=yes --num-callers=50 kdevelop thanks Yes, it's from git.kde.org. Here's the valgrind output (did ../configure a few times, it crashed when I removed all the files from the build directory). ==17159== Memcheck, a memory error detector ==17159== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==17159== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info ==17159== Command: kdevelop ==17159== kdevelop(17159) Konsole::TerminalDisplay::setVTFont: Using an unsupported variable-width font in the terminal. This may produce display errors. kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(1)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(2)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(3)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(3p)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(4)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(5)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(6)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(7)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(8)") kdevelop(17159)/kio (KIOJob) KIO::TransferJob::slotMimetype: mimetype() emitted again, or after sending first data!; job URL = KUrl("man:(n)") kdevelop(17159)/kdevelop (cpp support) Cpp::SpecialTemplateDeclaration<BaseDeclaration>::resolve: Problem in template forward-declaration kdevelop(17159)/kdevelop (cpp support) Cpp::SpecialTemplateDeclaration<BaseDeclaration>::resolve: Problem in template forward-declaration kdevelop(17159)/kdevelop (cpp support) Cpp::SpecialTemplateDeclaration<BaseDeclaration>::resolve: Problem in template forward-declaration ==17159== Invalid read of size 8 ==17159== at 0xC0755B0: KDevelop::ProjectBaseItem::project() const (projectmodel.cpp:358) ==17159== by 0xC085610: KDevelop::AbstractFileManagerPlugin::Private::jobFinished(KJob*) (abstractfilemanagerplugin.cpp:137) ==17159== by 0xC0868B8: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:121) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE567E: KJob::finished(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE5854: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0xC087B17: KDevelop::FileManagerListJob::slotResult(KJob*) (filemanagerlistjob.cpp:83) ==17159== by 0xC087CB3: KDevelop::FileManagerListJob::qt_metacall(QMetaObject::Call, int, void**) (filemanagerlistjob.moc:88) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE5821: KJob::result(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE585F: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x59BEEEC: KIO::SimpleJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59BF3F4: KIO::ListJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x58AA375: KIO::SimpleJob::slotError(int, QString const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x58AAFC7: KIO::SimpleJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5995FEF: KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x58BD275: KIO::SlaveInterface::error(int, QString const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59C7E3C: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593A242: KIO::SlaveInterface::dispatch() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5935985: KIO::Slave::gotInput() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593E12B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x593DF06: ??? (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593DFBC: KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D794D9: QObject::event(QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x947EC73: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x9487209: QApplication::notify(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x84F37D5: KApplication::notify(QObject*, QEvent*) (in /usr/lib64/libkdeui.so.5.5.0) ==17159== by 0x4052B8: KDevelopApplication::notify(QObject*, QEvent*) (main.cpp:90) ==17159== by 0x8D6560B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D68E04: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D90162: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0xF36F082: g_main_context_dispatch (gmain.c:2149) ==17159== by 0xF36F85F: g_main_context_iterate (gmain.c:2780) ==17159== by 0xF36FAFF: g_main_context_iteration (gmain.c:2843) ==17159== by 0x8D902FE: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x95245BD: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x8D64A41: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D64C54: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D690BA: QCoreApplication::exec() (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x40BA1A: main (main.cpp:468) ==17159== Address 0x1f1f8cc8 is 8 bytes inside a block of size 16 free'd ==17159== at 0x4C2638E: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17159== by 0x3600AA07: DeclarationBuilder::eventuallyAssignInternalContext() (declarationbuilder.cpp:1648) ==17159== by 0x3600AFE5: DeclarationBuilder::closeDeclaration(bool) (declarationbuilder.cpp:793) ==17159== by 0x3600F633: DeclarationBuilder::visitDeclarator(DeclaratorAST*) (declarationbuilder.cpp:434) ==17159== by 0x35FF93C1: ContextBuilder::visitInitDeclarator(InitDeclaratorAST*) (contextbuilder.cpp:891) ==17159== by 0x3600962A: DeclarationBuilder::visitInitDeclarator(InitDeclaratorAST*) (declarationbuilder.cpp:229) ==17159== by 0x36038C4E: TypeBuilder::visitSimpleDeclaration(SimpleDeclarationAST*) (typebuilder.cpp:551) ==17159== by 0x3600A042: DeclarationBuilder::visitSimpleDeclaration(SimpleDeclarationAST*) (declarationbuilder.cpp:315) ==17159== by 0x35FF8C5A: ContextBuilder::visitTemplateDeclaration(TemplateDeclarationAST*) (contextbuilder.cpp:292) ==17159== by 0x362EEE65: void visitNodes<DeclarationAST*>(Visitor*, ListNode<DeclarationAST*> const*) (visitor.h:129) ==17159== by 0x35FF67B1: ContextBuilder::visitNamespace(NamespaceAST*) (contextbuilder.cpp:472) ==17159== by 0x3600C016: DeclarationBuilder::visitNamespace(NamespaceAST*) (declarationbuilder.cpp:975) ==17159== by 0x362EEE65: void visitNodes<DeclarationAST*>(Visitor*, ListNode<DeclarationAST*> const*) (visitor.h:129) ==17159== by 0x35FFB6F0: KDevelop::AbstractContextBuilder<AST, NameAST>::supportBuild(AST*, KDevelop::DUContext*) (abstractcontextbuilder.h:133) ==17159== by 0x35FFA844: ContextBuilder::buildContexts(KSharedPtr<Cpp::EnvironmentFile>, AST*, QList<LineContextPair>*, KDevelop::ReferencedTopDUContext const&, bool) (contextbuilder.cpp:421) ==17159== by 0x360083F0: DeclarationBuilder::buildDeclarations(KSharedPtr<Cpp::EnvironmentFile>, AST*, QList<LineContextPair>*, KDevelop::ReferencedTopDUContext const&, bool) (declarationbuilder.cpp:91) ==17159== by 0x35AB5068: CPPInternalParseJob::run() (cppparsejob.cpp:639) ==17159== by 0x35ABAF26: PreprocessJob::sourceNeeded(QString&, rpp::Preprocessor::IncludeType, int, bool) (preprocessjob.cpp:593) ==17159== by 0x35D8B50F: rpp::pp::handle_include(bool, rpp::Stream&, rpp::Stream&) (pp-engine.cpp:213) ==17159== by 0x35D8E08A: rpp::pp::handle_directive(unsigned int, rpp::Stream&, rpp::Stream&) (pp-engine.cpp:131) ==17159== by 0x35D8E81E: rpp::pp::operator()(rpp::Stream&, rpp::Stream&) (pp-engine.cpp:266) ==17159== by 0x35D8EA50: rpp::pp::processFileInternal(QString const&, QByteArray const&, QVector<unsigned int>&) (pp-engine.cpp:98) ==17159== by 0x35D8EAF4: rpp::pp::processFile(QString const&, QByteArray const&) (pp-engine.cpp:85) ==17159== by 0x35ABD066: PreprocessJob::run() (preprocessjob.cpp:259) ==17159== by 0x35AB23CD: CPPParseJob::parseForeground() (cppparsejob.cpp:173) ==17159== by 0x35ABAF26: PreprocessJob::sourceNeeded(QString&, rpp::Preprocessor::IncludeType, int, bool) (preprocessjob.cpp:593) ==17159== by 0x35D8B50F: rpp::pp::handle_include(bool, rpp::Stream&, rpp::Stream&) (pp-engine.cpp:213) ==17159== by 0x35D8E08A: rpp::pp::handle_directive(unsigned int, rpp::Stream&, rpp::Stream&) (pp-engine.cpp:131) ==17159== by 0x35D8E81E: rpp::pp::operator()(rpp::Stream&, rpp::Stream&) (pp-engine.cpp:266) ==17159== by 0x35D8EA50: rpp::pp::processFileInternal(QString const&, QByteArray const&, QVector<unsigned int>&) (pp-engine.cpp:98) ==17159== by 0x35D8EAF4: rpp::pp::processFile(QString const&, QByteArray const&) (pp-engine.cpp:85) ==17159== by 0x35ABD066: PreprocessJob::run() (preprocessjob.cpp:259) ==17159== by 0x35AB23CD: CPPParseJob::parseForeground() (cppparsejob.cpp:173) ==17159== by 0x35ABAF26: PreprocessJob::sourceNeeded(QString&, rpp::Preprocessor::IncludeType, int, bool) (preprocessjob.cpp:593) ==17159== by 0x35D8B50F: rpp::pp::handle_include(bool, rpp::Stream&, rpp::Stream&) (pp-engine.cpp:213) ==17159== by 0x35D8E08A: rpp::pp::handle_directive(unsigned int, rpp::Stream&, rpp::Stream&) (pp-engine.cpp:131) ==17159== by 0x35D8E81E: rpp::pp::operator()(rpp::Stream&, rpp::Stream&) (pp-engine.cpp:266) ==17159== by 0x35D8EA50: rpp::pp::processFileInternal(QString const&, QByteArray const&, QVector<unsigned int>&) (pp-engine.cpp:98) ==17159== by 0x35D8EAF4: rpp::pp::processFile(QString const&, QByteArray const&) (pp-engine.cpp:85) ==17159== by 0x35ABD066: PreprocessJob::run() (preprocessjob.cpp:259) ==17159== by 0x6562D74: ??? (in /usr/lib64/libthreadweaver.so.4.5.0) ==17159== by 0x6562EAD: ThreadWeaver::Job::execute(ThreadWeaver::Thread*) (in /usr/lib64/libthreadweaver.so.4.5.0) ==17159== by 0x6562F72: ??? (in /usr/lib64/libthreadweaver.so.4.5.0) ==17159== by 0x65627BE: ??? (in /usr/lib64/libthreadweaver.so.4.5.0) ==17159== by 0x6562877: ThreadWeaver::Thread::run() (in /usr/lib64/libthreadweaver.so.4.5.0) ==17159== by 0x8C7A054: QThreadPrivate::start(void*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x90A0A4E: start_thread (pthread_create.c:297) ==17159== by 0xA9DD82C: clone (in /lib64/libc-2.11.2.so) ==17159== ==17159== Conditional jump or move depends on uninitialised value(s) ==17159== at 0xC086CC4: QMap<KDevelop::IProject*, QList<KJob*> >::mutableFindNode(QMapData::Node**, KDevelop::IProject* const&) const (qmap.h:782) ==17159== by 0xC085644: KDevelop::AbstractFileManagerPlugin::Private::jobFinished(KJob*) (qmap.h:529) ==17159== by 0xC0868B8: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:121) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE567E: KJob::finished(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE5854: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0xC087B17: KDevelop::FileManagerListJob::slotResult(KJob*) (filemanagerlistjob.cpp:83) ==17159== by 0xC087CB3: KDevelop::FileManagerListJob::qt_metacall(QMetaObject::Call, int, void**) (filemanagerlistjob.moc:88) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE5821: KJob::result(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE585F: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x59BEEEC: KIO::SimpleJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59BF3F4: KIO::ListJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x58AA375: KIO::SimpleJob::slotError(int, QString const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x58AAFC7: KIO::SimpleJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5995FEF: KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x58BD275: KIO::SlaveInterface::error(int, QString const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59C7E3C: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593A242: KIO::SlaveInterface::dispatch() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5935985: KIO::Slave::gotInput() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593E12B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x593DF06: ??? (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593DFBC: KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D794D9: QObject::event(QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x947EC73: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x9487209: QApplication::notify(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x84F37D5: KApplication::notify(QObject*, QEvent*) (in /usr/lib64/libkdeui.so.5.5.0) ==17159== by 0x4052B8: KDevelopApplication::notify(QObject*, QEvent*) (main.cpp:90) ==17159== by 0x8D6560B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D68E04: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D90162: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0xF36F082: g_main_context_dispatch (gmain.c:2149) ==17159== by 0xF36F85F: g_main_context_iterate (gmain.c:2780) ==17159== by 0xF36FAFF: g_main_context_iteration (gmain.c:2843) ==17159== by 0x8D902FE: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x95245BD: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x8D64A41: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D64C54: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D690BA: QCoreApplication::exec() (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x40BA1A: main (main.cpp:468) ==17159== Uninitialised value was created by a heap allocation ==17159== at 0x4C27682: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==17159== by 0x8C7C169: QByteArray::realloc(int) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8C7CDC0: QByteArray::append(QByteArray const&) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D24111: QUrlPrivate::toEncoded(QFlags<QUrl::FormattingOption>) const (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D24695: QUrlPrivate::validate() const (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D24914: QUrl::isValid() const (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE496A: KUrl::_setEncodedUrl(QByteArray const&) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4F3F0D9: KUrl::KUrl(QString const&) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x316D5712: ManPageModel::sectionParser(QString const&, QString const&) (manpagemodel.cpp:200) ==17159== by 0x316D5A3F: ManPageModel::sectionDataReceived(KJob*) (manpagemodel.cpp:153) ==17159== by 0x316D5C63: ManPageModel::qt_metacall(QMetaObject::Call, int, void**) (manpagemodel.moc:94) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE5821: KJob::result(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE585F: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x59BEEEC: KIO::SimpleJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59BF721: KIO::TransferJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x599ED00: KIO::TransferJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x599EFAF: KIO::StoredTransferJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x59C7DC0: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593A242: KIO::SlaveInterface::dispatch() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5935985: KIO::Slave::gotInput() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593E12B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x593DF06: ??? (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593DFBC: KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D794D9: QObject::event(QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x947EC73: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x9487209: QApplication::notify(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x84F37D5: KApplication::notify(QObject*, QEvent*) (in /usr/lib64/libkdeui.so.5.5.0) ==17159== by 0x4052B8: KDevelopApplication::notify(QObject*, QEvent*) (main.cpp:90) ==17159== by 0x8D6560B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D68E04: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D90162: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0xF36F082: g_main_context_dispatch (gmain.c:2149) ==17159== by 0xF36F85F: g_main_context_iterate (gmain.c:2780) ==17159== by 0xF36FAFF: g_main_context_iteration (gmain.c:2843) ==17159== by 0x8D902FE: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x95245BD: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x8D64A41: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D64C54: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D690BA: QCoreApplication::exec() (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x40BA1A: main (main.cpp:468) ==17159== ==17159== Invalid read of size 8 ==17159== at 0xC0755B4: KDevelop::ProjectBaseItem::project() const (projectmodel.cpp:356) ==17159== by 0xC085610: KDevelop::AbstractFileManagerPlugin::Private::jobFinished(KJob*) (abstractfilemanagerplugin.cpp:137) ==17159== by 0xC0868B8: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:121) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE567E: KJob::finished(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE5854: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0xC087B17: KDevelop::FileManagerListJob::slotResult(KJob*) (filemanagerlistjob.cpp:83) ==17159== by 0xC087CB3: KDevelop::FileManagerListJob::qt_metacall(QMetaObject::Call, int, void**) (filemanagerlistjob.moc:88) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x4EE5821: KJob::result(KJob*) (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x4EE585F: KJob::emitResult() (in /usr/lib64/libkdecore.so.5.5.0) ==17159== by 0x59BEEEC: KIO::SimpleJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59BF3F4: KIO::ListJob::slotFinished() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x58AA375: KIO::SimpleJob::slotError(int, QString const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x58AAFC7: KIO::SimpleJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5995FEF: KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x58BD275: KIO::SlaveInterface::error(int, QString const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x59C7E3C: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593A242: KIO::SlaveInterface::dispatch() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x5935985: KIO::Slave::gotInput() (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593E12B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D7A85E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x593DF06: ??? (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x593DFBC: KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib64/libkio.so.5.5.0) ==17159== by 0x8D794D9: QObject::event(QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x947EC73: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x9487209: QApplication::notify(QObject*, QEvent*) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x84F37D5: KApplication::notify(QObject*, QEvent*) (in /usr/lib64/libkdeui.so.5.5.0) ==17159== by 0x4052B8: KDevelopApplication::notify(QObject*, QEvent*) (main.cpp:90) ==17159== by 0x8D6560B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D68E04: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D90162: postEventSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0xF36F082: g_main_context_dispatch (gmain.c:2149) ==17159== by 0xF36F85F: g_main_context_iterate (gmain.c:2780) ==17159== by 0xF36FAFF: g_main_context_iteration (gmain.c:2843) ==17159== by 0x8D902FE: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x95245BD: QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtGui.so.4.7.2) ==17159== by 0x8D64A41: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D64C54: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x8D690BA: QCoreApplication::exec() (in /usr/lib64/libQtCore.so.4.7.2) ==17159== by 0x40BA1A: main (main.cpp:468) ==17159== Address 0xff949792 is not stack'd, malloc'd or (recently) free'd ==17159== KCrash: Application 'kdevelop' crashing... KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit ock_file=/root/.kde4/socket-linux/kdeinit4__0 ==17159== ==17159== HEAP SUMMARY: ==17159== in use at exit: 97,854,288 bytes in 526,311 blocks ==17159== total heap usage: 4,167,050 allocs, 3,640,739 frees, 1,129,386,417 bytes allocated ==17159== ==17159== LEAK SUMMARY: ==17159== definitely lost: 14,353 bytes in 46 blocks ==17159== indirectly lost: 65,686 bytes in 2,013 blocks ==17159== possibly lost: 5,015,462 bytes in 73,411 blocks ==17159== still reachable: 92,758,787 bytes in 450,841 blocks ==17159== suppressed: 0 bytes in 0 blocks ==17159== Rerun with --leak-check=full to see details of leaked memory ==17159== ==17159== For counts of detected and suppressed errors, rerun with: -v ==17159== ERROR SUMMARY: 4 errors from 3 contexts (suppressed: 48 from 11) ugh ugly, nothing useful shown - except that the pointer is invalid :-S is that project FOSSn / publically available, i.e. could I try to open it myself in kdevelop and run configure like you do? The results above were obtained after opening this project: http://gsmartcontrol.berlios.de/ http://prdownload.berlios.de/gsmartcontrol/gsmartcontrol-0.8.5.tar.bz2?download There's no kdev4 project file in there, just import it choosing Generic Project Manager. Then, from the project directory, run "mkdir build; cd build; ../configure". If it doesn't crash the first time, remove the build directory and repeat. I was able to trigger the bug with another (non-public) project of mine as well. Thanks confirmed useful valgrind info: ==13667== Invalid read of size 8 ==13667== at 0xBF7B8F2: QListData::size() const (qlist.h:94) ==13667== by 0xBF7CCC5: QList<KDevelop::ProjectBaseItem*>::count() const (qlist.h:267) ==13667== by 0xBF78635: KDevelop::ProjectBaseItem::appendRow(KDevelop::ProjectBaseItem*) (projectmodel.cpp:378) ==13667== by 0xBF7682E: KDevelop::ProjectBaseItem::ProjectBaseItem(KDevelop::IProject*, QString const&, KDevelop::ProjectBaseItem*) (projectmodel.cpp:136) ==13667== by 0xBF79677: KDevelop::ProjectFileItem::ProjectFileItem(KDevelop::IProject*, KUrl const&, KDevelop::ProjectBaseItem*) (projectmodel.cpp:621) ==13667== by 0xBF8DAB8: KDevelop::AbstractFileManagerPlugin::createFileItem(KDevelop::IProject*, KUrl const&, KDevelop::ProjectBaseItem*) (abstractfilemanagerplugin.cpp:491) ==13667== by 0xBF8B0EE: KDevelop::AbstractFileManagerPlugin::Private::addJobItems(KDevelop::FileManagerListJob*, KDevelop::ProjectFolderItem*, QList<KIO::UDSEntry> const&, bool) (abstractfilemanagerplugin.cpp:223) ==13667== by 0xBF8DE93: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:117) ==13667== by 0x248FC8D6: GenericProjectManager::qt_metacall(QMetaObject::Call, int, void**) (genericmanager.moc:66) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0xBF91252: KDevelop::FileManagerListJob::entries(KDevelop::FileManagerListJob*, KDevelop::ProjectFolderItem*, QList<KIO::UDSEntry> const&, bool) (filemanagerlistjob.moc:101) ==13667== by 0xBF90EB9: KDevelop::FileManagerListJob::slotResult(KJob*) (filemanagerlistjob.cpp:75) ==13667== by 0xBF911B0: KDevelop::FileManagerListJob::qt_metacall(QMetaObject::Call, int, void**) (filemanagerlistjob.moc:88) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x4F56161: KJob::result(KJob*) (in /usr/lib/libkdecore.so.5.5.0) ==13667== by 0x4F5619F: KJob::emitResult() (in /usr/lib/libkdecore.so.5.5.0) ==13667== by 0x594F02C: KIO::SimpleJob::slotFinished() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x5951C24: KIO::ListJob::slotFinished() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59558F8: KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x59F7160: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59F4092: KIO::SlaveInterface::dispatch() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59E7765: KIO::Slave::gotInput() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59E7D7B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x59206A6: ??? (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x592075C: KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x8E65179: QObject::event(QEvent*) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x95582B3: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.7.1) ==13667== by 0x955CDC9: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.7.1) ==13667== by 0x866A305: KApplication::notify(QObject*, QEvent*) (in /usr/lib/libkdeui.so.5.5.0) ==13667== by 0x4052EB: KDevelopApplication::notify(QObject*, QEvent*) (main.cpp:90) ==13667== by 0x8E50E9B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E546C4: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E7BD72: ??? (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0xF4CCBF2: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2600.1) ==13667== by 0xF4CD3CF: ??? (in /usr/lib/libglib-2.0.so.0.2600.1) ==13667== by 0xF4CD66C: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.2600.1) ==13667== by 0x8E7BF0E: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x95FD1AD: ??? (in /usr/lib/libQtGui.so.4.7.1) ==13667== by 0x8E50231: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E5047B: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E5497A: QCoreApplication::exec() (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x40B7D3: main (main.cpp:468) ==13667== Address 0x17ef0d98 is 24 bytes inside a block of size 72 free'd ==13667== at 0x4C23F8E: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==13667== by 0xBF7690E: KDevelop::ProjectBaseItem::~ProjectBaseItem() (projectmodel.cpp:150) ==13667== by 0xBF78F97: KDevelop::ProjectFolderItem::~ProjectFolderItem() (projectmodel.cpp:514) ==13667== by 0xBF78FC9: KDevelop::ProjectFolderItem::~ProjectFolderItem() (projectmodel.cpp:516) ==13667== by 0xBF770FB: KDevelop::ProjectBaseItem::removeRow(int) (projectmodel.cpp:194) ==13667== by 0xBF8AF62: KDevelop::AbstractFileManagerPlugin::Private::addJobItems(KDevelop::FileManagerListJob*, KDevelop::ProjectFolderItem*, QList<KIO::UDSEntry> const&, bool) (abstractfilemanagerplugin.cpp:196) ==13667== by 0xBF8DE93: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:117) ==13667== by 0x248FC8D6: GenericProjectManager::qt_metacall(QMetaObject::Call, int, void**) (genericmanager.moc:66) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0xBF91252: KDevelop::FileManagerListJob::entries(KDevelop::FileManagerListJob*, KDevelop::ProjectFolderItem*, QList<KIO::UDSEntry> const&, bool) (filemanagerlistjob.moc:101) ==13667== by 0xBF90EB9: KDevelop::FileManagerListJob::slotResult(KJob*) (filemanagerlistjob.cpp:75) ==13667== by 0xBF911B0: KDevelop::FileManagerListJob::qt_metacall(QMetaObject::Call, int, void**) (filemanagerlistjob.moc:88) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x4F56161: KJob::result(KJob*) (in /usr/lib/libkdecore.so.5.5.0) ==13667== by 0x4F5619F: KJob::emitResult() (in /usr/lib/libkdecore.so.5.5.0) ==13667== by 0x594F02C: KIO::SimpleJob::slotFinished() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x5951C24: KIO::ListJob::slotFinished() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59558F8: KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x59F7160: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59F4092: KIO::SlaveInterface::dispatch() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59E7765: KIO::Slave::gotInput() (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x59E7D7B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x8E6631E: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x59206A6: ??? (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x592075C: KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.5.0) ==13667== by 0x8E65179: QObject::event(QEvent*) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x95582B3: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.7.1) ==13667== by 0x955CDC9: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.7.1) ==13667== by 0x866A305: KApplication::notify(QObject*, QEvent*) (in /usr/lib/libkdeui.so.5.5.0) ==13667== by 0x4052EB: KDevelopApplication::notify(QObject*, QEvent*) (main.cpp:90) ==13667== by 0x8E50E9B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E546C4: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E7BD72: ??? (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0xF4CCBF2: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.2600.1) ==13667== by 0xF4CD3CF: ??? (in /usr/lib/libglib-2.0.so.0.2600.1) ==13667== by 0xF4CD66C: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.2600.1) ==13667== by 0x8E7BF0E: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x95FD1AD: ??? (in /usr/lib/libQtGui.so.4.7.1) ==13667== by 0x8E50231: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E5047B: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x8E5497A: QCoreApplication::exec() (in /usr/lib/libQtCore.so.4.7.1) ==13667== by 0x40B7D3: main (main.cpp:468) commit f31b03524934e15956f072aad499833f6568cb8d branch 1.2 Author: Milian Wolff <mail@milianw.de> Date: Thu Dec 23 15:16:25 2010 +0100 make sure we compare dir urls with trialing slash CCBUG: 260741 diff --git a/project/abstractfilemanagerplugin.cpp b/project/abstractfilemanagerplugin.cpp index 45579a9..e469bd3 100644 --- a/project/abstractfilemanagerplugin.cpp +++ b/project/abstractfilemanagerplugin.cpp @@ -159,6 +159,9 @@ void AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job, KUrl url = baseItem->url(); url.addPath( name ); + if (entry.isDir()) { + url.adjustPath(KUrl::AddTrailingSlash); + } if ( !q->isValid( url, entry.isDir(), baseItem->project() ) ) { continue; commit c8871f1131b99f79bd1fe96ddc74b0962086e9c2 branch 1.2 Author: Milian Wolff <mail@milianw.de> Date: Thu Dec 23 15:40:28 2010 +0100 kill running import jobs for removed folders BUG: 260741 diff --git a/project/abstractfilemanagerplugin.cpp b/project/abstractfilemanagerplugin.cpp index e469bd3..cd5b229 100644 --- a/project/abstractfilemanagerplugin.cpp +++ b/project/abstractfilemanagerplugin.cpp @@ -93,8 +93,10 @@ struct AbstractFileManagerPlugin::Private { /// Common renaming function. bool rename( ProjectBaseItem* item, const KUrl& destination); + void removeFolder(ProjectFolderItem* folder); + QMap<IProject*, KDirWatch*> m_watchers; - QMap<IProject*, QList<KJob*> > m_projectJobs; + QMap<IProject*, QList<FileManagerListJob*> > m_projectJobs; }; void AbstractFileManagerPlugin::Private::projectClosing(IProject* project) @@ -102,7 +104,7 @@ void AbstractFileManagerPlugin::Private::projectClosing(IProject* project) if ( m_projectJobs.contains(project) ) { // make sure the import job does not live longer than the project // see also addLotsOfFiles test - foreach( KJob* job, m_projectJobs[project] ) { + foreach( FileManagerListJob* job, m_projectJobs[project] ) { kDebug(9517) << "killing project job:" << job; job->kill(); } @@ -116,7 +118,7 @@ KJob* AbstractFileManagerPlugin::Private::eventuallyReadFolder( ProjectFolderIte { FileManagerListJob* listJob = new FileManagerListJob( item, forceRecursion ); m_projectJobs[ item->project() ] << listJob; - kDebug(9517) << "adding job" << listJob << item->url() << "for project" << item->project(); + kDebug(9517) << "adding job" << listJob << item << item->url() << "for project" << item->project(); ICore::self()->runController()->registerJob( listJob ); @@ -133,8 +135,8 @@ void AbstractFileManagerPlugin::Private::jobFinished(KJob* job) { FileManagerListJob* gmlJob = qobject_cast<FileManagerListJob*>(job); Q_ASSERT(gmlJob); - kDebug(9517) << gmlJob; - m_projectJobs[ gmlJob->item()->project() ].removeOne( job ); + kDebug() << job << gmlJob; + m_projectJobs[ gmlJob->item()->project() ].removeOne( gmlJob ); } void AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job, @@ -195,8 +197,7 @@ void AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job, int index = folders.indexOf( f->url() ); if ( index == -1 ) { // folder got removed or is now invalid - ifDebug(kDebug(9517) << "removing folder:" << f->url();) - baseItem->removeRow( j ); + removeFolder(f); --j; } else { // this folder already exists in the view @@ -211,7 +212,7 @@ void AbstractFileManagerPlugin::Private::addJobItems(FileManagerListJob* job, int index = files.indexOf( f->url() ); if ( index == -1 ) { // file got removed or is now invalid - ifDebug(kDebug(9517) << "removing file:" << f->url();) + ifDebug(kDebug(9517) << "removing file:" << f << f->url();) baseItem->removeRow( j ); --j; } else { @@ -239,15 +240,29 @@ void AbstractFileManagerPlugin::Private::created(const QString &path) QFileInfo info(path); KUrl url = KUrl(path); + if (info.isDir()) { + url.adjustPath(KUrl::AddTrailingSlash); + } KUrl parent = url.upUrl(); foreach ( IProject* p, m_watchers.keys() ) { if ( !q->isValid(url, info.isDir(), p) ) { continue; } - if ( !p->foldersForUrl(url).isEmpty() || !p->filesForUrl(url).isEmpty() ) { - // exists already in this project, happens e.g. when we restart the dirwatcher - // for files it also gets triggered for kate's backup files + if ( info.isDir() ) { + bool found = false; + foreach ( ProjectFolderItem* folder, p->foldersForUrl(url) ) { + // exists already in this project, happens e.g. when we restart the dirwatcher + // or if we delete and remove folders consecutively https://bugs.kde.org/show_bug.cgi?id=260741 + kDebug(9517) << "force reload of" << url << folder; + eventuallyReadFolder( folder, true ); + found = true; + } + if ( found ) { + continue; + } + } else if (!p->filesForUrl(url).isEmpty()) { + // also gets triggered for kate's backup files continue; } foreach ( ProjectFolderItem* parentItem, p->foldersForUrl(parent) ) { @@ -283,11 +298,11 @@ void AbstractFileManagerPlugin::Private::deleted(const QString &path) continue; } foreach ( ProjectFolderItem* item, p->foldersForUrl(url) ) { - emit q->folderRemoved(item); - item->parent()->removeRow(item->row()); + removeFolder(item); } foreach ( ProjectFileItem* item, p->filesForUrl(url) ) { emit q->fileRemoved(item); + ifDebug(kDebug(9517) << "removing file" << item;) item->parent()->removeRow(item->row()); } } @@ -346,6 +361,18 @@ void AbstractFileManagerPlugin::Private::continueWatcher(ProjectFolderItem* fold m_watchers[folder->project()]->restartDirScan(folder->url().toLocalFile()); } +void AbstractFileManagerPlugin::Private::removeFolder(ProjectFolderItem* folder) +{ + ifDebug(kDebug(9517) << "removing folder:" << folder << folder->url();) + foreach(FileManagerListJob* job, m_projectJobs[folder->project()]) { + if (job->item() == folder) { + kDebug(9517) << "killing list job for removed folder" << job << folder->url(); + job->kill(); + } + } + folder->parent()->removeRow( folder->row() ); +} + //END Private //BEGIN Plugin alexander, please test these patches (they are in 1.2 and master branch of kdevplatform). reopen if it's still broken for you. Got a crash after several attempts (git 4.2 branch, 2010-12-23). Note that after removing all files in the build directory, KDevelop's project tree still showed some of them. Not sure if it's related (should I file another bug?) I can compile KDevelop & friends with debug support, if that helps. Output from KDE crash handler: Application: KDevelop (kdevelop), signal: Segmentation fault [Current thread is 1 (Thread 0x7f89ece82760 (LWP 9691))] Thread 12 (Thread 0x7f89d5ff0710 (LWP 9724)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:211 #1 0x00007f89e8ad26a2 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89e5281e0b in KDevelop::DUChainPrivate::CleanupThread::run (this=0x98a400) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/language/duchain/duchain.cpp:286 #3 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #4 0x00007f89e8841a4f in start_thread (arg=0x7f89d5ff0710) at pthread_create.c:297 #5 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #6 0x0000000000000000 in ?? () Thread 11 (Thread 0x7f89cf3f0710 (LWP 9748)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e8ad273b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89eb3913f6 in ?? () from /usr/lib64/libthreadweaver.so.4 #3 0x00007f89eb393e45 in ?? () from /usr/lib64/libthreadweaver.so.4 #4 0x00007f89eb393e5e in ?? () from /usr/lib64/libthreadweaver.so.4 #5 0x00007f89eb393e5e in ?? () from /usr/lib64/libthreadweaver.so.4 #6 0x00007f89eb3917ef in ?? () from /usr/lib64/libthreadweaver.so.4 #7 0x00007f89eb391878 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #8 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #9 0x00007f89e8841a4f in start_thread (arg=0x7f89cf3f0710) at pthread_create.c:297 #10 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #11 0x0000000000000000 in ?? () Thread 10 (Thread 0x7f89c9400710 (LWP 9766)): #0 0x00007f89e6f4d6b3 in poll () from /lib64/libc.so.6 #1 0x00007f89e25225c4 in g_main_context_poll (context=0x27dbca0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:3093 #2 g_main_context_iterate (context=0x27dbca0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2775 #3 0x00007f89e2522b00 in g_main_context_iteration (context=0x27dbca0, may_block=1) at gmain.c:2843 #4 0x00007f89e8be8376 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #5 0x00007f89e8bbca62 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #6 0x00007f89e8bbcc75 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #7 0x00007f89e8acf774 in QThread::exec() () from /usr/lib64/libQtCore.so.4 #8 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #9 0x00007f89e8841a4f in start_thread (arg=0x7f89c9400710) at pthread_create.c:297 #10 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #11 0x0000000000000000 in ?? () Thread 9 (Thread 0x7f89c9c01710 (LWP 9905)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e0f9e494 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /usr/lib64/libQtWebKit.so.4 #2 0x00007f89e8841a4f in start_thread (arg=0x7f89c9c01710) at pthread_create.c:297 #3 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #4 0x0000000000000000 in ?? () Thread 8 (Thread 0x7f89c8bff710 (LWP 9962)): #0 0x00007f89e88440b4 in __pthread_mutex_lock (mutex=0x3bc1448) at pthread_mutex_lock.c:61 #1 0x00007f89e2521d32 in g_main_context_check (context=0x3bc1440, max_priority=2147483647, fds=<value optimized out>, n_fds=<value optimized out>) at gmain.c:2660 #2 0x00007f89e25225e2 in g_main_context_iterate (context=0x3bc1440, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2777 #3 0x00007f89e2522b00 in g_main_context_iteration (context=0x3bc1440, may_block=1) at gmain.c:2843 #4 0x00007f89e8be8376 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #5 0x00007f89e8bbca62 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #6 0x00007f89e8bbcc75 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #7 0x00007f89e8acf774 in QThread::exec() () from /usr/lib64/libQtCore.so.4 #8 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #9 0x00007f89e8841a4f in start_thread (arg=0x7f89c8bff710) at pthread_create.c:297 #10 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #11 0x0000000000000000 in ?? () Thread 7 (Thread 0x7f89ca402710 (LWP 9963)): #0 0x00007fff6e3596e7 in ?? () #1 0x00007f89e62132a3 in clock_gettime (clock_id=1, tp=0x7f89ca401b60) at ../sysdeps/unix/clock_gettime.c:100 #2 0x00007f89e8b24b42 in qt_gettime() () from /usr/lib64/libQtCore.so.4 #3 0x00007f89e8be8d3d in QTimerInfoList::updateCurrentTime() () from /usr/lib64/libQtCore.so.4 #4 0x00007f89e8be90c5 in QTimerInfoList::timerWait(timeval&) () from /usr/lib64/libQtCore.so.4 #5 0x00007f89e8be7b7c in timerSourcePrepareHelper(GTimerSource*, int*) () from /usr/lib64/libQtCore.so.4 #6 0x00007f89e8be7c25 in timerSourcePrepare(_GSource*, int*) () from /usr/lib64/libQtCore.so.4 #7 0x00007f89e252156f in g_main_context_prepare (context=0x3bd30c0, priority=0x7f89ca401cfc) at gmain.c:2469 #8 0x00007f89e2522459 in g_main_context_iterate (context=0x3bd30c0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2760 #9 0x00007f89e2522b00 in g_main_context_iteration (context=0x3bd30c0, may_block=1) at gmain.c:2843 #10 0x00007f89e8be8376 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #11 0x00007f89e8bbca62 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #12 0x00007f89e8bbcc75 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #13 0x00007f89e8acf774 in QThread::exec() () from /usr/lib64/libQtCore.so.4 #14 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #15 0x00007f89e8841a4f in start_thread (arg=0x7f89ca402710) at pthread_create.c:297 #16 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #17 0x0000000000000000 in ?? () Thread 6 (Thread 0x7f89b6a5a710 (LWP 9984)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e8ad273b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89eb3913f6 in ?? () from /usr/lib64/libthreadweaver.so.4 #3 0x00007f89eb393e45 in ?? () from /usr/lib64/libthreadweaver.so.4 #4 0x00007f89eb3917ef in ?? () from /usr/lib64/libthreadweaver.so.4 #5 0x00007f89eb391878 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #6 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #7 0x00007f89e8841a4f in start_thread (arg=0x7f89b6a5a710) at pthread_create.c:297 #8 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #9 0x0000000000000000 in ?? () Thread 5 (Thread 0x7f89b6259710 (LWP 9986)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e8ad273b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89eb3913f6 in ?? () from /usr/lib64/libthreadweaver.so.4 #3 0x00007f89eb393e45 in ?? () from /usr/lib64/libthreadweaver.so.4 #4 0x00007f89eb393e5e in ?? () from /usr/lib64/libthreadweaver.so.4 #5 0x00007f89eb3917ef in ?? () from /usr/lib64/libthreadweaver.so.4 #6 0x00007f89eb391878 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #7 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #8 0x00007f89e8841a4f in start_thread (arg=0x7f89b6259710) at pthread_create.c:297 #9 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? () Thread 4 (Thread 0x7f89b5a58710 (LWP 9997)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e8ad273b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89eb3913f6 in ?? () from /usr/lib64/libthreadweaver.so.4 #3 0x00007f89eb393e45 in ?? () from /usr/lib64/libthreadweaver.so.4 #4 0x00007f89eb3917ef in ?? () from /usr/lib64/libthreadweaver.so.4 #5 0x00007f89eb391878 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #6 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #7 0x00007f89e8841a4f in start_thread (arg=0x7f89b5a58710) at pthread_create.c:297 #8 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #9 0x0000000000000000 in ?? () Thread 3 (Thread 0x7f89b5257710 (LWP 9998)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e8ad273b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89eb3913f6 in ?? () from /usr/lib64/libthreadweaver.so.4 #3 0x00007f89eb393e45 in ?? () from /usr/lib64/libthreadweaver.so.4 #4 0x00007f89eb393e5e in ?? () from /usr/lib64/libthreadweaver.so.4 #5 0x00007f89eb3917ef in ?? () from /usr/lib64/libthreadweaver.so.4 #6 0x00007f89eb391878 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #7 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #8 0x00007f89e8841a4f in start_thread (arg=0x7f89b5257710) at pthread_create.c:297 #9 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? () Thread 2 (Thread 0x7f89b3f22710 (LWP 18944)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f89e8ad273b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4 #2 0x00007f89eb3913f6 in ?? () from /usr/lib64/libthreadweaver.so.4 #3 0x00007f89eb393e45 in ?? () from /usr/lib64/libthreadweaver.so.4 #4 0x00007f89eb393e5e in ?? () from /usr/lib64/libthreadweaver.so.4 #5 0x00007f89eb3917ef in ?? () from /usr/lib64/libthreadweaver.so.4 #6 0x00007f89eb391878 in ThreadWeaver::Thread::run() () from /usr/lib64/libthreadweaver.so.4 #7 0x00007f89e8ad2055 in QThreadPrivate::start(void*) () from /usr/lib64/libQtCore.so.4 #8 0x00007f89e8841a4f in start_thread (arg=0x7f89b3f22710) at pthread_create.c:297 #9 0x00007f89e6f5682d in clone () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? () Thread 1 (Thread 0x7f89ece82760 (LWP 9691)): [KCrash Handler] #6 0x00007f89e8b7214b in QUrl::QUrl(QUrl const&) () from /usr/lib64/libQtCore.so.4 #7 0x00007f89ec8eeab9 in KUrl::KUrl(KUrl const&) () from /usr/lib64/libkdecore.so.5 #8 0x00007f89e58786c1 in KDevelop::ProjectBaseItem::url (this=<value optimized out>) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/project/projectmodel.cpp:389 #9 0x00007f89e5889417 in KDevelop::AbstractFileManagerPlugin::Private::addJobItems (this=0x244f5c0, job=0x26f73c0, baseItem=0x4eca260, entries=<value optimized out>, forceRecursion=false) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/project/abstractfilemanagerplugin.cpp:162 #10 0x00007f89e588a1c7 in KDevelop::AbstractFileManagerPlugin::qt_metacall (this=0x2458a60, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7fff6e240160) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/0build2/project/abstractfilemanagerplugin.moc:117 #11 0x00007f89e8bd287f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4 #12 0x00007f89e588b1e2 in KDevelop::FileManagerListJob::entries (this=<value optimized out>, _t1=0x26f73c0, _t2=0x4eca260, _t3=<value optimized out>, _t4=false) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/0build2/project/filemanagerlistjob.moc:101 #13 0x00007f89e588b276 in KDevelop::FileManagerListJob::slotResult (this=0x26f73c0, job=0x3ac7b10) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/project/filemanagerlistjob.cpp:75 #14 0x00007f89e588b514 in KDevelop::FileManagerListJob::qt_metacall (this=0x26f73c0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7fff6e240310) at /0S/0tmp/DL-CVS/kdevelop/kdevplatform.p/0build2/project/filemanagerlistjob.moc:88 #15 0x00007f89e8bd287f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4 #16 0x00007f89ec8f1822 in KJob::result(KJob*) () from /usr/lib64/libkdecore.so.5 #17 0x00007f89ec8f1860 in KJob::emitResult() () from /usr/lib64/libkdecore.so.5 #18 0x00007f89ec05feed in KIO::SimpleJob::slotFinished() () from /usr/lib64/libkio.so.5 #19 0x00007f89ec0603f5 in KIO::ListJob::slotFinished() () from /usr/lib64/libkio.so.5 #20 0x00007f89ec0370e9 in KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkio.so.5 #21 0x00007f89e8bd287f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4 #22 0x00007f89ec068dc1 in KIO::SlaveInterface::dispatch(int, QByteArray const&) () from /usr/lib64/libkio.so.5 #23 0x00007f89ebfdb243 in KIO::SlaveInterface::dispatch() () from /usr/lib64/libkio.so.5 #24 0x00007f89ebfd6986 in KIO::Slave::gotInput() () from /usr/lib64/libkio.so.5 #25 0x00007f89ebfdf12c in KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkio.so.5 #26 0x00007f89e8bd287f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/libQtCore.so.4 #27 0x00007f89ebfdef07 in ?? () from /usr/lib64/libkio.so.5 #28 0x00007f89ebfdefbd in KIO::Connection::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib64/libkio.so.5 #29 0x00007f89e8bd14fa in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4 #30 0x00007f89e7d7ec94 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4 #31 0x00007f89e7d8722a in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4 #32 0x00007f89e92e97d6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5 #33 0x00000000004052b9 in KDevelopApplication::notify (this=0x7fff6e241830, receiver=0x56d5df0, event=0x4ae3b10) at /0S/0tmp/DL-CVS/kdevelop/kdevelop/app/main.cpp:90 #34 0x00007f89e8bbd62c in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4 #35 0x00007f89e8bc0e25 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4 #36 0x00007f89e8be8183 in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQtCore.so.4 #37 0x00007f89e2522083 in g_main_dispatch (context=0x63fc40) at gmain.c:2149 #38 g_main_context_dispatch (context=0x63fc40) at gmain.c:2702 #39 0x00007f89e2522860 in g_main_context_iterate (context=0x63fc40, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2780 #40 0x00007f89e2522b00 in g_main_context_iteration (context=0x63fc40, may_block=1) at gmain.c:2843 #41 0x00007f89e8be831f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #42 0x00007f89e7e245de in QGuiEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtGui.so.4 #43 0x00007f89e8bbca62 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #44 0x00007f89e8bbcc75 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4 #45 0x00007f89e8bc10db in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4 #46 0x000000000040ba1b in main (argc=<value optimized out>, argv=0x7fff6e243728) at /0S/0tmp/DL-CVS/kdevelop/kdevelop/app/main.cpp:468 more valgrind ahead of me then - not sure when I can get around to it. Tough one :-/ bye, happy new year *** Bug 261994 has been marked as a duplicate of this bug. *** *** Bug 280231 has been marked as a duplicate of this bug. *** *** Bug 283966 has been marked as a duplicate of this bug. *** updated valgrind trace: ==7331== Invalid read of size 8 ==7331== at 0xACF6166: KDevelop::ProjectBaseItem::d_func() const (projectmodel.h:218) ==7331== by 0xACF217D: KDevelop::ProjectBaseItem::project() const (projectmodel.cpp:394) ==7331== by 0xAD04995: KDevelop::AbstractFileManagerPlugin::Private::jobFinished(KJob*) (abstractfilemanagerplugin.cpp:139) ==7331== by 0xAD087CC: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:121) ==7331== by 0x2D227711: GenericProjectManager::qt_metacall(QMetaObject::Call, int, void**) (genericmanager.moc:66) ==7331== by 0x7BCA5E9: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x4F6D59E: KJob::finished(KJob*) (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0x4F6D774: KJob::emitResult() (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0xAD0B794: KDevelop::FileManagerListJob::slotResult(KJob*) (filemanagerlistjob.cpp:83) ==7331== by 0xAD0B95D: KDevelop::FileManagerListJob::qt_metacall(QMetaObject::Call, int, void**) (filemanagerlistjob.moc:88) ==7331== by 0x7BCA5E9: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x4F6D741: KJob::result(KJob*) (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0x4F6D77F: KJob::emitResult() (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0x5408243: KIO::SimpleJob::slotFinished() (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x540D144: KIO::ListJob::slotFinished() (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x5408395: KIO::SimpleJob::slotError(int, QString const&) (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x540BB47: KIO::SimpleJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x541230F: KIO::ListJob::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x7BCA5E9: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x54B2F55: KIO::SlaveInterface::error(int, QString const&) (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x54B5F0B: KIO::SlaveInterface::dispatch(int, QByteArray const&) (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x54B2754: KIO::SlaveInterface::dispatch() (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x54A591D: KIO::Slave::gotInput() (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x54A607B: KIO::Slave::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkio.so.5.7.0) ==7331== by 0x7BCA5E9: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.4) ==7331== Address 0x1f5d65c8 is 8 bytes inside a block of size 16 free'd ==7331== at 0x4C2772C: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7331== by 0xACF3113: KDevelop::ProjectFolderItem::~ProjectFolderItem() (projectmodel.cpp:567) ==7331== by 0xACF0DB9: KDevelop::ProjectBaseItem::removeRow(int) (projectmodel.cpp:206) ==7331== by 0xAD06AB5: KDevelop::AbstractFileManagerPlugin::Private::removeFolder(KDevelop::ProjectFolderItem*) (abstractfilemanagerplugin.cpp:373) ==7331== by 0xAD05E0E: KDevelop::AbstractFileManagerPlugin::Private::deleted(QString const&) (abstractfilemanagerplugin.cpp:301) ==7331== by 0xAD08766: KDevelop::AbstractFileManagerPlugin::qt_metacall(QMetaObject::Call, int, void**) (abstractfilemanagerplugin.moc:118) ==7331== by 0x2D227711: GenericProjectManager::qt_metacall(QMetaObject::Call, int, void**) (genericmanager.moc:66) ==7331== by 0x7BCA5E9: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x4F4BA74: KDirWatch::deleted(QString const&) (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0x4F4BAB5: KDirWatch::setDeleted(QString const&) (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0x4F4BBA4: KDirWatch::qt_metacall(QMetaObject::Call, int, void**) (in /usr/lib/libkdecore.so.5.7.0) ==7331== by 0x7BCE18D: QObject::event(QEvent*) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x82C1AE3: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.7.4) ==7331== by 0x82C6950: QApplication::notify(QObject*, QEvent*) (in /usr/lib/libQtGui.so.4.7.4) ==7331== by 0x73ACBB5: KApplication::notify(QObject*, QEvent*) (in /usr/lib/libkdeui.so.5.7.0) ==7331== by 0x7BB789B: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x7BBAC2E: QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x7BE21A2: ??? (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0xE03684C: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3000.2) ==7331== by 0xE037047: ??? (in /usr/lib/libglib-2.0.so.0.3000.2) ==7331== by 0xE037218: g_main_context_iteration (in /usr/lib/libglib-2.0.so.0.3000.2) ==7331== by 0x7BE2605: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x8364EED: ??? (in /usr/lib/libQtGui.so.4.7.4) ==7331== by 0x7BB6A91: QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.4) ==7331== by 0x7BB6C96: QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/libQtCore.so.4.7.4) ==7331== Git commit 19d9907d73f342debc2654cdf044b9a48a15798c by Milian Wolff. Committed on 20/11/2011 at 21:12. Pushed by mwolff into branch 'master'. fix crash when files are added/removed by external program This could 'easily' reproduced by opening a large git-based project in kdevelop with one of the AbstractFileManager-inheriting project manager. Then switching between branches resulted in a crash sooner or later. The main culprit was that FileManagerListJob::slotResult was sometimes called after a the job was killed. KJob::kill apparently does *not* kill the job directly, hence we need some additional safeguard here. Furthermore this patch adds some more safety measures against invalid item pointers in the FileManagerListJob's m_listQueue. Please test! BUG: 260741 M +18 -4 project/abstractfilemanagerplugin.cpp M +20 -2 project/filemanagerlistjob.cpp M +5 -0 project/filemanagerlistjob.h http://commits.kde.org/kdevplatform/19d9907d73f342debc2654cdf044b9a48a15798c reopening, can still happen when e.g. opening an in-source build of Qt in kdevelop and then calling: "make clean; git clean -fdx; ./configure ..." in there... sigh Application: KDevelop (kdevelop), signal: Segmentation fault [Current thread is 1 (Thread 0x7f1b354bd780 (LWP 4321))] Thread 12 (Thread 0x7f1b1d7eb700 (LWP 4322)): #0 pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:216 #1 0x00007f1b31493319 in QWaitConditionPrivate::wait (this=0x1d351d0, time=1000) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:86 #2 0x00007f1b314930dd in QWaitCondition::wait (this=0x1d35948, mutex=0x1d35950, time=1000) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:160 #3 0x00007f1b2d73db72 in KDevelop::DUChainPrivate::CleanupThread::run (this=0x1d35930) at /home/milian/projects/kde4/kdevplatform/language/duchain/duchain.cpp:282 #4 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x1d35930) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #5 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b1d7eb700) at pthread_create.c:304 #6 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #7 0x0000000000000000 in ?? () Thread 11 (Thread 0x7f1b0a6d8700 (LWP 4325)): #0 0x00007f1b2f799f03 in __poll (fds=<value optimized out>, nfds=<value optimized out>, timeout=<value optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:87 #1 0x00007f1b2aefb104 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f1b2aefb639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f1b315e7750 in QEventDispatcherGlib::processEvents (this=0x2794e70, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:424 #4 0x00007f1b315ac3d2 in QEventLoop::processEvents (this=0x7f1b0a6d7d90, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:149 #5 0x00007f1b315ac526 in QEventLoop::exec (this=0x7f1b0a6d7d90, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:201 #6 0x00007f1b3148f585 in QThread::exec (this=0x2794850) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread.cpp:498 #7 0x00007f1b2d863ed4 in KDevelop::CompletionWorkerThread::run (this=0x2794850) at /home/milian/projects/kde4/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84 #8 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x2794850) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #9 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b0a6d8700) at pthread_create.c:304 #10 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #11 0x0000000000000000 in ?? () Thread 10 (Thread 0x7f1b09ed7700 (LWP 4326)): #0 0x00007f1b2ee623c4 in __pthread_mutex_lock (mutex=0x279a028) at pthread_mutex_lock.c:61 #1 0x00007f1b2aefa461 in g_main_context_query () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f1b2aefb00a in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f1b2aefb639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f1b315e7750 in QEventDispatcherGlib::processEvents (this=0x2799f30, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:424 #5 0x00007f1b315ac3d2 in QEventLoop::processEvents (this=0x7f1b09ed6d90, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:149 #6 0x00007f1b315ac526 in QEventLoop::exec (this=0x7f1b09ed6d90, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:201 #7 0x00007f1b3148f585 in QThread::exec (this=0x27907a0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread.cpp:498 #8 0x00007f1b2d863ed4 in KDevelop::CompletionWorkerThread::run (this=0x27907a0) at /home/milian/projects/kde4/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84 #9 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x27907a0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #10 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b09ed7700) at pthread_create.c:304 #11 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #12 0x0000000000000000 in ?? () Thread 9 (Thread 0x7f1b096d6700 (LWP 4333)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f1b2e493985 in QTWTF::TCMalloc_PageHeap::scavengerThread (this=0x7f1b2e8205a0) at /home/milian/projects/kde4/qt-src/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:2359 #2 0x00007f1b2e492fe0 in QTWTF::TCMalloc_PageHeap::runScavengerThread (context=0x7f1b2e8205a0) at /home/milian/projects/kde4/qt-src/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastMalloc.cpp:1464 #3 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b096d6700) at pthread_create.c:304 #4 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #5 0x0000000000000000 in ?? () Thread 8 (Thread 0x7f1b0897b700 (LWP 4334)): #0 0x00007f1b315ec1af in QList<QTimerInfo*>::constEnd (this=0x3aeb8f0) at ../../include/QtCore/../../../../../kde4/qt-src/src/corelib/tools/qlist.h:259 #1 0x00007f1b315ea304 in QTimerInfoList::timerWait (this=0x3aeb8f0, tm=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_unix.cpp:447 #2 0x00007f1b315e6a4f in timerSourcePrepareHelper (src=0x3aeb890, timeout=0x7f1b0897ab3c) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:136 #3 0x00007f1b315e6bef in timerSourcePrepare (source=0x3aeb890, timeout=0x7f1b0897ab3c) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:169 #4 0x00007f1b2aefa0a2 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f1b2aefaf9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #6 0x00007f1b2aefb639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #7 0x00007f1b315e7750 in QEventDispatcherGlib::processEvents (this=0x3aebab0, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:424 #8 0x00007f1b315ac3d2 in QEventLoop::processEvents (this=0x7f1b0897ad70, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:149 #9 0x00007f1b315ac526 in QEventLoop::exec (this=0x7f1b0897ad70, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:201 #10 0x00007f1b3148f585 in QThread::exec (this=0x3ae7070) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread.cpp:498 #11 0x00007f1b3158b2f1 in QInotifyFileSystemWatcherEngine::run (this=0x3ae7070) at /home/milian/projects/kde4/qt-src/src/corelib/io/qfilesystemwatcher_inotify.cpp:248 #12 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x3ae7070) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #13 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b0897b700) at pthread_create.c:304 #14 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #15 0x0000000000000000 in ?? () Thread 7 (Thread 0x7f1b063b5700 (LWP 4350)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f1b29b5c5b7 in WTF::TCMalloc_PageHeap::scavengerThread() () from /home/milian/projects/compiled/qt/lib/libQtWebKit.so.4 #2 0x00007f1b29b5bba8 in WTF::TCMalloc_PageHeap::runScavengerThread(void*) () from /home/milian/projects/compiled/qt/lib/libQtWebKit.so.4 #3 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b063b5700) at pthread_create.c:304 #4 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #5 0x0000000000000000 in ?? () Thread 6 (Thread 0x7f1b06bb6700 (LWP 4351)): #0 QList<QTimerInfo*>::const_iterator::const_iterator (this=0x3e7e180, n=0x7f1b06bb5a40) at ../../include/QtCore/../../../../../kde4/qt-src/src/corelib/tools/qlist.h:225 #1 0x00007f1b315ec17e in QList<QTimerInfo*>::constBegin (this=0x3e7e180) at ../../include/QtCore/../../../../../kde4/qt-src/src/corelib/tools/qlist.h:256 #2 0x00007f1b315ea2b1 in QTimerInfoList::timerWait (this=0x3e7e180, tm=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_unix.cpp:447 #3 0x00007f1b315e6a4f in timerSourcePrepareHelper (src=0x3e7e120, timeout=0x7f1b06bb5b6c) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:136 #4 0x00007f1b315e6cc8 in idleTimerSourcePrepare (source=0x3b4ca00, timeout=0x7f1b06bb5b6c) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:214 #5 0x00007f1b2aefa0a2 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #6 0x00007f1b2aefaf9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #7 0x00007f1b2aefb639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #8 0x00007f1b315e7750 in QEventDispatcherGlib::processEvents (this=0xea3b80, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:424 #9 0x00007f1b315ac3d2 in QEventLoop::processEvents (this=0x7f1b06bb5da0, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:149 #10 0x00007f1b315ac526 in QEventLoop::exec (this=0x7f1b06bb5da0, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:201 #11 0x00007f1b3148f585 in QThread::exec (this=0xa86da0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread.cpp:498 #12 0x00007f1b3148f724 in QThread::run (this=0xa86da0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread.cpp:565 #13 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0xa86da0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #14 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1b06bb6700) at pthread_create.c:304 #15 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #16 0x0000000000000000 in ?? () Thread 5 (Thread 0x7f1afffff700 (LWP 4461)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f1b31493335 in QWaitConditionPrivate::wait (this=0xd20b30, time=18446744073709551615) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:88 #2 0x00007f1b314930dd in QWaitCondition::wait (this=0xd1fef8, mutex=0xcb2450, time=18446744073709551615) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:160 #3 0x00007f1b338fb704 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xd1fed0, th=0x112b5b70) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365 #4 0x00007f1b338fdd73 in ThreadWeaver::WorkingHardState::applyForWork (this=0xaa8f00, th=0x112b5b70) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71 #5 0x00007f1b338fcb8f in ThreadWeaver::ThreadRunHelper::run (this=0x7f1affffede0, parent=0xd1fed0, th=0x112b5b70) at ../../../threadweaver/Weaver/Thread.cpp:87 #6 0x00007f1b338fcc1b in ThreadWeaver::Thread::run (this=0x112b5b70) at ../../../threadweaver/Weaver/Thread.cpp:142 #7 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x112b5b70) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #8 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1afffff700) at pthread_create.c:304 #9 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #10 0x0000000000000000 in ?? () Thread 4 (Thread 0x7f1aff7fe700 (LWP 4462)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f1b31493335 in QWaitConditionPrivate::wait (this=0xd20b30, time=18446744073709551615) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:88 #2 0x00007f1b314930dd in QWaitCondition::wait (this=0xd1fef8, mutex=0xcb2450, time=18446744073709551615) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:160 #3 0x00007f1b338fb704 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xd1fed0, th=0x112ae560) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365 #4 0x00007f1b338fdd73 in ThreadWeaver::WorkingHardState::applyForWork (this=0xaa8f00, th=0x112ae560) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71 #5 0x00007f1b338fcb8f in ThreadWeaver::ThreadRunHelper::run (this=0x7f1aff7fdde0, parent=0xd1fed0, th=0x112ae560) at ../../../threadweaver/Weaver/Thread.cpp:87 #6 0x00007f1b338fcc1b in ThreadWeaver::Thread::run (this=0x112ae560) at ../../../threadweaver/Weaver/Thread.cpp:142 #7 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x112ae560) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #8 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1aff7fe700) at pthread_create.c:304 #9 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #10 0x0000000000000000 in ?? () Thread 3 (Thread 0x7f1afeffd700 (LWP 4463)): #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162 #1 0x00007f1b31493335 in QWaitConditionPrivate::wait (this=0xd20b30, time=18446744073709551615) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:88 #2 0x00007f1b314930dd in QWaitCondition::wait (this=0xd1fef8, mutex=0xcb2450, time=18446744073709551615) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qwaitcondition_unix.cpp:160 #3 0x00007f1b338fb704 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0xd1fed0, th=0x7f1b18859e70) at ../../../threadweaver/Weaver/WeaverImpl.cpp:365 #4 0x00007f1b338fdd73 in ThreadWeaver::WorkingHardState::applyForWork (this=0xaa8f00, th=0x7f1b18859e70) at ../../../threadweaver/Weaver/WorkingHardState.cpp:71 #5 0x00007f1b338fdd8c in ThreadWeaver::WorkingHardState::applyForWork (this=0xaa8f00, th=0x7f1b18859e70) at ../../../threadweaver/Weaver/WorkingHardState.cpp:74 #6 0x00007f1b338fcb8f in ThreadWeaver::ThreadRunHelper::run (this=0x7f1afeffcde0, parent=0xd1fed0, th=0x7f1b18859e70) at ../../../threadweaver/Weaver/Thread.cpp:87 #7 0x00007f1b338fcc1b in ThreadWeaver::Thread::run (this=0x7f1b18859e70) at ../../../threadweaver/Weaver/Thread.cpp:142 #8 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x7f1b18859e70) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #9 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1afeffd700) at pthread_create.c:304 #10 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #11 0x0000000000000000 in ?? () Thread 2 (Thread 0x7f1afce1c700 (LWP 20931)): #0 0x00007f1b2ee63d9d in __pthread_mutex_unlock_usercnt (mutex=0xe6b72e8) at pthread_mutex_unlock.c:52 #1 __pthread_mutex_unlock (mutex=0xe6b72e8) at pthread_mutex_unlock.c:290 #2 0x00007f1b2aefa094 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f1b2aefaf9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f1b2aefb639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f1b315e7750 in QEventDispatcherGlib::processEvents (this=0xe27e940, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:424 #6 0x00007f1b315ac3d2 in QEventLoop::processEvents (this=0x7f1afce1bd90, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:149 #7 0x00007f1b315ac526 in QEventLoop::exec (this=0x7f1afce1bd90, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:201 #8 0x00007f1b3148f585 in QThread::exec (this=0x7f1aecc3a6b0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread.cpp:498 #9 0x00007f1b2d863ed4 in KDevelop::CompletionWorkerThread::run (this=0x7f1aecc3a6b0) at /home/milian/projects/kde4/kdevplatform/language/codecompletion/codecompletionmodel.cpp:84 #10 0x00007f1b31491dd9 in QThreadPrivate::start (arg=0x7f1aecc3a6b0) at /home/milian/projects/kde4/qt-src/src/corelib/thread/qthread_unix.cpp:331 #11 0x00007f1b2ee5fd8c in start_thread (arg=0x7f1afce1c700) at pthread_create.c:304 #12 0x00007f1b2f7a704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #13 0x0000000000000000 in ?? () Thread 1 (Thread 0x7f1b354bd780 (LWP 4321)): [KCrash Handler] #6 0x00007f1b32cb96ef in QByteArray::isEmpty (this=0x12450af0) at ../../include/QtCore/../../../../../kde4/qt-src/src/corelib/tools/qbytearray.h:404 #7 0x00007f1b3155b586 in QUrlPrivate::parse (this=0x12450ab0, parseOptions=QUrlPrivate::ParseAndSet) at /home/milian/projects/kde4/qt-src/src/corelib/io/qurl.cpp:3760 #8 0x00007f1b3155de7d in QUrl::scheme (this=0x7ffffdbf2d00) at /home/milian/projects/kde4/qt-src/src/corelib/io/qurl.cpp:4431 #9 0x00007f1b34f496de in hasSubUrl (this=<value optimized out>) at ../../kdecore/io/kurl.cpp:986 #10 KUrl::hasSubUrl (this=<value optimized out>) at ../../kdecore/io/kurl.cpp:1031 #11 0x00007f1b34f4f383 in KUrl::addPath (this=0x7ffffdbf2d00, _txt=...) at ../../kdecore/io/kurl.cpp:1344 #12 0x00007f1b2dded9a4 in KDevelop::AbstractFileManagerPlugin::Private::addJobItems (this=0x3ec1820, job=0x14d8e4a0, baseItem=0xca260f0, entries=..., forceRecursion=false) at /home/milian/projects/kde4/kdevplatform/project/abstractfilemanagerplugin.cpp:163 #13 0x00007f1b2ddf1676 in KDevelop::AbstractFileManagerPlugin::qt_metacall (this=0x3ed1530, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0x7ffffdbf2fc0) at /home/milian/projects/.build/kde4/kdevplatform/project/abstractfilemanagerplugin.moc:117 #14 0x00007f1b0443bcd2 in QMakeProjectManager::qt_metacall (this=0x3ed1530, _c=QMetaObject::InvokeMetaMethod, _id=19, _a=0x7ffffdbf2fc0) at /home/milian/projects/.build/kde4/qmake/qmakemanager.moc:77 #15 0x00007f1b315b6a3e in QMetaObject::metacall (object=0x3ed1530, cl=QMetaObject::InvokeMetaMethod, idx=19, argv=0x7ffffdbf2fc0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qmetaobject.cpp:237 #16 0x00007f1b315cb93e in QMetaObject::activate (sender=0x14d8e4a0, m=0x7f1b2e005820, local_signal_index=0, argv=0x7ffffdbf2fc0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qobject.cpp:3278 #17 0x00007f1b2ddf4bb5 in KDevelop::FileManagerListJob::entries (this=0x14d8e4a0, _t1=0x14d8e4a0, _t2=0xca260f0, _t3=..., _t4=false) at /home/milian/projects/.build/kde4/kdevplatform/project/filemanagerlistjob.moc:101 #18 0x00007f1b2ddf47cf in KDevelop::FileManagerListJob::slotResult (this=0x14d8e4a0, job=0x1238a5b0) at /home/milian/projects/kde4/kdevplatform/project/filemanagerlistjob.cpp:84 #19 0x00007f1b2ddf4b17 in KDevelop::FileManagerListJob::qt_metacall (this=0x14d8e4a0, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0x7ffffdbf31a0) at /home/milian/projects/.build/kde4/kdevplatform/project/filemanagerlistjob.moc:88 #20 0x00007f1b315b6a3e in QMetaObject::metacall (object=0x14d8e4a0, cl=QMetaObject::InvokeMetaMethod, idx=34, argv=0x7ffffdbf31a0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qmetaobject.cpp:237 #21 0x00007f1b315cb93e in QMetaObject::activate (sender=0x1238a5b0, m=0x7f1b352e7880, local_signal_index=3, argv=0x7ffffdbf31a0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qobject.cpp:3278 #22 0x00007f1b34f56862 in KJob::result (this=<value optimized out>, _t1=0x1238a5b0) at ./kjob.moc:194 #23 0x00007f1b34f568a0 in KJob::emitResult (this=0x1238a5b0) at ../../kdecore/jobs/kjob.cpp:312 #24 0x00007f1b344dd4db in KIO::SimpleJob::slotFinished (this=0x1238a5b0) at ../../kio/kio/job.cpp:494 #25 0x00007f1b344dffd5 in KIO::ListJob::slotFinished (this=0x1238a5b0) at ../../kio/kio/job.cpp:2661 #26 0x00007f1b344e3f59 in KIO::ListJob::qt_metacall (this=0x1238a5b0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7ffffdbf34a0) at ./jobclasses.moc:821 #27 0x00007f1b315b6a3e in QMetaObject::metacall (object=0x1238a5b0, cl=QMetaObject::InvokeMetaMethod, idx=43, argv=0x7ffffdbf34a0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qmetaobject.cpp:237 #28 0x00007f1b315cb93e in QMetaObject::activate (sender=0x7f1aecb12840, m=0x7f1b3488aea0, local_signal_index=4, argv=0x0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qobject.cpp:3278 #29 0x00007f1b34585b41 in KIO::SlaveInterface::dispatch (this=<value optimized out>, _cmd=104, rawdata=...) at ../../kio/kio/slaveinterface.cpp:172 #30 0x00007f1b34582ac5 in KIO::SlaveInterface::dispatch (this=<value optimized out>) at ../../kio/kio/slaveinterface.cpp:88 #31 0x00007f1b34575eae in KIO::Slave::gotInput (this=0x7f1aecb12840) at ../../kio/kio/slave.cpp:344 #32 0x00007f1b345765fc in KIO::Slave::qt_metacall (this=0x7f1aecb12840, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7ffffdbf3900) at ./slave.moc:82 #33 0x00007f1b315b6a3e in QMetaObject::metacall (object=0x7f1aecb12840, cl=QMetaObject::InvokeMetaMethod, idx=30, argv=0x7ffffdbf3900) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qmetaobject.cpp:237 #34 0x00007f1b315cb93e in QMetaObject::activate (sender=0x7f1aeff8f280, m=0x7f1b34884a20, local_signal_index=0, argv=0x0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qobject.cpp:3278 #35 0x00007f1b344aece7 in KIO::ConnectionPrivate::dequeue (this=0x7f1aee33a5c0) at ../../kio/kio/connection.cpp:82 #36 0x00007f1b344aed8d in KIO::Connection::qt_metacall (this=0x7f1aeff8f280, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x10cb8100) at ./connection.moc:79 #37 0x00007f1b315b6a3e in QMetaObject::metacall (object=0x7f1aeff8f280, cl=QMetaObject::InvokeMetaMethod, idx=5, argv=0x10cb8100) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qmetaobject.cpp:237 #38 0x00007f1b315c60d6 in QMetaCallEvent::placeMetaCall (this=0x10cd44b0, object=0x7f1aeff8f280) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qobject.cpp:535 #39 0x00007f1b315c737d in QObject::event (this=0x7f1aeff8f280, e=0x10cd44b0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qobject.cpp:1217 #40 0x00007f1b306969fc in QApplicationPrivate::notify_helper (this=0x73af90, receiver=0x7f1aeff8f280, e=0x10cd44b0) at /home/milian/projects/kde4/qt-src/src/gui/kernel/qapplication.cpp:4481 #41 0x00007f1b30693fea in QApplication::notify (this=0x7ffffdbf48f0, receiver=0x7f1aeff8f280, e=0x10cd44b0) at /home/milian/projects/kde4/qt-src/src/gui/kernel/qapplication.cpp:3881 #42 0x00007f1b31e00a76 in KApplication::notify (this=0x7ffffdbf48f0, receiver=0x7f1aeff8f280, event=0x10cd44b0) at ../../kdeui/kernel/kapplication.cpp:311 #43 0x00007f1b315ae83a in QCoreApplication::notifyInternal (this=0x7ffffdbf48f0, receiver=0x7f1aeff8f280, event=0x10cd44b0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qcoreapplication.cpp:787 #44 0x00007f1b315b2587 in QCoreApplication::sendEvent (receiver=0x7f1aeff8f280, event=0x10cd44b0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qcoreapplication.h:215 #45 0x00007f1b315afa52 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x6e4da0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qcoreapplication.cpp:1428 #46 0x00007f1b315af673 in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qcoreapplication.cpp:1321 #47 0x00007f1b315e7e83 in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../../kde4/qt-src/src/corelib/kernel/qcoreapplication.h:220 #48 0x00007f1b315e6e3e in postEventSourceDispatch (s=0x7408e0) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:277 #49 0x00007f1b2aefabcd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #50 0x00007f1b2aefb3a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #51 0x00007f1b2aefb639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #52 0x00007f1b315e772d in QEventDispatcherGlib::processEvents (this=0x6e45b0, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventdispatcher_glib.cpp:422 #53 0x00007f1b3076f716 in QGuiEventDispatcherGlib::processEvents (this=0x6e45b0, flags=...) at /home/milian/projects/kde4/qt-src/src/gui/kernel/qguieventdispatcher_glib.cpp:204 #54 0x00007f1b315ac3d2 in QEventLoop::processEvents (this=0x7ffffdbf45f0, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:149 #55 0x00007f1b315ac526 in QEventLoop::exec (this=0x7ffffdbf45f0, flags=...) at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qeventloop.cpp:201 #56 0x00007f1b315aef2c in QCoreApplication::exec () at /home/milian/projects/kde4/qt-src/src/corelib/kernel/qcoreapplication.cpp:1064 #57 0x00007f1b30693b74 in QApplication::exec () at /home/milian/projects/kde4/qt-src/src/gui/kernel/qapplication.cpp:3755 #58 0x000000000040b77f in main (argc=3, argv=0x7ffffdbf6688) at /home/milian/projects/kde4/kdevelop/app/main.cpp:479 *** Bug 290314 has been marked as a duplicate of this bug. *** *** Bug 275134 has been marked as a duplicate of this bug. *** *** Bug 319841 has been marked as a duplicate of this bug. *** *** Bug 328876 has been marked as a duplicate of this bug. *** Git commit 06b526e81f9f9065d1725b4f35985e71dc0dc2e3 by Milian Wolff. Committed on 01/02/2019 at 12:45. Pushed by mwolff into branch 'master'. Properly cleanup FileManagerListJob when folder items are deleted This is an alternative approach to fix the issue described in https://phabricator.kde.org/D15899 The approach used here is generic and does not require any users of the API to know about the potential pitfalls, it actually decreases coupling a bit! The old approach to cleanup the list jobs only worked when we called AbstractFileManagerPluginPrivate::removeFolder, but that wouldn't work when a folder item gets deleted directly - e.g. from the CMakeManager or any other code. Now, we listen to the model signal when a row is about to be removed and cleanup the item pointers in the list job. While doing so, we must make take into account that the pointer may already be partially destroyed, since only the ProjectBaseItem dtor will call takeRow, at which point the overriden methods in ProjectFolderItem e.g. won't be available anymore. Additionally, it turned out that the fallback for a similar handler of partially destroyed classes in AbstractFileManagerPluginPrivate::jobFinished only removed the job from a copied list, since it was using foreach, and didn't even take the list by reference... Finally, the test is expanded to reliably trigger the crashy behavior explained in the review request on phabricator. M +25 -46 kdevplatform/project/abstractfilemanagerplugin.cpp M +22 -7 kdevplatform/project/filemanagerlistjob.cpp M +3 -3 kdevplatform/project/filemanagerlistjob.h M +18 -0 plugins/genericprojectmanager/tests/test_projectload.cpp https://invent.kde.org/kde/kdevelop/commit/06b526e81f9f9065d1725b4f35985e71dc0dc2e3 |