Skip to content
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

Che fails on hover if Language Server returns Hover object with null contents #10480

Closed
philcolol opened this issue Jul 19, 2018 · 3 comments
Closed
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.

Comments

@philcolol
Copy link

Description

If LS returns Hover with empty list inside contents, everything works fine.
But if it returns null inside contents field, Che fails with exception.
Is this intended behavioour?

OS and version:
OS: Win10
Che: 6.6

Diagnostics:
2018-07-19 09:12:57,168[ool-10-thread-1] [INFO ] [o.e.c.a.l.util.OperationUtil 90] - Exception occurred in request java.util.concurrent.CompletionException: java.lang.NullPointerException at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:659) at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474) at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1962) at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632) at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.lambda$request$1(RemoteEndpoint.java:123) at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:77) at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:149) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleResponse(RemoteEndpoint.java:162) at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:84) at org.eclipse.che.api.languageserver.TextDocumentService$6.handleResult(TextDocumentService.java:407) at org.eclipse.che.api.languageserver.TextDocumentService$6.handleResult(TextDocumentService.java:391) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException: null at java.util.ArrayList.addAll(ArrayList.java:581) ... 14 common frames omitted at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656) at org.eclipse.che.api.languageserver.util.OperationUtil.lambda$doInParallel$0(OperationUtil.java:82) at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:149)

@ghost
Copy link

ghost commented Jul 19, 2018

@philcolol what language server is in question and what would be steps to reproduce? Thank you

@ghost ghost added the kind/question Questions that haven't been identified as being feature requests or bugs. label Jul 19, 2018
@philcolol
Copy link
Author

Any language server, that returns Hover with null contents. We reproduced this on our custom LS. I created a simple example of such LS: https://github.com/philcolol/ls-examples
Steps:

  1. launch che with LS-example
  2. open file
  3. hover on any word below line 100

@ghost ghost added kind/bug Outline of a bug - must adhere to the bug report template. team/ide severity/P2 Has a minor but important impact to the usage or development of the system. and removed kind/question Questions that haven't been identified as being feature requests or bugs. labels Jul 25, 2018
@vparfonov vparfonov added severity/P1 Has a major impact to usage or development of the system. and removed sprint/next severity/P2 Has a minor but important impact to the usage or development of the system. labels Oct 17, 2018
@tsmaeder
Copy link
Contributor

I suspect this has been fixed by updating lsp4j to 5.0

@vinokurig vinokurig self-assigned this Nov 7, 2018
@vinokurig vinokurig added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Projects
None yet
Development

No branches or pull requests

4 participants