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

KLS crashes after rpc connections #362

Open
Rockenstien opened this issue May 18, 2022 · 1 comment
Open

KLS crashes after rpc connections #362

Rockenstien opened this issue May 18, 2022 · 1 comment

Comments

@Rockenstien
Copy link

Rockenstien commented May 18, 2022

I am using Monaco Editor, So i am making calls to json rpc of KLS using websockets. But After these messages from server

 main      Kotlin Language Server: Version 1.4.0
 main      Connected to client
 async0    Adding workspace folder file:///root/language-server/monaco-languageclient/packages/examples/client/tmp
 async0    Adding .../tmp/tmp.kt, .../tmp/main.kt under /root/language-server/monaco-languageclient/packages/examples/client/tmp to source path

The server crashes and gives this error

java.util.concurrent.CompletionException: com.intellij.psi.PsiInvalidElementAccessException: Element: class org.jetbrains.kotlin.psi.KtFile #kotlin  because: project is disposed: com.intellij.mock.MockProject@63ff8d8f
invalidated at: no info
	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: com.intellij.psi.PsiInvalidElementAccessException: Element: class org.jetbrains.kotlin.psi.KtFile #kotlin  because: project is disposed: com.intellij.mock.MockProject@63ff8d8f
invalidated at: no info
	at com.intellij.psi.impl.source.PsiFileImpl.getText(PsiFileImpl.java:307)
	at org.javacs.kt.SourcePath$SourceFile.parseIfChanged(SourcePath.kt:77)
	at org.javacs.kt.SourcePath$SourceFile.compileIfNull(SourcePath.kt:82)
	at org.javacs.kt.SourcePath$SourceFile.prepareCompiledFile(SourcePath.kt:116)
	at org.javacs.kt.SourcePath.latestCompiledVersion(SourcePath.kt:189)
	at org.javacs.kt.KotlinTextDocumentService.recover(KotlinTextDocumentService.kt:88)
	at org.javacs.kt.KotlinTextDocumentService.access$recover(KotlinTextDocumentService.kt:36)
	at org.javacs.kt.KotlinTextDocumentService$codeAction$1.invoke(KotlinTextDocumentService.kt:93)
	at org.javacs.kt.KotlinTextDocumentService$codeAction$1.invoke(KotlinTextDocumentService.kt:92)
	at org.javacs.kt.util.AsyncExecutor.compute$lambda-2(AsyncExecutor.kt:19)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
@yahorbarkouski
Copy link
Contributor

Hey @Rockenstien! Have you succeed with your monaco editor try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants