-
Notifications
You must be signed in to change notification settings - Fork 770
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
Invalid protocol data crashes ycmd #1673
Comments
The only caller to this method does handle exceptions from this method, so instead of crashing, just log the message and continue processing This is related to ycm-core#1673
The only caller to this method does not handle exceptions from this method, so instead of crashing, just log the message and continue processing This is related to ycm-core#1673
I think it is better to raise this as a bug against ansible-language-server, as it's clearly invalid. |
Sure, but I also think ycmd should be resilient and not crash upon receiving invalid data. The logic for handling the error is in there, but I think the problem is that the Removing the |
I don't agree that ycmd is crashing. The language server connection thread is aborting due to invalid protocol data (which cannot be recovered from): except Exception:
LOGGER.exception( 'The language server communication channel closed '
'unexpectedly. Issue a RestartServer command to '
'recover.' )
# Abort any outstanding requests
with self._response_mutex:
for _, response in self._responses.items():
response.Abort()
self._responses.clear()
# Close any remaining sockets or files
self.Shutdown()
|
See but in this instance the protocol data is just that |
presumably, you could also convince ansible-language-server to listen on a TCP port instead of using stdio, as it clearly doesn't work properly. |
Yes, I attempted to change my |
I have configured ansible-language-server as a language server, as follows in my
vimrc
The problem is that
YouCompleteMe/ycmd
crashes due the fact that whenansible-language-server
starts, it has a coupleconsole.debug
statements around which linting system it will use.ansible-language-server
is built using Node.js and unfortunately only honors the--stdio
flag for starting the language server. In Node.js,console.debug
is just a redirect to console.log.As a result,
ansible-language-server
upon startup emits a line tostdio
that is not a valid protocol data, which crashes ycmd.The text was updated successfully, but these errors were encountered: