-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YCM does not exit when vim exits #2403
Comments
Start Vim with YCM enabled and type the following command: :py3 ycm_state.OnVimLeave() Does it result in an error? Is the Python process still up after this command? |
I have the same problem. ycmd continues executing after vim is closed and consumes an significant amount of memory this way. If I execute you given command, I get the following error:
If i execute the command with the python2 interpreter, it does not give any error message or other output but kills the ycmd server associated with this file. |
@l3nkz Which OS and Vim version? Is the ycmd process not terminated each time you are closing Vim or does it happen randomly? |
@micbou I use an up-to-date Arch Linux with vim 8.0 with patches 1-55. I installed YCM via vundle and update it regularly. The ycmd process is never terminated together with vim. I can reproduce it very easily. |
But does it terminate right after or it doesn't terminate at all? |
The ycmd process is not terminated at all. I have to manually terminate it by sending SIGTERM to it. To be fair, I haven't checked if it terminates after some hours, because I am working in a VM with to little memory ;) |
It looks like YCM |
This command gives the following output for me.
|
So, YCM vim -c "autocmd VimLeave * call writefile([v:dying], 'vim_leave', 'a')" -c ":q" in a terminal? This should create the |
This command properly creates the |
And what about the ycmd process? |
I really can't reproduce the issue on my ArchLinux VM with Vim 8.0.55. This could be a bad interaction with another plugin. Is the ycmd process still up after closing Vim when starting it with this minimal vimrc? set nocompatible
set rtp+=~/.vim/bundle/YouComplete
filetype plugin indent on
syntax on |
Using this minimal vimrc fixed the problem for me. Thank you very much. I will dig deeper and see if I can find the plugin causing the behavior. Sorry for the noise. |
So closing for now 😉 |
I had the same problem, and did disabled my plugins one at a time, and found that the |
[READY] Add FAQ entry about YCM not shutting down when quitting Vim This issue has already been reported twice (#2403 and #2611) and is not something that we can fix on our side so we should mention it in the FAQ. Closes #2611. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2639) <!-- Reviewable:end -->
I am using vim 8 on Archlinux and YCM is installed using Vundle. The problem is I found that there are many python processes left running as many as the vim instances I opened and then closed. i.e. YCM doesn't gracefully exit when I quit a vim instance. I don't know if this is a bug but I really doubt this belongs to any vimrc option. I am ready to show any further details but I frankly I don't know what to show currently. I need some help in this. Thanks!
The text was updated successfully, but these errors were encountered: