Created attachment 108212 [details] Crash log Version is 5.1.80. Cannot pick that in form. Did not happen with 5.1.2. During initial syntax scan after application startup, the application crashes while parsing a file (always the same). Crash log attached. Console output is: libclang: crash detected during parsing: { 'source_filename' : '/home/wolff/repos/masterthesis/src/feature_extraction/signalprocessor.cpp' 'command_line_args' : ['clang', '-ferror-limit=100', '-fspell-checking', '-Wdocumentation', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-nostdinc', '-nostdinc++', '-xc++', '-isystem/usr/include/c++/7.2.0', '-isystem/usr/include/c++/7.2.0/x86_64-pc-linux-gnu', '-isystem/usr/include/c++/7.2.0/backward', '-isystem/usr/local/include', '-isystem/usr/lib/clang/5.0.0/include', '-isystem/usr/include', '-imacros', '/tmp/kdevelop.TJ1747'], 'unsaved_files' : [], 'options' : 781, } QSocketNotifier: Invalid socket 7 and type 'Read', disabling... QSocketNotifier: Invalid socket 10 and type 'Read', disabling... KCrash: Application 'kdevelop' crashing... KCrash: Attempting to start /usr/lib/drkonqi from kdeinit sock_file=/run/user/1000/kdeinit5__0 QSocketNotifier: Invalid socket 25 and type 'Read', disabling... QSocketNotifier: Invalid socket 191 and type 'Read', disabling... QSocketNotifier: Invalid socket 193 and type 'Exception', disabling... QSocketNotifier: Invalid socket 34 and type 'Read', disabling... QSocketNotifier: Invalid socket 428 and type 'Read', disabling... QSocketNotifier: Invalid socket 416 and type 'Read', disabling... QSocketNotifier: Invalid socket 446 and type 'Read', disabling... QSocketNotifier: Invalid socket 38 and type 'Read', disabling... QSocketNotifier: Invalid socket 42 and type 'Read', disabling... QSocketNotifier: Invalid socket 190 and type 'Read', disabling... QSocketNotifier: Invalid socket 192 and type 'Read', disabling... QSocketNotifier: Invalid socket 288 and type 'Read', disabling... QSocketNotifier: Invalid socket 183 and type 'Read', disabling...
Created attachment 108213 [details] File that triggers the crash
Hm, doesn't crash here, but it doesn't parse much of that file without context. Is the project available somewhere (github or so) so I could load the whole project?
(In reply to Sven Brauch from comment #2) > Hm, doesn't crash here, but it doesn't parse much of that file without > context. Is the project available somewhere (github or so) so I could load > the whole project? Unfortunately I am not allowed to share the full code... I downgraded Kdevelop for now. Maybe I have time to track down the issue tomorrow. Thanks for testing!
Have you tried compiling that file using standalone `clang` with the arguments as passed by KDevelop? (see the 'command_line_args' section of your error output; swap /tmp/kdevelop.TJ1747 for the actual filename). If that crashes, then it's a clang bug rather than a KDevelop one.
Francis, you're right. clang standalone crashes too. I now also noticed that KDevelop 5.1.2 shows the crash of clang in the console output. Yet, KDevelop 5.1.2 keeps on running while KDevelop 5.1.80 crashes.
Possibly the 5.1.2 package in Arch is built against an older version of libclang? Otherwise, there've been some changes to the handling of compiler arguments and include paths; 5.1.80 might be passing a slightly-different set of parameters that trigger this somehow. Try removing/changing the clang arguments and/or sections of your file to narrow down the bug, get a backtrace for standalone clang, then file a bug upstream if it isn't already known.
Disregard the first few lines; I misread your comment. Time to sleep...
Filed a clang bug at https://bugs.llvm.org/show_bug.cgi?id=34885 Still, it would be great if KDevelop would not crash when clang crashes (like it was in 5.1.2, at least for my case).
@Julian: Note: You can change the command-line arguments used to parse code inside KDevelop via Project -> Open Configuration -> Language Support -> C/C++ Parser -> C++ Profile. Try to remove or overwrite -Wall there. Also note: Due to the way KDevelop interacts with libclang (in-process) it will inherently crash if libclang causes a segfault. That's not easy to solve or work-around unfortunately. Thanks for reporting the bug upstream!