Bug 397045 - Kdevelop crashes when parsing starts [clang::Decl::setInvalidDecl]
Summary: Kdevelop crashes when parsing starts [clang::Decl::setInvalidDecl]
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (Clang-based) (show other bugs)
Version: 5.2.3
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: drkonqi
: 400237 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-08-01 06:43 UTC by Guillaume Racicot
Modified: 2021-01-16 04:37 UTC (History)
5 users (show)

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


Attachments
New crash information added by DrKonqi (33.89 KB, text/plain)
2018-08-19 16:23 UTC, Rodrigo Fernandes
Details
gdb backtrace full (151.83 KB, text/plain)
2018-08-22 17:49 UTC, markus
Details
New crash information added by DrKonqi (18.30 KB, text/plain)
2018-09-17 18:31 UTC, Fredrik Haikarainen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Racicot 2018-08-01 06:43:31 UTC
Application: kdevelop (5.2.3)

Qt Version: 5.11.1
Frameworks Version: 5.48.0
Operating System: Linux 4.17.10-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:

I opened a project. The background parser started then crashes the IDE. It happen every time I open that particular project. This make KDevelop completely unusable for that project (cash on startup)

Some investigation showed me that it happen when the cursor kind is CXCursor_FunctionTemplate and it seem it happen when it's a member function. I tried debugging it but it was inconclusive. Copying the preprocessed file in another project did not reproduced the crash. I Also tried deleting the .kdev and the .kdev folder and I tried emptying the cache.

- Custom settings of the application:

I enabled C++17. It didn't seemed related for this bug however.
It happen both with the master branch and the v5.2.3 tag

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f8c3e2b0940 (LWP 6785))]

Thread 20 (Thread 0x7f8bba7fc700 (LWP 7028)):
#0  0x00007f8c2fc9d3f6 in pthread_cond_timedwait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e1dd in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c36a75c04 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#5  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 19 (Thread 0x7f8bb8ff9700 (LWP 6841)):
#0  0x00007f8c35db5ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f8c2d58f523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f8bcab26cea in  () at /usr/lib/qt/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so
#7  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 18 (Thread 0x7f8bb97fa700 (LWP 6837)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 17 (Thread 0x7f8bb9ffb700 (LWP 6836)):
[KCrash Handler]
#6  0x00007f8be43c1450 in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.6
#7  0x00007f8be43c149c in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.6
#8  0x00007f8bd55dfbc8 in clang::ASTDeclReader::VisitDecl(clang::Decl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#9  0x00007f8bd55e0482 in clang::ASTDeclReader::VisitNamedDecl(clang::NamedDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#10 0x00007f8bd55e0982 in clang::ASTDeclReader::VisitValueDecl(clang::ValueDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#11 0x00007f8bd55e09f6 in clang::ASTDeclReader::VisitDeclaratorDecl(clang::DeclaratorDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#12 0x00007f8bd55ed7fe in clang::ASTDeclReader::VisitVarDeclImpl(clang::VarDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#13 0x00007f8bd55ee6d4 in clang::ASTDeclReader::VisitDecompositionDecl(clang::DecompositionDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#14 0x00007f8bd55f4916 in clang::ASTDeclReader::Visit(clang::Decl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#15 0x00007f8bd55f50c0 in clang::ASTReader::ReadDeclRecord(unsigned int) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#16 0x00007f8bd55adf16 in clang::ASTReader::GetDecl(unsigned int) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#17 0x00007f8bd55f6b13 in clang::ASTStmtReader::VisitDeclStmt(clang::DeclStmt*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#18 0x00007f8bd560b69d in clang::ASTReader::ReadStmtFromStream(clang::serialization::ModuleFile&) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#19 0x00007f8bd55b4303 in clang::ASTReader::GetExternalDeclStmt(unsigned long) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#20 0x00007f8be43b899c in clang::FunctionDecl::getBody(clang::FunctionDecl const*&) const () at /usr/lib/../lib/libclangAST.so.6
#21 0x00007f8be47d1d1c in clang_getCursorDefinition () at /usr/lib/libclang.so.6
#22 0x00007f8be47d207b in clang_isCursorDefinition () at /usr/lib/libclang.so.6
#23 0x00007f8be4ab79eb in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)30, (Decision)0, (Decision)2>(CXCursor, CXCursor) (this=0x7f8bb9ffa4a0, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:916
#24 0x00007f8be4ab0a13 in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)30>(CXCursor, CXCursor) (this=0x7f8bb9ffa4a0, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:905
#25 0x00007f8be4aadfcb in (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f8bb9ffa4a0) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1540
#26 0x00007f8be47d8985 in  () at /usr/lib/libclang.so.6
#27 0x00007f8be47dab2e in  () at /usr/lib/libclang.so.6
#28 0x00007f8be47dac2c in  () at /usr/lib/libclang.so.6
#29 0x00007f8be47d8463 in  () at /usr/lib/libclang.so.6
#30 0x00007f8be47e06a6 in clang_visitChildren () at /usr/lib/libclang.so.6
#31 0x00007f8be4ac3466 in (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)2, KDevelop::ClassDeclaration, true>(CXCursor) (this=0x7f8bb9ffa4a0, cursor=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1189
#32 0x00007f8be4abac9d in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)1, (Decision)0>(CXCursor, CXCursor) (this=0x7f8bb9ffa4a0, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:943
#33 0x00007f8be4ab5d5d in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)1, (Decision)2>(CXCursor, CXCursor) (this=0x7f8bb9ffa4a0, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:917
#34 0x00007f8be4ab009d in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2>(CXCursor, CXCursor) (this=0x7f8bb9ffa4a0, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:905
#35 0x00007f8be4aadc74 in (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f8bb9ffa4a0) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1521
#36 0x00007f8be47d8985 in  () at /usr/lib/libclang.so.6
#37 0x00007f8be47dab2e in  () at /usr/lib/libclang.so.6
#38 0x00007f8be47dac2c in  () at /usr/lib/libclang.so.6
#39 0x00007f8be47d8463 in  () at /usr/lib/libclang.so.6
#40 0x00007f8be47e06a6 in clang_visitChildren () at /usr/lib/libclang.so.6
#41 0x00007f8be4ab6cb6 in (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)22, KDevelop::Declaration, true>(CXCursor) (this=0x7f8bb9ffa4a0, cursor=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1189
#42 0x00007f8be4ab063d in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)22>(CXCursor, CXCursor) (this=0x7f8bb9ffa4a0, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:943
#43 0x00007f8be4aade63 in (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f8bb9ffa4a0) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1532
#44 0x00007f8be47d8985 in  () at /usr/lib/libclang.so.6
#45 0x00007f8be47dab2e in  () at /usr/lib/libclang.so.6
#46 0x00007f8be47dac2c in  () at /usr/lib/libclang.so.6
#47 0x00007f8be47d8764 in  () at /usr/lib/libclang.so.6
#48 0x00007f8be47e06a6 in clang_visitChildren () at /usr/lib/libclang.so.6
#49 0x00007f8be4aad3c8 in (anonymous namespace)::Visitor::Visitor(CXTranslationUnit, CXFile, IncludeFileContexts const&, bool) (this=0x7f8bb9ffa4a0, tu=0x7f8b883aed20, file=0x7f8b881abbf0, includes=..., update=false) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1445
#50 0x00007f8be4aae3b9 in Builder::visit(CXTranslationUnitImpl*, void*, QHash<void*, KDevelop::ReferencedTopDUContext> const&, bool) (tu=0x7f8b883aed20, file=0x7f8b881abbf0, includes=..., update=false) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1589
#51 0x00007f8be4b0d807 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b881abbf0, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:196
#52 0x00007f8be4b0cfd8 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b881a8fa0, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:125
#53 0x00007f8be4b0cfd8 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b889ceea0, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:125
#54 0x00007f8be4b0cfd8 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b88001080, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:125
#55 0x00007f8be4da7fe0 in ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (this=0x5611594e3fc0) at /home/master/prog/kdevelop/plugins/clang/clangparsejob.cpp:323
#56 0x00007f8c32e8527b in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#57 0x00007f8c32e85808 in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#58 0x00007f8c32e845d1 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#59 0x00007f8c32e8410c in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#60 0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#61 0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#62 0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 16 (Thread 0x7f8bbaffd700 (LWP 6834)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 15 (Thread 0x7f8bbb7fe700 (LWP 6833)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 14 (Thread 0x7f8bbbfff700 (LWP 6832)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 13 (Thread 0x7f8bc8d4f700 (LWP 6831)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 12 (Thread 0x7f8bc9550700 (LWP 6830)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 11 (Thread 0x7f8bc9d51700 (LWP 6829)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c36a7e2fc in QWaitCondition::wait(QMutex*, unsigned long) () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c32e82139 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#3  0x00007f8c32e86009 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#4  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#5  0x00007f8c32e86062 in  () at /usr/lib/libKF5ThreadWeaver.so.5
#6  0x00007f8c32e811fd in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /usr/lib/libKF5ThreadWeaver.so.5
#7  0x00007f8c32e84059 in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#8  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#9  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#10 0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 10 (Thread 0x7f8bca552700 (LWP 6828)):
#0  0x00007f8c35dbb0f9 in syscall () at /usr/lib/libc.so.6
#1  0x00007f8c36a70536 in QBasicMutex::lockInternal() () at /usr/lib/libQt5Core.so.5
#2  0x00007f8c36a70844 in  () at /usr/lib/libQt5Core.so.5
#3  0x00007f8c33d8e8e4 in KDevelop::UrlParseLock::UrlParseLock(KDevelop::IndexedString const&) (this=0x7f8bca5516d0, url=...) at /home/master/prog/kdevelop/kdevplatform/language/backgroundparser/urlparselock.cpp:78
#4  0x00007f8be4b0d170 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b80b24840, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:140
#5  0x00007f8be4b0cfd8 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b80a20d30, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:125
#6  0x00007f8be4b0cfd8 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&) (file=0x7f8b809383e0, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5611578bba00, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:125
#7  0x00007f8be4da7fe0 in ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (this=0x5611581e6f20) at /home/master/prog/kdevelop/plugins/clang/clangparsejob.cpp:323
#8  0x00007f8c32e8527b in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#9  0x00007f8c32e85808 in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#10 0x00007f8c32e845d1 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#11 0x00007f8c32e8410c in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#12 0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#13 0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#14 0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 9 (Thread 0x7f8be7fff700 (LWP 6816)):
#0  0x00007f8c35db5ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f8c2d58f523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f8c33f0b286 in KDevelop::CompletionWorkerThread::run() (this=0x5611578c3890) at /home/master/prog/kdevelop/kdevplatform/language/codecompletion/codecompletionmodel.cpp:79
#7  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 8 (Thread 0x7f8be77fe700 (LWP 6801)):
#0  0x00007f8c2d58ea49 in g_main_context_prepare () at /usr/lib/libglib-2.0.so.0
#1  0x00007f8c2d58f44e in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 7 (Thread 0x7f8bed52a700 (LWP 6796)):
#0  0x00007f8c2d5d62d9 in g_mutex_lock () at /usr/lib/libglib-2.0.so.0
#1  0x00007f8c2d58f508 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#8  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 6 (Thread 0x7f8bef944700 (LWP 6795)):
#0  0x00007f8c35db1934 in read () at /usr/lib/libc.so.6
#1  0x00007f8c2d5d4ed1 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58eff8 in g_main_context_check () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c2d58f4c6 in  () at /usr/lib/libglib-2.0.so.0
#4  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#5  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#6  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#7  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#8  0x00007f8c389939c9 in  () at /usr/lib/libQt5Qml.so.5
#9  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#10 0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#11 0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 5 (Thread 0x7f8bf4fb3700 (LWP 6790)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c366e5d6d in __gthread_cond_wait (__mutex=<optimized out>, __cond=<optimized out>) at /build/gcc/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:864
#2  0x00007f8c366e5d6d in std::condition_variable::wait(std::unique_lock<std::mutex>&) (this=<optimized out>, __lock=...) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/condition_variable.cc:53
#3  0x00007f8bfe6bfad4 in  () at /usr/lib/libQt5WebKit.so.5
#4  0x00007f8bfe6bfbf9 in  () at /usr/lib/libQt5WebKit.so.5
#5  0x00007f8c366ebd4f in execute_native_thread_routine (__p=0x56115760bfb0) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#6  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 4 (Thread 0x7f8c04c00700 (LWP 6789)):
#0  0x00007f8c35db5ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f8c2d58f523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f8c33da5d9e in KDevelop::DUChainPrivate::CleanupThread::run() (this=0x5611573e0200) at /home/master/prog/kdevelop/kdevplatform/language/duchain/duchain.cpp:283
#7  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 3 (Thread 0x7f8c06330700 (LWP 6787)):
#0  0x00007f8c35db5ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f8c2d58f523 in  () at /usr/lib/libglib-2.0.so.0
#2  0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#3  0x00007f8c36c7f054 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#4  0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c36a73a99 in QThread::exec() () at /usr/lib/libQt5Core.so.5
#6  0x00007f8c3937e976 in  () at /usr/lib/libQt5DBus.so.5
#7  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#8  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#9  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 2 (Thread 0x7f8c0f04c700 (LWP 6786)):
#0  0x00007f8c35db5ea9 in poll () at /usr/lib/libc.so.6
#1  0x00007f8c25697180 in  () at /usr/lib/libxcb.so.1
#2  0x00007f8c25698e4b in xcb_wait_for_event () at /usr/lib/libxcb.so.1
#3  0x00007f8c1116122a in  () at /usr/lib/libQt5XcbQpa.so.5
#4  0x00007f8c36a7db45 in  () at /usr/lib/libQt5Core.so.5
#5  0x00007f8c2fc97075 in start_thread () at /usr/lib/libpthread.so.0
#6  0x00007f8c35dc053f in clone () at /usr/lib/libc.so.6

Thread 1 (Thread 0x7f8c3e2b0940 (LWP 6785)):
#0  0x00007f8c2fc9cffc in pthread_cond_wait@@GLIBC_2.3.2 () at /usr/lib/libpthread.so.0
#1  0x00007f8c25697393 in  () at /usr/lib/libxcb.so.1
#2  0x00007f8c25698b3f in  () at /usr/lib/libxcb.so.1
#3  0x00007f8c25698c51 in xcb_wait_for_reply () at /usr/lib/libxcb.so.1
#4  0x00007f8c1115f71c in QXcbConnection::sync() () at /usr/lib/libQt5XcbQpa.so.5
#5  0x00007f8c1118133c in  () at /usr/lib/libQt5XcbQpa.so.5
#6  0x00007f8c11181430 in  () at /usr/lib/libQt5XcbQpa.so.5
#7  0x00007f8c3735f8b6 in QBackingStore::beginPaint(QRegion const&) () at /usr/lib/libQt5Gui.so.5
#8  0x00007f8c379af06d in  () at /usr/lib/libQt5Widgets.so.5
#9  0x00007f8c379af489 in  () at /usr/lib/libQt5Widgets.so.5
#10 0x00007f8c379c6bd7 in QWidgetPrivate::syncBackingStore() () at /usr/lib/libQt5Widgets.so.5
#11 0x00007f8c379df3f9 in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#12 0x00007f8c37aeb125 in QMainWindow::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#13 0x00007f8c3c26ad1c in KMainWindow::event(QEvent*) () at /usr/lib/libKF5XmlGui.so.5
#14 0x00007f8c3c2b5536 in KXmlGuiWindow::event(QEvent*) () at /usr/lib/libKF5XmlGui.so.5
#15 0x00007f8c3dd5c503 in KDevelop::MainWindow::event(QEvent*) (this=0x5611560299a0, ev=0x7ffe8f921ec0) at /home/master/prog/kdevelop/kdevplatform/shell/mainwindow.cpp:214
#16 0x00007f8c3799fa74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#17 0x00007f8c379a7341 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#18 0x00007f8c36c2bcb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#19 0x00007f8c379b0372 in  () at /usr/lib/libQt5Widgets.so.5
#20 0x00007f8c379b10b9 in  () at /usr/lib/libQt5Widgets.so.5
#21 0x00007f8c379c8939 in QWidget::repaint(QRect const&) () at /usr/lib/libQt5Widgets.so.5
#22 0x00007f8c379c899d in QWidget::repaint() () at /usr/lib/libQt5Widgets.so.5
#23 0x00007f8c37b29189 in QProgressBar::setValue(int) () at /usr/lib/libQt5Widgets.so.5
#24 0x00007f8c3de626d8 in KDevelop::StatusbarProgressWidget::slotProgressItemProgress(KDevelop::ProgressItem*, unsigned int) (this=0x5611571d3a80, item=0x5611594f2e20, value=88) at /home/master/prog/kdevelop/kdevplatform/shell/progresswidget/statusbarprogresswidget.cpp:289
#25 0x00007f8c3de63b28 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<KDevelop::ProgressItem*, unsigned int>, void, void (KDevelop::StatusbarProgressWidget::*)(KDevelop::ProgressItem*, unsigned int)>::call(void (KDevelop::StatusbarProgressWidget::*)(KDevelop::ProgressItem*, unsigned int), KDevelop::StatusbarProgressWidget*, void**) (f=(void (KDevelop::StatusbarProgressWidget::*)(KDevelop::StatusbarProgressWidget * const, KDevelop::ProgressItem *, unsigned int)) 0x7f8c3de6268a <KDevelop::StatusbarProgressWidget::slotProgressItemProgress(KDevelop::ProgressItem*, unsigned int)>, o=0x5611571d3a80, arg=0x7ffe8f922300) at /usr/include/qt/QtCore/qobjectdefs_impl.h:134
#26 0x00007f8c3de637cd in QtPrivate::FunctionPointer<void (KDevelop::StatusbarProgressWidget::*)(KDevelop::ProgressItem*, unsigned int)>::call<QtPrivate::List<KDevelop::ProgressItem*, unsigned int>, void>(void (KDevelop::StatusbarProgressWidget::*)(KDevelop::ProgressItem*, unsigned int), KDevelop::StatusbarProgressWidget*, void**) (f=(void (KDevelop::StatusbarProgressWidget::*)(KDevelop::StatusbarProgressWidget * const, KDevelop::ProgressItem *, unsigned int)) 0x7f8c3de6268a <KDevelop::StatusbarProgressWidget::slotProgressItemProgress(KDevelop::ProgressItem*, unsigned int)>, o=0x5611571d3a80, arg=0x7ffe8f922300) at /usr/include/qt/QtCore/qobjectdefs_impl.h:167
#27 0x00007f8c3de63623 in QtPrivate::QSlotObject<void (KDevelop::StatusbarProgressWidget::*)(KDevelop::ProgressItem*, unsigned int), QtPrivate::List<KDevelop::ProgressItem*, unsigned int>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5611588be750, r=0x5611571d3a80, a=0x7ffe8f922300, ret=0x0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:396
#28 0x00007f8c36c55c50 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/libQt5Core.so.5
#29 0x00007f8c3de85db5 in KDevelop::ProgressItem::progressItemProgress(KDevelop::ProgressItem*, unsigned int) (this=0x5611594f2e20, _t1=0x5611594f2e20, _t2=88) at /home/master/prog/kdevelop/build-debug/kdevplatform/shell/KDevPlatformShell_autogen/BY6TO23VXM/moc_progressmanager.cpp:282
#30 0x00007f8c3de5dfb7 in KDevelop::ProgressItem::setProgress(unsigned int) (this=0x5611594f2e20, v=88) at /home/master/prog/kdevelop/kdevplatform/shell/progresswidget/progressmanager.cpp:115
#31 0x00007f8c3ddd3d32 in KDevelop::StatusBar::showProgress(KDevelop::IStatus*, int, int, int) (this=0x5611571ce9d0, status=0x5611564d93c0, minimum=0, maximum=36000, value=32000) at /home/master/prog/kdevelop/kdevplatform/shell/statusbar.cpp:259
#32 0x00007f8c3de8e659 in KDevelop::StatusBar::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5611571ce9d0, _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0x7f8ba0732fe0) at /home/master/prog/kdevelop/build-debug/kdevplatform/shell/KDevPlatformShell_autogen/EWIEGA46WW/moc_statusbar.cpp:115
#33 0x00007f8c36c563d2 in QObject::event(QEvent*) () at /usr/lib/libQt5Core.so.5
#34 0x00007f8c379df76c in QWidget::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#35 0x00007f8c37b47688 in QStatusBar::event(QEvent*) () at /usr/lib/libQt5Widgets.so.5
#36 0x00007f8c3799fa74 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#37 0x00007f8c379a7341 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/libQt5Widgets.so.5
#38 0x00007f8c36c2bcb9 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/libQt5Core.so.5
#39 0x00007f8c36c2ed4c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/libQt5Core.so.5
#40 0x00007f8c36c7fa54 in  () at /usr/lib/libQt5Core.so.5
#41 0x00007f8c2d58f368 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#42 0x00007f8c2d58f5b1 in  () at /usr/lib/libglib-2.0.so.0
#43 0x00007f8c2d58f63e in g_main_context_iteration () at /usr/lib/libglib-2.0.so.0
#44 0x00007f8c36c7f039 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#45 0x00007f8c111f6722 in  () at /usr/lib/libQt5XcbQpa.so.5
#46 0x00007f8c36c2a94c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/libQt5Core.so.5
#47 0x00007f8c36c32c46 in QCoreApplication::exec() () at /usr/lib/libQt5Core.so.5
#48 0x00005611538a5278 in main(int, char**) (argc=2, argv=0x7ffe8f922e58) at /home/master/prog/kdevelop/app/main.cpp:793

Reported using DrKonqi
Comment 1 Guillaume Racicot 2018-08-02 18:36:18 UTC
I tried opening the project in QtCreator, and it cannot parse the project correctly. I get in the console "Clang Code Model: Error: The clangbackend process has finished unexpectedly and was restarted." So it seems to be an error in the clang library. But instead of outputting an error like QtCreator, kdevelop crashes.
Comment 2 Sven Brauch 2018-08-02 18:36:55 UTC
Yeah, because KDevelop runs clang in-process.
Comment 3 Rodrigo Fernandes 2018-08-19 16:23:59 UTC
Created attachment 114505 [details]
New crash information added by DrKonqi

kdevelop (5.2.3) using Qt 5.11.1

- What I was doing when the application crashed:

Importing a CMakeLists clone of https://gitlab.com/swirlycloud/swirly-cpp

-- Backtrace (Reduced):
#6  0x00007f50881d2450 in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.6
#7  0x00007f50881d249c in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.6
#8  0x00007f5081284bc8 in clang::ASTDeclReader::VisitDecl(clang::Decl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#9  0x00007f5081285482 in clang::ASTDeclReader::VisitNamedDecl(clang::NamedDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#10 0x00007f5081285982 in clang::ASTDeclReader::VisitValueDecl(clang::ValueDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
Comment 4 markus 2018-08-22 17:49:25 UTC
Created attachment 114547 [details]
gdb backtrace full

I can reproduce it with debug symbols of clang. Feel free to ask me everything.
Comment 5 Fredrik Haikarainen 2018-09-17 18:31:56 UTC
Created attachment 115046 [details]
New crash information added by DrKonqi

kdevelop (5.2.4) using Qt 5.11.1

- What I was doing when the application crashed:
After having issues with the parser not working correctly, I attempted to clear the cache and restart KDevelop. Reparsing of the project then commenced, and after a while it crashes. Sometimes instantly, sometimes after some parsing progress. Happens 7/7 times.

- Unusual behavior I noticed:
Before this happened, KDevelop crashed once or twice. Clearing the cache did the trick then, but it no longer works.  Also, the parser has been working very badly. It doesn't recognize most header files, even though include paths are set for the project.  It also misidentifies some classes as being part of the "std::"-namespace for the headers that are recognized. So if I for example declare `class Foo` in Foo.hpp, then I will get parser errors on usages of this class that suggest that I change them to std::Foo instead, (message says: did you mean std::Foo? Solutions: include Foo.hpp)

- Custom settings of the application:
Session has 3 projects. All are configured with regular makefiles, and uses gcc with the C++17 standard for compilation. The parser uses clang with the -std=c++17 flag. One of the projects also uses libclang as a dependency for static code generation.
All KDE applications are installed via official Arch Linux repository.

