Bug 431391 - KDevelop crashes on startup
Summary: KDevelop crashes on startup
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: drkonqi
: 431796 431887 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-01-10 14:06 UTC by nbgyan
Modified: 2021-01-22 23:57 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nbgyan 2021-01-10 14:06:02 UTC
Application: kdevelop (5.6.40)

Qt Version: 5.15.2
Frameworks Version: 5.79.0
Operating System: Linux 5.4.0-60-generic x86_64
Windowing system: X11
Distribution: KDE neon Unstable Edition

-- Information about the crash:
- Unusual behavior I noticed:  
I used it all day yesterday until it suddenly crashed all of a sudden. I restarted many times but still crashed. It continued even after a comple machine restart

The crash can be reproduced every time.

-- Backtrace:
Application: KDevelop (kdevelop), signal: Segmentation fault

[New LWP 7932]
[New LWP 7933]
[New LWP 7934]
[New LWP 7935]
[New LWP 7936]
[New LWP 7937]
[New LWP 7940]
[New LWP 7942]
[New LWP 7944]
[New LWP 7951]
[New LWP 7953]
[New LWP 7969]
[New LWP 8059]
[New LWP 8060]
[New LWP 8097]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f7729849aff in __GI___poll (fds=0x7ffcfdf20448, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
[Current thread is 1 (Thread 0x7f7713cf9240 (LWP 7931))]

Thread 16 (Thread 0x7f76d854a700 (LWP 8097)):
#0  0x00007f7729849aff in __GI___poll (fds=0x7f76f00035e0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f77262461ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f7728873de0 in  () at /lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.57
#7  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 15 (Thread 0x7f76d954c700 (LWP 8060)):
[KCrash Handler]
#4  getTypePtr () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/include/clang/AST/Type.h:6073
#5  getTypeInfoImpl() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/lib/AST/ASTContext.cpp:2054
#6  0x00007f76e467d510 in getTypeInfo() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/lib/AST/ASTContext.cpp:1743
#7  0x00007f76e467d3fa in getTypeInfoInChars() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/lib/AST/ASTContext.cpp:1695
#8  0x00007f76e5df973a in (anonymous namespace)::Visitor::setTypeSize(CXType, KDevelop::AbstractType*) (type=..., kdevType=0x7f76cc7b5190, this=<optimized out>) at ./plugins/clang/duchain/builder.cpp:934
#9  0x00007f76e5dfc7b1 in (anonymous namespace)::Visitor::dispatchType<(CXTypeKind)112> (cursor=..., type=..., this=<optimized out>) at ./plugins/clang/duchain/builder.cpp:720
#10 (anonymous namespace)::Visitor::makeType(CXType, CXCursor) (this=this@entry=0x7f76d954ae70, type=..., parent=...) at ./plugins/clang/duchain/builder.cpp:1357
#11 0x00007f76e5dffb38 in (anonymous namespace)::Visitor::createType<(CXCursorKind)10>(CXCursor) (this=0x7f76d954ae70, cursor=...) at ./plugins/clang/duchain/builder.cpp:701
#12 0x00007f76e5e1f7a5 in (anonymous namespace)::Visitor::createDeclaration<(CXCursorKind)9, KDevelop::Declaration> (context=0x0, id=..., cursor=..., this=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:466
#13 (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)9, KDevelop::Declaration, false> (cursor=..., this=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:1220
#14 (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)9, (Decision)1, (Decision)1> (cursor=..., this=0x7f76d954ae70, parent=...) at ./plugins/clang/duchain/builder.cpp:991
#15 (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)9> (parent=..., cursor=..., this=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:953
#16 (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:1560
#17 0x00007f76e46243c5 in Visit() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:215
#18 0x00007f76e462ffae in RunVisitorWorkList() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:3110
#19 0x00007f76e4626187 in Visit() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:3177
#20 0x00007f76e4624b82 in VisitChildren() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:515
#21 0x00007f76e46336d6 in clang_visitChildren() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:4365
#22 0x00007f76e5e20a40 in (anonymous namespace)::Visitor::buildCompoundStatement<(CXCursorKind)202> (cursor=..., this=0x7f76d954ae70) at /usr/include/c++/9/bits/move.h:99
#23 (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:1600
#24 0x00007f76e46243c5 in Visit() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:215
#25 0x00007f76e4627b51 in VisitFunctionDecl() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:887
#26 0x00007f76e4624b38 in VisitChildren() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:504
#27 0x00007f76e46336d6 in clang_visitChildren() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:4365
#28 0x00007f76e5e056c9 in (anonymous namespace)::Visitor::buildDeclaration<(CXCursorKind)21, KDevelop::FunctionDefinition, true>(CXCursor) (this=this@entry=0x7f76d954ae70, cursor=...) at /usr/include/c++/9/bits/move.h:99
#29 0x00007f76e5e1f521 in (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)21, (Decision)1, (Decision)0> (cursor=..., this=0x7f76d954ae70, parent=...) at ./plugins/clang/duchain/builder.cpp:972
#30 (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)21, (Decision)1, (Decision)2> (cursor=..., this=0x7f76d954ae70, parent=...) at ./plugins/clang/duchain/builder.cpp:965
#31 (anonymous namespace)::Visitor::dispatchCursor<(CXCursorKind)21> (parent=..., cursor=..., this=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:953
#32 (anonymous namespace)::visitCursor(CXCursor, CXCursor, CXClientData) (cursor=..., parent=..., data=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:1563
#33 0x00007f76e46243c5 in Visit() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:215
#34 0x00007f76e4626356 in handleDeclForVisitation() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:672
#35 0x00007f76e4626544 in VisitDeclContext() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:633
#36 0x00007f76e4624da7 in VisitChildren() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:538
#37 0x00007f76e46336d6 in clang_visitChildren() () at /build/llvm-toolchain-8-mZaTvn/llvm-toolchain-8-8.0.1/tools/clang/tools/libclang/CIndex.cpp:4365
#38 0x00007f76e5e004b4 in (anonymous namespace)::Visitor::Visitor (update=<optimized out>, includes=..., file=<optimized out>, tu=<optimized out>, this=0x7f76d954ae70) at ./plugins/clang/duchain/builder.cpp:1474
#39 Builder::visit(CXTranslationUnitImpl*, void*, QHash<void*, KDevelop::ReferencedTopDUContext> const&, bool) (tu=<optimized out>, file=<optimized out>, includes=..., update=<optimized out>) at ./plugins/clang/duchain/builder.cpp:1621
#40 0x00007f76e5e2b808 in ClangHelpers::buildDUChain(void*, QMultiHash<void*, Import> const&, ParseSession const&, QFlags<KDevelop::TopDUContext::Feature>, QHash<void*, KDevelop::ReferencedTopDUContext>&, QHash<KDevelop::IndexedString, KDevelop::ModificationRevision> const&, KDevelop::IndexedString const&, ClangIndex*, std::function<bool ()> const&) (file=<optimized out>, imports=..., session=..., features=..., includedFiles=..., unsavedRevisions=..., parseDocument=..., index=0x5596e9e2db50, abortFunction=...) at ./plugins/clang/duchain/clanghelpers.cpp:221
#41 0x00007f76e5eba29f in  () at /usr/lib/x86_64-linux-gnu/qt5/plugins/kdevplatform/35/kdevclangsupport.so
#42 0x00007f77261ded7f in ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>, ThreadWeaver::Thread*) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#43 0x00007f77261df37d in ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#44 0x00007f77261de097 in ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&, ThreadWeaver::Thread*) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#45 0x00007f77261ddc71 in ThreadWeaver::Thread::run() () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#46 0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#47 0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#48 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 14 (Thread 0x7f76dad8e700 (LWP 8059)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5596e9946170) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5596e9946120, cond=0x5596e9946148) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5596e9946148, mutex=0x5596e9946120) at pthread_cond_wait.c:638
#3  0x00007f7729bdcd1b in QWaitCondition::wait(QMutex*, QDeadlineTimer) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f77261dbf70 in ThreadWeaver::Weaver::takeFirstAvailableJobOrSuspendOrWait(ThreadWeaver::Thread*, bool, bool, bool) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#5  0x00007f77261dfc6e in  () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#6  0x00007f77261db132 in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#7  0x00007f77261dfcc9 in  () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#8  0x00007f77261db132 in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#9  0x00007f77261dfcc9 in  () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#10 0x00007f77261db132 in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#11 0x00007f77261dfcc9 in  () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#12 0x00007f77261db132 in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#13 0x00007f77261dfcc9 in  () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#14 0x00007f77261db132 in ThreadWeaver::Weaver::applyForWork(ThreadWeaver::Thread*, bool) () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#15 0x00007f77261ddbd3 in ThreadWeaver::Thread::run() () at /lib/x86_64-linux-gnu/libKF5ThreadWeaver.so.5
#16 0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#18 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 13 (Thread 0x7f76db58f700 (LWP 7969)):
#0  0x00007f7729849aff in __GI___poll (fds=0x7f770c0085e0, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f77262461ae in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f76d99dd669 in QQuickXmlQueryEngine::run() (this=0x5596eaf76630) at qqmlxmllistmodel.cpp:325
#7  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 12 (Thread 0x7f76dc3db700 (LWP 7953)):
#0  __GI___libc_read (nbytes=16, buf=0x7f76dc3da0c0, fd=21) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=21, buf=0x7f76dc3da0c0, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007f772628e89f in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7726245cfe in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7726246152 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f7728873de0 in  () at /lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.57
#10 0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 11 (Thread 0x7f76e6850700 (LWP 7951)):
#0  __GI___libc_read (nbytes=16, buf=0x7f76e684f150, fd=64) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=64, buf=0x7f76e684f150, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007f772628e89f in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7726245cfe in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7726246152 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 10 (Thread 0x7f76e7cd9700 (LWP 7944)):
#0  __GI___libc_read (nbytes=16, buf=0x7f76e7cd8130, fd=18) at ../sysdeps/unix/sysv/linux/read.c:26
#1  __GI___libc_read (fd=18, buf=0x7f76e7cd8130, nbytes=16) at ../sysdeps/unix/sysv/linux/read.c:24
#2  0x00007f772628e89f in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7726245cfe in g_main_context_check () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7726246152 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f772724dfa9 in  () at /lib/x86_64-linux-gnu/libQt5Qml.so.5
#10 0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#11 0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#12 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 9 (Thread 0x7f76ecb28700 (LWP 7942)):
#0  0x00007f772629333d in g_mutex_lock () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f77262455cb in g_main_context_prepare () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f77262460db in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 8 (Thread 0x7f76ee0ec700 (LWP 7940)):
#0  0x00007f7726242734 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f7726244185 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f772624566b in g_main_context_prepare () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f77262460db in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007f77287623a0 in  () at /lib/x86_64-linux-gnu/libKDevPlatformLanguage.so.57
#9  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#11 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 7 (Thread 0x7f77056c7700 (LWP 7937)):
#0  0x00007f77262440f0 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f772624566b in g_main_context_prepare () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f77262460db in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f7729e16fbb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#6  0x00007f7729bd5a12 in QThread::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f772a848f4b in  () at /lib/x86_64-linux-gnu/libQt5DBus.so.5
#8  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 6 (Thread 0x7f7706059700 (LWP 7936)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5596e9244dd8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5596e9244d88, cond=0x5596e9244db0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5596e9244db0, mutex=0x5596e9244d88) at pthread_cond_wait.c:638
#3  0x00007f7711077b5b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007f771107775b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 5 (Thread 0x7f770685a700 (LWP 7935)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5596e9244dd8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5596e9244d88, cond=0x5596e9244db0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5596e9244db0, mutex=0x5596e9244d88) at pthread_cond_wait.c:638
#3  0x00007f7711077b5b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007f771107775b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 4 (Thread 0x7f770705b700 (LWP 7934)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5596e9244dd8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5596e9244d88, cond=0x5596e9244db0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5596e9244db0, mutex=0x5596e9244d88) at pthread_cond_wait.c:638
#3  0x00007f7711077b5b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007f771107775b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 3 (Thread 0x7f771096a700 (LWP 7933)):
#0  futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x5596e9244dd8) at ../sysdeps/nptl/futex-internal.h:183
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5596e9244d88, cond=0x5596e9244db0) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5596e9244db0, mutex=0x5596e9244d88) at pthread_cond_wait.c:638
#3  0x00007f7711077b5b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#4  0x00007f771107775b in  () at /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so
#5  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 2 (Thread 0x7f7713149700 (LWP 7932)):
#0  0x00007f7729849aff in __GI___poll (fds=0x7f7713148268, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f771dc1cc1a in  () at /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f771dc1e90a in xcb_wait_for_event () at /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f771365fd58 in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#4  0x00007f7729bd6bac in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#5  0x00007f7726ba9609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#6  0x00007f7729856293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7f7713cf9240 (LWP 7931)):
#0  0x00007f7729849aff in __GI___poll (fds=0x7ffcfdf20448, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007f771dc1cc1a in  () at /lib/x86_64-linux-gnu/libxcb.so.1
#2  0x00007f771dc1d329 in  () at /lib/x86_64-linux-gnu/libxcb.so.1
#3  0x00007f771dc1d5b7 in  () at /lib/x86_64-linux-gnu/libxcb.so.1
#4  0x00007f771dc1de20 in xcb_flush () at /lib/x86_64-linux-gnu/libxcb.so.1
#5  0x00007f77136532ad in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#6  0x00007f772a46aa67 in QBackingStore::flush(QRegion const&, QWindow*, QPoint const&) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#7  0x00007f772aabe49d in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007f772aabf2a5 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007f772aac14ac in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007f772aac1f44 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f772aaeb6d5 in QWidgetPrivate::syncBackingStore() () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f772aaf25fc in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007f772ac0a8c8 in QMainWindow::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f7727e154b3 in KMainWindow::event(QEvent*) () at /lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#15 0x00007f7727e6058b in KXmlGuiWindow::event(QEvent*) () at /lib/x86_64-linux-gnu/libKF5XmlGui.so.5
#16 0x00007f772aaaedc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f772aab7bb8 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f7729dbc69a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007f772aac2efd in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f772aac54b0 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f772aada9d8 in QWidget::repaint(QRect const&) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f772aadaa40 in QWidget::repaint() () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f772ac4adc8 in QProgressBar::setValue(int) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f7729df36be in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f772b684744 in  () at /lib/x86_64-linux-gnu/libKDevPlatformShell.so.57
#26 0x00007f772b7118dc in  () at /lib/x86_64-linux-gnu/libKDevPlatformShell.so.57
#27 0x00007f7729dea239 in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007f772aaf1bad in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f772ac6a22b in QStatusBar::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f772aaaedc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007f772aab7bb8 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007f7729dbc69a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#33 0x00007f7729dbefa1 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007f7729e17947 in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007f7726245fbd in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#36 0x00007f7726246240 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f77262462e3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f7729e16fa2 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#39 0x00007f7729dbb1ab in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007f7729dc3354 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00005596e71ced37 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./app/main.cpp:856
[Inferior 1 (process 7931) detached]

Possible duplicates by query: bug 376084.

Reported using DrKonqi
Comment 1 David Redondo 2021-01-11 14:11:19 UTC
Hitting that too
Comment 2 Milian Wolff 2021-01-11 16:22:51 UTC
when you run into this, could you please do me a favor and attach GDB and then go to frame

#8  0x00007f76e5df973a in (anonymous namespace)::Visitor::setTypeSize(CXType, KDevelop::AbstractType*) (type=..., kdevType=0x7f76cc7b5190, this=<optimized out>) at ./plugins/clang/duchain/builder.cpp:934

and then do

(gdb) print type

that may give us a way to skip this type when it's known-to-crash.
Comment 3 nbgyan 2021-01-12 06:16:06 UTC
(In reply to Milian Wolff from comment #2)
> when you run into this, could you please do me a favor and attach GDB and
> then go to frame
> 
> #8  0x00007f76e5df973a in (anonymous
> namespace)::Visitor::setTypeSize(CXType, KDevelop::AbstractType*) (type=...,
> kdevType=0x7f76cc7b5190, this=<optimized out>) at
> ./plugins/clang/duchain/builder.cpp:934
> 
> and then do
> 
> (gdb) print type
> 
> that may give us a way to skip this type when it's known-to-crash.

Tried in vain to do this with gdb but I realised that the issue is with the background parser only when I tried setting up an imported project like plasma-discover for development on my workstation. 

