Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang
GNU General Public License v3.0
906 stars 99 forks source link

Irony holds onto file handles on Windows, preventing saving files #463

Open sonictk opened 6 years ago

sonictk commented 6 years ago

I'm experiencing an issue on Windows where I am unable to save files because irony-server.exe is holding a file lock on them. This lock continues even if I am not typing or have any completion candidate windows open at all. One workaround, strangely enough, is enabling flycheck-mode; this somehow releases the lock and allows for saving (although sometimes it will still be blocked due to the file handle being locked by irony, I can spam Cx -Cs and eventually one of the operations will succeed). The other alternative is to keep calling irony-server-kill whenever this problem occurs, or restart Emacs.

I cannot figure out how to reproduce this issue reliably: it seems that it will happen after a indeterminate period of time, for no reason whatsoever. Is there anything I can do force irony to release all file handle locks whenever attempting to save?