(Imported from a mail from KDevelop website) # Issue The background parser does not properly close header files, so that kdevelop can't save them / git can't checkout them. (I have to kill kdevelop to resolve that issue). It happen as soon as the header is parsed. # How to reproduce I used the 5.0.2 installer (updating over the first version of the installer). A project with similar crashes: https://github.com/tim42/hydra/ In the project configuration -> Language support -> includes/imports add the following paths: C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/winrt C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/atlmfc/include C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/shared C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/ucrt C:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0/um Defines: NOMINMAX= (The paths may be different on your system, notably the kit version). Obviously you need ms-studio + the windows 10 kit. I have to stop the initial project parsing because it would crash before completing.
The file-locking issue is libclang bug/misbehavior, also see: https://bugreports.qt.io/browse/QTCREATORBUG-15449
Note: Please try KDevelop 5.0.4, we've patched Clang slightly. Please report if that fixed the issue for you! https://www.kdevelop.org/download
The file-locking issue seems to only appears when the background parser for the current file is running, but once it is ended you can save it back. (even though I had it failing one time, but I didn't reproduced it yet). I also got a crash (de-referencing a null pointer) when editing a header file when the background parser was running. (after a quick debug, it looks like the crash is in a thread where only libclang functions are -- thread directly created by the main thread. I have a dump of this crash, but can't attach it there (130 Mo, compressed). As I don't have any debug symbols, I don't have a readable backtrace). Then again, that crash seems to be related to libclang.