https://bugs.kde.org/show_bug.cgi?id=357407
Bug ID: 357407 Summary: No semantic syntax highlighting due to "libclang: crash detected during parsing" Product: kdevelop Version: 4.90.90 Platform: Kubuntu Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: Language Support: CPP (Clang-based) Assignee: kdevelop-bugs-n...@kde.org Reporter: piotr.mierzwin...@gmail.com After open KDevelop with my project (C++ using Qt4 and based on cmake) and when kdevduchain cache has been rebuilt (before start I removed it) and project was reparsed I noticed that there is no semantic syntax highlighting (of course this option is turned on) in any opened C++ source code file, whereas when I using last built kdevelop (built on begin of December) all was fine. Finally I found solution. You can find it on end this post. After kdevelop is starting I get following message in terminal: <cut> kdevelop(24205)/(default) unknown: QWidget::insertAction: Attempt to insert null action kdevelop(24205)/(default) unknown: QWidget::insertAction: Attempt to insert null action kdevelop(24205)/(kdevelop.projectmanagers.cmake) unknown: Could not import CMake project "/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/home/piotrek/Projekty/Qt/qtcmd_work/qtcmd_git/qtcmd2" ('compile_commands.json' missing) QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Nie ma takiego pliku ani katalogu QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: Nie ma takiego pliku ani katalogu libclang: crash detected during parsing: { 'source_filename' : '/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/home/piotrek/Projekty/Qt/qtcmd_work/qtcmd_git/qtcmd2/plugins/vfs/zipsubsystem/zipsubsystem.cpp' 'command_line_args' : ['-ferror-limit=100', '-fspell-checking', '-Wdocumentation', '-Wunused-parameter', '-Wunreachable-code', '-Wall', '-std=c++11', '-nostdinc', '-nostdinc++', '-xc++', '-include/usr/include/qt4/Qt/QtCore', '-include/usr/include/qt4/Qt/QtGui', '-include/usr/include/qt4/Qt/QtNetwork', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/include/c++/5', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/include/x86_64-linux-gnu/c++/5', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/include/c++/5/backward', '-isystem/usr/local/include', '-isystem/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/usr/lib/llvm-3.6/lib/clang/3.6.2/include', '-isystem/usr/include/x86_64-linux-gnu', '-isystem/usr/include', '-imacros', '/tmp/kdevelop.K24205'], 'unsaved_files' : [], 'options' : 45, } kdevelop(24205)/(default) unknown: clang_parseTranslationUnit2 return with error code 2 kdevelop(24205)/(default) unknown: Failed to parse translation unit: "/media/piotrek/FreeAgent/linux_containers/kubuntu_15.10/home/piotrek/Projekty/Qt/qtcmd_work/qtcmd_git/qtcmd2/plugins/vfs/zipsubsystem/zipsubsystem.cpp" </cut> The message starting from: "libclang: crash detected during parsing: " repeats for every file from my project. The settings of project wasn't changed since last running of kdevelop and are following: * Language Support -> Compilers (tab) - table with tree view (branch: Auto-detected): Clang, GCC - combo: "Compiler for path": Clang - C/C++ parser: Predefined profile: c++11 * CMake Variable: CMAKE_MAKE_PROGRAM points to ninja (here was make) Variable: QT_QMAKE_EXECUTABLE is not set (this variable was set) I noticed that after run of KDevelop "Ninja" was set in "Default generator", despite before (using previous build of kdevelop from begin of December) I have here "Unix Makefiles". I mean option in: Configure kdevelop -> CMake -> Configure global CMake setting -> Default generator: "Ninja" I set it to my previous value, so: "Unix Makefiles", closed kdevelop, removed "build" directory from project, removed kdevduchain cache and run KDevelop again. Thanks that semantic syntax highlighting back. It seems, and I'm not sure why, Ninja is default option for "Default generator". I have installed ninja, but didn't use it in my project. Reproducible: Always Actual Results: ninja is chose as "Default generator" whereas project use make (cmake) Expected Results: In my opinion ninja should not be set as "Default generator" where in configuration file is set cmake My configuration in "qtcmd2.kdev4" file [Project] Name=qtcmd2 Manager=KDevCMakeManager kdevplatform and kdevelop built at 2016.01.01 (branch 5.0) -- You are receiving this mail because: You are watching all bug changes.