Thank you for this excellent repo which has been really helpful. I have reproduced the following trace with the repo and a standard monaco server (harder to repro in VSCode but hopefully this gives an indication and this is very much the same issue as that linked below):
(relates to eclipse-archived/xtext-core#1451 )
SEVERE: Internal error: java.lang.IndexOutOfBoundsException: Position [
line = 8
character = 7
] text was : Hello Xtext!
Hello VSCode from Xtext!
Hello ThisFile from Other!
java.util.concurrent.CompletionException: java.lang.IndexOutOfBoundsException: Position [
line = 8
character = 7
] text was : Hello Xtext!
Hello VSCode from Xtext!
Hello ThisFile from Other!
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:704)
at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
at org.eclipse.xtext.ide.server.concurrent.AbstractRequest.logAndCompleteExceptionally(AbstractRequest.java:73)
at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$doRun$0(ReadRequest.java:69)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IndexOutOfBoundsException: Position [
line = 8
character = 7
] text was : Hello Xtext!
Hello VSCode from Xtext!
Hello ThisFile from Other!
at org.eclipse.xtext.ide.server.Document.getOffSet(Document.java:62)
at org.eclipse.xtext.ide.server.hover.HoverService.hover(HoverService.java:53)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$hover$32(LanguageServerImpl.java:718)
at org.eclipse.xtext.ide.server.WorkspaceManager.doRead(WorkspaceManager.java:438)
at org.eclipse.xtext.ide.server.LanguageServerImpl.hover(LanguageServerImpl.java:717)
at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$hover$31(LanguageServerImpl.java:704)
at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$doRun$0(ReadRequest.java:66)
... 5 more
to repro: on this fork and branch:
https://github.com/ewenmaclean/xtext-languageserver-example/tree/IndexOutOfBoundsError
in the monaco-server dir run yarn then yarn prepare in the server dir. Then yarn start from the server dir to start - you will get an editor at http://localhost:3000.
Now do the following - add the text:
Hello Xtext!
Hello VSCode from Xtext!
Hello ThisFile from Other!
then paste in at the end
Now hover over the validation error at "you!". Now delete this section, then press ctrl-Z so it reappears and then hover over the "you!" error again and you should get the error trace above
Thank you for this excellent repo which has been really helpful. I have reproduced the following trace with the repo and a standard monaco server (harder to repro in VSCode but hopefully this gives an indication and this is very much the same issue as that linked below):
(relates to eclipse-archived/xtext-core#1451 )
to repro: on this fork and branch:
https://github.com/ewenmaclean/xtext-languageserver-example/tree/IndexOutOfBoundsError
in the
monaco-serverdir runyarnthenyarn preparein the server dir. Thenyarn startfrom the server dir to start - you will get an editor athttp://localhost:3000.Now do the following - add the text:
then paste in at the end
Now hover over the validation error at "you!". Now delete this section, then press ctrl-Z so it reappears and then hover over the "you!" error again and you should get the error trace above