Skip to content

KLS crashes after rpc connections #362

@Rockenstien

Description

@Rockenstien

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) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions