Closed dwoznicki closed 5 years ago
I can't say that I understand how is this happening, but that backtrace shows that current_window
in vim.current.window = current_window
(vimsupport.py
, CurrentWindow()
) refers to a deleted window.
Thanks for the report. This happens because YCM go through all the windows to update the diagnostics once the Java server is initialized. During this operation, the WinEnter
and WinLeave
events are ignored but not the BufEnter
and BufLeave
ones which are also triggered when moving to a different window. The issue is that ctrlp.vim delete its buffer on the BufLeave
event. When YCM tries to go back to the initial window (the ctrlp.vim one), it fails because the window doesn't exist anymore. The BufEnter
and BufLeave
events should be ignored as well. See PR https://github.com/Valloric/YouCompleteMe/pull/3152.
Since #3247 is merged and reverted #3024, this bug is no longer valid.
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
inside the brackets) before filing your issue:vim --version
.:YcmDebugInfo
.:YcmToggleLogs
command.install.py
(orcmake
/make
/ninja
) including its invocationThank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.
Issue Details
A quick overview: This issue refers to ctrlp.vim (https://github.com/ctrlpvim/ctrlp.vim) and a possible conflict while using the java completer for YouCompleteMe. I can reproduce the issue without any configuration for YouCompleteMe or ctrlp.vim.
mkdir -p /tmp/hello/.git
(ctrlp.vim uses the.git
dir to find the project root by default)/tmp/hello/Hello.java
vim /tmp/hello/Hello.java
, quickly press<CTRL> + p
to open ctrlp.vim window and type a random character. a. This must be done before the Java Language Server finishes loading b. The ctrlp.vim window with the typed character must still be open when the Java Language Server finishes loadingProbably YCM to initialize the Java Language Server without affecting the ctrlp.vim I have open.
I get an exception stack trace in my vim window with
Press ENTER or type command to continue
between each item in the stack. I removed thePress ENTER or type command to continue
logs from the trace below. This error does not appear to be logged in any:YcmToggleLogs
files.Diagnostic data
Output of
vim --version
Output of
YcmDebugInfo
Contents of YCM, ycmd and completion engine logfiles
:YcmToggleLogs
output:.log
output:jdt.ls_stderr_MtAtmu.log
output:ycm_x2nwqud2.log
output:ycmd_43189_stderr_v72ugy9s.log
output: https://gist.github.com/dwoznicki/0dbcd691021e2c49143c9952d58db75fycmd_43189_stdout_fodj7y_d.log
output:OS version, distribution, etc.
Ubuntu 16.04.1 LTS (GNU/Linux 4.12.0-041200rc1-generic x86_64)
Output of build/install commands