-- Backtrace (Reduced):
#6  0x00007fea5f993450 in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.6
#7  0x00007fea5f99349c in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.6
#8  0x00007fea58dddbc8 in clang::ASTDeclReader::VisitDecl(clang::Decl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#9  0x00007fea58dde482 in clang::ASTDeclReader::VisitNamedDecl(clang::NamedDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
#10 0x00007fea58dde982 in clang::ASTDeclReader::VisitValueDecl(clang::ValueDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.6
Comment 6 Guillaume Racicot 2018-10-02 13:55:47 UTC
The crash still happens with clang 7. The backtrace when opening my project is similar:

#0  0x00007fffb27107b0 in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.7
#1  0x00007fffb27107fc in clang::Decl::setInvalidDecl(bool) () at /usr/lib/../lib/libclangAST.so.7
#2  0x00007fffb10e9c18 in clang::ASTDeclReader::VisitDecl(clang::Decl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#3  0x00007fffb10ea4e2 in clang::ASTDeclReader::VisitNamedDecl(clang::NamedDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#4  0x00007fffb10eaa02 in clang::ASTDeclReader::VisitValueDecl(clang::ValueDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#5  0x00007fffb10eaa96 in clang::ASTDeclReader::VisitDeclaratorDecl(clang::DeclaratorDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#6  0x00007fffb10f913e in clang::ASTDeclReader::VisitVarDeclImpl(clang::VarDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#7  0x00007fffb10fa044 in clang::ASTDeclReader::VisitDecompositionDecl(clang::DecompositionDecl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#8  0x00007fffb1100346 in clang::ASTDeclReader::Visit(clang::Decl*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#9  0x00007fffb1100ae0 in clang::ASTReader::ReadDeclRecord(unsigned int) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#10 0x00007fffb10b75a6 in clang::ASTReader::GetDecl(unsigned int) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#11 0x00007fffb1102563 in clang::ASTStmtReader::VisitDeclStmt(clang::DeclStmt*) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#12 0x00007fffb1117885 in clang::ASTReader::ReadStmtFromStream(clang::serialization::ModuleFile&) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#13 0x00007fffb10bd6c3 in clang::ASTReader::GetExternalDeclStmt(unsigned long) () at /usr/lib/../lib/../lib/libclangSerialization.so.7
#14 0x00007fffb270806c in clang::FunctionDecl::getBody(clang::FunctionDecl const*&) const () at /usr/lib/../lib/libclangAST.so.7
#15 0x00007fffb2939c6c in clang_getCursorDefinition () at /usr/lib/libclang.so.7
#16 0x00007fffb2939fcb in clang_isCursorDefinition () at /usr/lib/libclang.so.7
#17 0x00007fffb2a7bd3d in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)30, (Decision)0, (Decision)2> (cursor=..., this=0x7fff82ffc170, parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:919
#18 0x00007fffb2a7bd3d in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)30> (parent=..., cursor=..., this=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:912
#19 0x00007fffb2a7bd3d in (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1541
#20 0x00007fffb2941025 in  () at /usr/lib/libclang.so.7
#21 0x00007fffb294306e in  () at /usr/lib/libclang.so.7
#22 0x00007fffb294316c in  () at /usr/lib/libclang.so.7
#23 0x00007fffb2940b03 in  () at /usr/lib/libclang.so.7
#24 0x00007fffb2948c81 in clang_visitChildren () at /usr/lib/libclang.so.7
#25 0x00007fffb2a670e1 in (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)2, KDevelop::ClassDeclaration, true> (cursor=..., this=0x7fff82ffc170) at /usr/include/c++/8.2.1/bits/move.h:99
#26 0x00007fffb2a670e1 in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)0, (Decision)0> (parent=..., cursor=..., this=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:950
#27 0x00007fffb2a670e1 in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2, (Decision)0, (Decision)2>(CXCursor, CXCursor) (this=0x7fff82ffc170, cursor=..., parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:924
#28 0x00007fffb2a7e551 in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)2> (parent=..., cursor=..., this=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:448
#29 0x00007fffb2a7e551 in (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1522
#30 0x00007fffb2941025 in  () at /usr/lib/libclang.so.7
#31 0x00007fffb294306e in  () at /usr/lib/libclang.so.7
#32 0x00007fffb294316c in  () at /usr/lib/libclang.so.7
#33 0x00007fffb2940b03 in  () at /usr/lib/libclang.so.7
#34 0x00007fffb2948c81 in clang_visitChildren () at /usr/lib/libclang.so.7
#35 0x00007fffb2a6c4c1 in (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)22, KDevelop::Declaration, true>(CXCursor) (this=this@entry=0x7fff82ffc170, cursor=...) at /usr/include/c++/8.2.1/bits/move.h:99
#36 0x00007fffb2a7a536 in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)22> (cursor=..., this=0x7fff82ffc170, parent=...) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:931
#37 0x00007fffb2a7a536 in (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1533
#38 0x00007fffb2941025 in  () at /usr/lib/libclang.so.7
#39 0x00007fffb294306e in  () at /usr/lib/libclang.so.7
#40 0x00007fffb294316c in  () at /usr/lib/libclang.so.7
#41 0x00007fffb2940e04 in  () at /usr/lib/libclang.so.7
#42 0x00007fffb2948c81 in clang_visitChildren () at /usr/lib/libclang.so.7
#43 0x00007fffb2a63d47 in (anonymous namespace)::Visitor::Visitor (update=<optimized out>, includes=..., file=<optimized out>, tu=<optimized out>, this=0x7fff82ffc170) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1448
#44 0x00007fffb2a63d47 in Builder::visit(CXTranslationUnitImpl*, void*, QHash<void*, KDevelop::ReferencedTopDUContext> const&, bool) (tu=<optimized out>, file=<optimized out>, includes=..., update=<optimized out>) at /home/master/prog/kdevelop/plugins/clang/duchain/builder.cpp:1590
#45 0x00007fffb2a8b3bd in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&)
    (file=<optimized out>, imports=..., session=..., features=<optimized out>, includedFiles=..., index=0x5555583228a0, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:189
#46 0x00007fffb2a8ac20 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&)
    (file=<optimized out>, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5555583228a0, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:121
#47 0x00007fffb2a8ac20 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&)
    (file=<optimized out>, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5555583228a0, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:121
#48 0x00007fffb2a8ac20 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, KDevelop::TopDUContext::Features, QHash<void*, KDevelop::ReferencedTopDUContext>&, ClangIndex*, std::function<bool ()> const&)
    (file=<optimized out>, imports=..., session=..., features=KDevelop::TopDUContext::AllDeclarationsContextsAndUses, includedFiles=..., index=0x5555583228a0, abortFunction=...) at /home/master/prog/kdevelop/plugins/clang/duchain/clanghelpers.cpp:121
#49 0x00007fffb2af71df in ClangParseJob::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) (this=0x555558497cb0) at /home/master/prog/kdevelop/plugins/clang/clangparsejob.cpp:217
#50 0x00007ffff6cc45ab in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#51 0x00007ffff6cc4b38 in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#52 0x00007ffff6cc3901 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /usr/lib/libKF5ThreadWeaver.so.5
#53 0x00007ffff6cc343c in ThreadWeaver::Thread::run() () at /usr/lib/libKF5ThreadWeaver.so.5
#54 0x00007ffff4296f65 in  () at /usr/lib/libQt5Core.so.5
#55 0x00007ffff2e2ba9d in start_thread () at /usr/lib/libpthread.so.0
#56 0x00007ffff3ddaa43 in clone () at /usr/lib/libc.so.6
Comment 7 Guillaume Racicot 2018-10-12 15:12:45 UTC
It seems the crash now has a workaround. When opening the crashing project, I click the "Stop All" button as soon as the initial parsing starts. Then, everything seems to work at that point.
Comment 8 Francis Herne 2018-10-24 13:40:54 UTC
*** Bug 400237 has been marked as a duplicate of this bug. ***
Comment 9 Justin Zobel 2020-12-17 05:38:14 UTC
Thank you for the crash report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 10 Bug Janitor Service 2021-01-01 04:38:45 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2021-01-16 04:37:31 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!