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
[SR-14980] Sourcekit-LSP crash after interrupting an incomplete completion #518
Comments
cc @benlangmuir |
@swift-ci create |
Can you clarify why you think sourcekit has crashed? Did you see a crash log for SourceKitService or sourcekit-lsp process? If so, are you able to attach it or otherwise capture the backtrace? From your logs it looks to me like sourcekit-lsp cannot have crashed, since it continued to reply, and there is no way to tell if sourcekitd crashed from what is in the log.
Can you clarify "only provides empty responses" or perhaps include more of the log? Is this to all requests or only to completion requests? Does the completion just keep using "triggerKind 3" without ever using a different trigger kind? The incomplete trigger kind (3) is only supposed to be used if it's considered part of the same completion as before. Does invoking code-completion manually somewhere else work? Incidentally, in Swift 5.5 we added '(' to the code-completion trigger characters, so I would expect the editor to perform a fresh completion after the '('. |
Comment by wibe (JIRA) the following link points to the full stack trace: it show clearly how the plugin tries to continuously query the sourcekit-lsp but gets no response back. to further elaborate on the "empty responses", from the stack trace one can deduce 2 different kinds of "cancel requests".
i am not at all sure the sourcekit-lsp is solely responsible. But reporting this might improve the stability of the program |
Comment by wibe (JIRA) after evaluating further i must admit, that i have been in the wrong. the process is still running and is returning messages. i have opened an issue here if further question arise: |
Comment by wibe (JIRA) invalid for the client is at fault |
Thanks for following up! |
Additional Detail from JIRA
md5: 4181e452d8e664e1f6b7f5ec72f3ff7e
Issue Description:
the server not to crash and return results.
the server crashed and only empty results after that
install sourcekit-lsp: https://github.com/emacs-lsp/lsp-sourcekit on emacs
install the swift toolchain
open a swift file
type "fun", select the "func"- option from the dropdown
try typing out "hello(name: string)" ignoring any suggestion
os: osx, editor: emacs, toolchain: 5.4.2
if done so as described above the sourcekit-lsp crashes
```
func hello(na
--------------^ here
```
it seems after the return message "request cancelled" with the code "-32800" the process sourcekit-lsp only provides empty responses. i included such an empty response in the following stacktrace, which starts from the point where I have selected the "func" option
and ends one message after the crash.
https://termbin.com/kwyw
the error from sourcekit-lsp:
2021-07-21 02:46:22.001 sourcekit-lsp[47:a15a5700] triggerFromIncompleteCompletions with incompatible completion session; expected DocumentURI(storage: \url{file:///work/cards/service/test/Sources/test/main.swift})@29, but got DocumentURI(storage: \url{file:///work/cards/service/test/Sources/test/main.swift})@35
The text was updated successfully, but these errors were encountered: