SUMMARY I started trying to use KDevelop 5.3.2 on Centos 7 running KDE. While background parsing my existing C++ project, the main KDevelop window disappears and I get a segmentation fault. /tmp/.mount_KDevelLq3RAG/AppRun: line 36: 48806 Segmentation fault (core dumped) kdevelop $@ No other information. STEPS TO REPRODUCE 1. Launch KDevelop 2. Open a project to my existing source directory 3. Wait while it parses the file. OBSERVED RESULT KDevelop disappears and the console where I opened it shows "/tmp/.mount_KDevelLq3RAG/AppRun: line 36: 48806 Segmentation fault (core dumped) kdevelop $@" EXPECTED RESULT No crash SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) Centos 7 KDE Plasma Version: 4.14.8 KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION How can I get more information to you?
Created attachment 131672 [details] Kdevelop backtrace
I have the same symptom with Kdevelop 5.6.0 – sigsegv when parsing the project. I ran kdevelop in gdb to get the backtrace. I did this 3 times to see if it segfaults at the same place every time, and it seems so: clang::InjectedClassNameType::getDecl in tools/clang/lib/AST/Type.cpp:3387 This happens in an extremely deep recursion inside libclang-10: The two functions TransformTypos::RecursiveTransformLoop and TransformTypos::CheckForRecursiveTypos are running in tandem 23214 or 20548 times (not the same every time) before calling the series of functions that lead to the segfault.
I don’t have a backtrace, but for me it fails when opening a Python project while parsing the site-packages. Interestingly it fails when IPython is installed, but it doesn’t when I uninstall it. (gentoo, kdevelop 5.6.0)
The last comment is probably https://bugs.kde.org/show_bug.cgi?id=426292, and unrelated to the original report.
I'm using kdevelop 5.13.240201 and it crashes for me. Some months ago it crashed and I solved it by removing the cache and kdevelop project files and starting from zero. Then it crashed again. Today while I was building the project and changing some files it crashed and now every time I open the problematic project it crashes. It also seems to be related with clang, from gdb backtrace: #0 0x00007fffbdec44d0 in clang_getFileContents () at /usr/lib/llvm/17/lib64/libclang.so.17 #1 0x00007fffc79c7188 in ClangUtils::getRawContents (unit=unit@entry=0x7ffe9c009a40, range=...) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/util/clangutils.cpp:345 #2 0x00007fffc79b0e34 in (anonymous namespace)::fixitsForDiagnostic (diagnostic=diagnostic@entry=0x7ffec059e570, unit=unit@entry=0x7ffe9c009a40) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangproblem.cpp:63 #3 0x00007fffc79b175c in ClangProblem::ClangProblem (this=0x7ffec0a9e540, diagnostic=0x7ffec059e570, unit=0x7ffe9c009a40) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangproblem.cpp:154 #4 0x00007fffc79b1a15 in ClangProblem::ClangProblem (this=this@entry=0x7ffec0a9c7e0, diagnostic=diagnostic@entry=0x7ffec059eb60, unit=unit@entry=0x7ffe9c009a40) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangproblem.cpp:164 #5 0x00007fffc79c1422 in UnknownDeclarationProblem::UnknownDeclarationProblem (this=this@entry=0x7ffec0a9c7e0, diagnostic=diagnostic@entry=0x7ffec059eb60, unit=unit@entry=0x7ffe9c009a40) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/unknowndeclarationproblem.cpp:535 #6 0x00007fffc79a423d in ClangDiagnosticEvaluator::createProblem (diagnostic=diagnostic@entry=0x7ffec059eb60, unit=0x7ffe9c009a40) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/clangdiagnosticevaluator.cpp:108 #7 0x00007fffc79b9efc in ParseSession::getOrCreateProblem (this=this@entry=0x7fff53dffac8, indexInTU=indexInTU@entry=9, diagnostic=diagnostic@entry=0x7ffec059eb60) at /var/tmp/portage/dev-util/kdevelop-24.02.1/work/kdevelop-24.02.1/plugins/clang/duchain/parsesession.cpp:501