jacobdufault / cquery

C/C++ language server supporting multi-million line code base, powered by libclang. Emacs, Vim, VSCode, and others with language server protocol support. Cross references, completion, diagnostics, semantic highlighting and more
MIT License
2.35k stars 163 forks source link

cquery keeps file locks on Windows #726

Open Boddlnagg opened 6 years ago

Boddlnagg commented 6 years ago

Recently I run into the situation quite often that I cannot save a changed file in VS Code, because the file is in use by another process. When I kill the cquery.exe process, I can save the file, so the offending process is obviously cquery. It even happens after the analysis is finished, so it seems to me that you are leaking file handles which are never closed.

By the way, Microsoft's C/C++ extension had similar issues: https://github.com/Microsoft/vscode-cpptools/issues/1040

jacobdufault commented 6 years ago

Ack, looks like procmon will be useful for figuring out why.

phogy commented 4 years ago

I'm running into this often, but only with certain files. Any clues as to why this happens at all and why it seemingly happens to just the same few files? Thanks!