Bug 503743

Summary: KDevelop sometimes crashes when writing an #include directive in a cpp file
Product: [Applications] kdevelop Reporter: Stefano Crocco <stefano.crocco>
Component: generalAssignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: crash CC: igorkuo
Priority: NOR Keywords: drkonqi
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: New crash information added by DrKonqi

Description Stefano Crocco 2025-05-04 10:28:33 UTC
Application: kdevelop (6.2.250400 (25.04.0))
 (Compiled from sources)
ApplicationNotResponding [ANR]: false
Qt Version: 6.8.3
Frameworks Version: 6.13.0
Operating System: Linux 6.14.4 x86_64
Windowing System: X11
Distribution: "Gentoo Linux"
DrKonqi: 6.3.4 [KCrashBackend]

-- Information about the crash:
Sometimes, when writing an #include directive in a .cpp file, KDevelop crashes. I've noticed this happening after starting writing the name of the file to include, for example
#include <QObj -> crash
This seems to happen randomly: sometimes it keeps happening more than once at the same place: I start writing the #include directive, KDevelop crashes, I start it again, retry and it crashes again, maybe even two or three times, then it works. Other times, it crashes once then it works.

I don't remember if I had it crash this way when including project-local files (#include "..."). I also don't remember if I had this crash in .h files.

The crash can be reproduced sometimes.

-- Backtrace (Reduced):
#7  0x00007f401b2c54ad in clang::ASTReader::ReadSLocEntry (this=0x7f3f5460ae30, ID=-27916) at /var/tmp/portage/llvm-core/clang-19.1.7/work/clang/lib/Serialization/ASTReader.cpp:1638
#8  0x00007f401a3527b6 in clang::SourceManager::loadSLocEntry (this=0x7f3eec8a3b00, Index=27914, Invalid=0x0) at /var/tmp/portage/llvm-core/clang-19.1.7/work/clang/lib/Basic/SourceManager.cpp:447
#9  0x00007f401a3538f2 in clang::SourceManager::getLoadedSLocEntry (this=0x7f3eec8a3b00, Index=27914, Invalid=0x0) at /var/tmp/portage/llvm-core/clang-19.1.7/work/clang/include/clang/Basic/SourceManager.h:1767
#10 clang::SourceManager::getLoadedSLocEntryByID (this=0x7f3eec8a3b00, ID=-27916, Invalid=0x0) at /var/tmp/portage/llvm-core/clang-19.1.7/work/clang/include/clang/Basic/SourceManager.h:1893
#11 clang::SourceManager::getSLocEntryByID (this=0x7f3eec8a3b00, ID=-27916, Invalid=0x0) at /var/tmp/portage/llvm-core/clang-19.1.7/work/clang/include/clang/Basic/SourceManager.h:1882


Reported using DrKonqi
Comment 1 Stefano Crocco 2025-05-04 10:28:34 UTC
Created attachment 180923 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Igor Kushnir 2025-05-04 18:02:06 UTC

*** This bug has been marked as a duplicate of bug 486932 ***