Application: kdevelop (5.8.220401 (22.04.1)) Qt Version: 5.15.2 Frameworks Version: 5.94.0 Operating System: Linux 5.17.0-1-amd64 x86_64 Windowing System: X11 Distribution: Debian GNU/Linux bookworm/sid DrKonqi: 5.24.5 [KCrashBackend] -- Information about the crash: - What I was doing when the application crashed: just updated kdevelop. cleared all caches i know about : rm -r /home/artg/.local/share/kdevelop/; rm -r /home/artg/.cache/kdevduchain/; rm /home/artg/.config/kdeveloprc' partway through background parsing it crashed. did this 3 times in a row. uninstalled kdevelop & dependancies, removed some older versions of libraries. reinstalled. same crash. here is the terminal output: artg~/alocal/ajg_stuff: Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication. qrc:/qml/storage.js:10: TypeError: Cannot call method 'openDatabaseSync' of undefined qrc:/qml/storage.js:10: TypeError: Cannot call method 'openDatabaseSync' of undefined kdevplatform.shell: Could not load plugin "kdevperforce" , it reported the error: "The variable P4CONFIG is not set. Is perforce installed on the system?" Disabling the plugin now. Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication. /usr/bin/cat: /home/artg/.local/share/kdevelop/sessions/{8c305343-2f93-407d-9ede-6483394887e6}/default.sh: No such file or directory qrc:/qml/storage.js:10: TypeError: Cannot call method 'openDatabaseSync' of undefined qrc:/qml/storage.js:10: TypeError: Cannot call method 'openDatabaseSync' of undefined Running kdevelop instance (PID: 12,873) detected, making this one visible instead of starting a new one qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2245, resource id: 27263325, major code: 40 (TranslateCoords), minor code: 0 register count: 0, destroy count: 0 kdevplatform.shell: Could not load plugin "kdevperforce" , it reported the error: "The variable P4CONFIG is not set. Is perforce installed on the system?" Disabling the plugin now. Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication. /usr/bin/cat: /home/artg/.local/share/kdevelop/sessions/{23506f92-cb71-44c5-aafe-efb135d50319}/default.sh: No such file or directory qrc:/qml/storage.js:10: TypeError: Cannot call method 'openDatabaseSync' of undefined qrc:/qml/storage.js:10: TypeError: Cannot call method 'openDatabaseSync' of undefined kf.kio.widgets.kdirmodel: No node found for item that was just removed: QUrl("file:///home/artg/2021-01-21-09-41-05.086-VBoxSVC-17823.log") qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2823, resource id: 27263333, major code: 40 (TranslateCoords), minor code: 0 kf.kio.slaves.file: copy() QUrl("file:///home/artg/alocal/ajg_stuff/ajg_stuff.kdev4") to QUrl("file:///tmp/kdevelop.TWjTqj") mode= -1 kf.kio.slaves.file: the file doesn't have any xattr kdevelop.plugins.cmake: couldn't open CMakeCache.txt "/home/artg/alocal/ajg_stuff/build-debug/CMakeCache.txt" kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> register count: 0, destroy count: 0 kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.clang: Unhandled type: Dependent <dependent type> kdevelop.plugins.definesandincludes: error while fetching includes for the compiler: "clang" "Debian clang version 13.0.1-4\nTarget: x86_64-pc-linux-gnu\nThread model: posix\nInstalledDir: /usr/bin\nFound candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/10\nFound candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11\nSelected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/11\nCandidate multilib: .;@m64\nSelected multilib: .;@m64\n (in-process)\n \"/usr/lib/llvm-13/bin/clang\" -cc1 -triple x86_64-pc-linux-gnu -E -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -v -fcoverage-compilation-dir=/home/artg/alocal/ajg_stuff/build-debug -resource-dir /usr/lib/llvm-13/lib/clang/13.0.1 -internal-isystem /usr/lib/llvm-13/lib/clang/13.0.1/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -std=c++20 -fdebug-compilation-dir=/home/artg/alocal/ajg_stuff/build-debug -ferror-limit 19 -fgnuc-version=4.2.1 -fno-implicit-modules -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o - -x c -\nerror: invalid argument '-std=c++20' not allowed with 'C'\n" kdevelop.plugins.definesandincludes: error while fetching defines for the compiler: "clang" ("-xc", "-std=c++20", "-dM", "-E", "-") "error: invalid argument '-std=c++20' not allowed with 'C'\n" KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kdevelop path = /usr/bin pid = 13070 KCrash: Arguments: /usr/bin/kdevelop -s {23506f92-cb71-44c5-aafe-efb135d50319} KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi QSocketNotifier: Invalid socket 6 and type 'Read', disabling... QSocketNotifier: Invalid socket 9 and type 'Read', disabling... QSocketNotifier: Invalid socket 12 and type 'Read', disabling... QSocketNotifier: Invalid socket 62 and type 'Read', disabling... QSocketNotifier: Invalid socket 76 and type 'Read', disabling... QSocketNotifier: Invalid socket 66 and type 'Read', disabling... QSocketNotifier: Invalid socket 69 and type 'Exception', disabling... QSocketNotifier: Invalid socket 71 and type 'Read', disabling... QSocketNotifier: Invalid socket 23 and type 'Read', disabling... QSocketNotifier: Invalid socket 20 and type 'Read', disabling... QSocketNotifier: Invalid socket 28 and type 'Read', disabling... QSocketNotifier: Invalid socket 29 and type 'Read', disabling... QSocketNotifier: Invalid socket 27 and type 'Read', disabling... QSocketNotifier: Invalid socket 26 and type 'Read', disabling... QSocketNotifier: Invalid socket 8 and type 'Read', disabling... QSocketNotifier: Invalid socket 10 and type 'Read', disabling... QSocketNotifier: Invalid socket 11 and type 'Read', disabling... QSocketNotifier: Invalid socket 47 and type 'Read', disabling... 26 ../sysdeps/unix/sysv/linux/read.c: No such file or directory. org.kde.drkonqi.bugzilla: APIException: QHash(("code", QVariant(qlonglong, 300))("message", QVariant(QString, "The login or password you entered is not valid."))("error", QVariant(bool, true))("documentation", QVariant(QString, "https://bugzilla.readthedocs.org/en/5.0/api/"))) org.kde.drkonqi: "[300] The login or password you entered is not valid." kf.i18n.kuit: "Tag 'p' is not defined in message {<__kuit_internal_top__><p><note>The bug report's title is often written by its r...}." qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 50541, resource id: 27263397, major code: 40 (TranslateCoords), minor code: 0 The crash can be reproduced every time. -- Backtrace (Reduced): #4 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:451 #5 0x00007f3fb6d48572 in llvm::APInt::initSlowCase(llvm::APInt const&) () at /lib/x86_64-linux-gnu/libLLVM-13.so.1 #6 0x00007f3fc9827b3b in APInt () at llvm/include/llvm/ADT/APInt.h:321 #7 APSInt () at llvm/include/llvm/ADT/APSInt.h:22 #8 EvaluateKnownConstInt() () at clang/lib/AST/ExprConstant.cpp:15006 Possible duplicates by query: bug 438249, bug 431811, bug 386527. Reported using DrKonqi
Created attachment 149368 [details] New crash information added by DrKonqi DrKonqi auto-attaching complete backtrace.
Judging by the common "getBitWidthValue" line in the backtraces, this and Bug 438249 are both duplicates of Bug 431811. In the oldest of these bugs the following workaround is proposed: > If I change > decl->setBitWidth(clang_getFieldDeclBitWidth(cursor)); > to > decl->setBitWidth(-1); > , KDevelop will finish the parsing without issue. Could you try if that works for you? What LLVM versions did you use to build and run KDevelop? In that same Bug 431811 I proposed this: > If other users experience this crash with LLVM version < 11, then KDevelop should probably disable the new feature by calling decl->setBitWidth(-1) when it is compiled against an older LLVM version.
I am running KDevelop-5.6.1-x86_64.AppImage, so no source to play with. I had compiled git master for a decade or so, then a year ago this crashing while importing started to happen. The above AppImage worked, so I used it. A few months ago I tried the version in debian testing, which worked perfectly till an upgrade arrived today. I suspect I was using LLVM11 a year ago when the crashing started, but not certain. It is now past midnight, and I have to stop. Tomorrow I will add your trial fix to my git clone and will be compiling with LLVM13 and report back. Thank you for looking at this issue, I love KDevelop!
Well Igor, that worked! Patched builder.cpp in my updated master git clone as suggested, compiled with LLVM13 on debian testing, all dependencies satisfied. Loaded 3 projects, parsed, compiled, ran all projects. no issues. Its worked for 45 mins, before it was always 1~5 mins. I'll be using kdevelop for a couple hours a day for the next few days and will report back if any problems. Assuming all is well, is there anything further I need to do to close this? This looks like an uncommon issue, specific to some systems, perhaps too few for it to be a priority. If you want to use my system as a crash test dummy, I'm happy to try any experiments. Now I really really need to go to bed. Thank you Igor.
*** This bug has been marked as a duplicate of bug 438249 ***