After using kdesrc-build to fetch discover and trying to import the project into kdevelop from CMakelist.txt it works fine. And then it crashes because the background parser stalls at some point. This does not happen if, say, I start a new project from scratch. I hope this helps.
Comment 4 Milian Wolff 2021-01-12 10:44:48 UTC
no it doesn't help I'm afraid :) I need either a simple way to reproduce or the info I requested - otherwise I don't really know what to do
Comment 5 David Redondo 2021-01-12 10:46:29 UTC
I have it in gdb 

(gdb) p type
$1 = {kind = CXType_Auto, data = {0x7fff6c9d34a0, 0x7fff6cbe4790}}


I am also available on irc if you need more infos
Comment 6 Milian Wolff 2021-01-12 12:22:29 UTC
can you try to call clang_getCanonicalType beforehand, and see if the issue persists? something like the following:

```
diff --git a/plugins/clang/duchain/builder.cpp b/plugins/clang/duchain/builder.cpp
index 1024ca3100..796c7ce2dc 100644
--- a/plugins/clang/duchain/builder.cpp
+++ b/plugins/clang/duchain/builder.cpp
@@ -928,6 +928,8 @@ void Visitor::setTypeSize(CXType type, AbstractType* kdevType) const
 {
     if (kdevType->whichType() == AbstractType::TypeFunction)
         return;
+
+    type = clang_getCanonicalType(type);
     if (type.kind == CXType_Elaborated)
         return;
 
```

If it persists, can you try to add CXType_Auto to the early return check and re-run the clang unit tests and see if it affects size information on lines like

```
auto foo = 4;
```
Comment 7 David Redondo 2021-01-12 12:27:25 UTC
(In reply to Milian Wolff from comment #6)
> can you try to call clang_getCanonicalType beforehand, and see if the issue
> persists? something like the following:
> 
> ```
> diff --git a/plugins/clang/duchain/builder.cpp
> b/plugins/clang/duchain/builder.cpp
> index 1024ca3100..796c7ce2dc 100644
> --- a/plugins/clang/duchain/builder.cpp
> +++ b/plugins/clang/duchain/builder.cpp
> @@ -928,6 +928,8 @@ void Visitor::setTypeSize(CXType type, AbstractType*
> kdevType) const
>  {
>      if (kdevType->whichType() == AbstractType::TypeFunction)
>          return;
> +
> +    type = clang_getCanonicalType(type);
>      if (type.kind == CXType_Elaborated)
>          return;
>  
> ```
> 
> If it persists, can you try to add CXType_Auto to the early return check and
> re-run the clang unit tests and see if it affects size information on lines
> like
> 
> ```
> auto foo = 4;
> ```

I could do that but sadly not judge the impact because with my self compiled KDevelop I cannot reproduce this crash that happens with the system package.

Maybe the clang version makes a difference here as I build against clang 10? I 
will try to rebuild against 8 to see if I can reproduce the crash this way.
Comment 8 nbgyan 2021-01-12 15:50:42 UTC
Update: 

after disabling Background Parser in Settings->Configure KDevelop, crashes have stopped.
Comment 9 Milian Wolff 2021-01-12 15:56:08 UTC
you could build against clang-8 by setting up the cmake env properly

anyhow, I guess I should just blindly push this change and then let neon update their packages, maybe it helps - it certainly sounds like the correct thing to do
Comment 10 David Redondo 2021-01-12 15:57:44 UTC
(In reply to Milian Wolff from comment #9)
> you could build against clang-8 by setting up the cmake env properly
> 
> anyhow, I guess I should just blindly push this change and then let neon
> update their packages, maybe it helps - it certainly sounds like the correct
> thing to do

I build against clang-8 but got no crash so far, also sadly I cannot provoke the systems packages to crash anymore, sorry :/
Comment 11 Francis Herne 2021-01-21 23:12:04 UTC
*** Bug 431796 has been marked as a duplicate of this bug. ***
Comment 12 Francis Herne 2021-01-21 23:13:18 UTC
*** Bug 431887 has been marked as a duplicate of this bug. ***
Comment 13 Francis Herne 2021-01-21 23:15:06 UTC
Note that the latter bug reporter (hefee on IRC) was using a version with the `type = clang_getCanonicalType(type);` commit, so it appears not to be a complete fix.
Comment 14 Milian Wolff 2021-01-22 09:05:23 UTC
it seems like it only affects older llvm versions, so I'll disable these features with anything older than llvm 10 - let's see if that covers it

otherwise I'll need a way to reproduce this
Comment 15 Milian Wolff 2021-01-22 09:33:35 UTC
Git commit 03a16bf1f5d99380dfa927ba4660935d43fae483 by Milian Wolff.
Committed on 22/01/2021 at 09:32.
Pushed by mwolff into branch 'master'.

Disable calls to clang_Type_getSizeOf for llvm-9 and below

Apparently that is unstable upstream. It works fine with llvm-10
and upwards I believe, so let's only keep this functionality for
these versions.

M  +6    -0    plugins/clang/duchain/builder.cpp

https://invent.kde.org/kdevelop/kdevelop/commit/03a16bf1f5d99380dfa927ba4660935d43fae483
Comment 16 Sandro Knauß 2021-01-22 23:40:45 UTC
Thanks a lot: This patch fixed the issue for me. kdevelop is compiled against clang-8.
Comment 17 gjditchfield 2021-01-22 23:57:57 UTC
kdevelop 4:5.6.1+p20.04+git20210122.1015-0 works for me.