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

IntelliJ freezing (maybe when hovering a symbol to get documentation) #36

Open
afucher opened this issue Mar 13, 2024 · 2 comments
Open

Comments

@afucher
Copy link
Contributor

afucher commented Mar 13, 2024

Sometimes when I'm using IntelliJ it just freezes, I close with a Force Quit. When I open it again it shows me this error:

Freeze for 20 seconds
IDE KILLED! Sampled time: 14200ms, sampling rate: 100ms, GC time: 37ms (0%), Class loading: 0%

The stack is from the thread that was blocking EDT

com.intellij.diagnostic.Freeze
	at java.base@17.0.6/jdk.internal.misc.Unsafe.park(Native Method)
	at java.base@17.0.6/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
	at java.base@17.0.6/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:715)
	at java.base@17.0.6/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1047)
	at java.base@17.0.6/java.util.concurrent.CountDownLatch.await(CountDownLatch.java:230)
	at clojure.core$promise$reify__8591.deref(core.clj:7177)
	at clojure.core$deref.invokeStatic(core.clj:2337)
	at clojure.core$deref.invoke(core.clj:2323)
	at com.github.clojure_lsp.intellij.extension.documentation$build_doc.invokeStatic(documentation.clj:19)
	at com.github.clojure_lsp.intellij.extension.documentation$build_doc.invoke(documentation.clj:16)
	at com.github.clojure_lsp.intellij.extension.documentation$_generateDoc.invokeStatic(documentation.clj:38)
	at com.github.clojure_lsp.intellij.extension.documentation$_generateDoc.invoke(documentation.clj:37)
	at com.github.clojure_lsp.intellij.extension.Documentation.generateDoc(Unknown Source)
	at com.intellij.lang.documentation.CompositeDocumentationProvider.generateDoc(CompositeDocumentationProvider.java:135)
	at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.localDocHtml(PsiElementDocumentationTarget.kt:102)
	at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.localDoc(PsiElementDocumentationTarget.kt:88)
	at com.intellij.lang.documentation.psi.PsiElementDocumentationTarget.computeDocumentation(PsiElementDocumentationTarget.kt:75)
	at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2$documentationResult$1.invoke(impl.kt:58)
	at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2$documentationResult$1.invoke(impl.kt:57)
	at com.intellij.openapi.application.rw.InternalReadAction.insideReadAction(InternalReadAction.kt:90)
	at com.intellij.openapi.application.rw.InternalReadAction.access$insideReadAction(InternalReadAction.kt:15)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:74)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadCancellable$1.invoke(InternalReadAction.kt:73)
	at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17)
	at com.intellij.openapi.progress.CancellationKt$$Lambda$1440/0x00000003017af658.compute(Unknown Source)
	at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60)
	at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17)
	at com.intellij.openapi.progress.CancellationKt.executeWithJobAndCompleteIt(cancellation.kt:125)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1$lambda$0(cancellableReadAction.kt:49)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$$Lambda$1496/0x00000003018d49f8.run(Unknown Source)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1111)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal$lambda$1(cancellableReadAction.kt:47)
	at com.intellij.openapi.application.rw.CancellableReadActionKt$$Lambda$1495/0x00000003018d47b0.run(Unknown Source)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
	at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128)
	at com.intellij.openapi.application.rw.CancellableReadActionKt.cancellableReadActionInternal(cancellableReadAction.kt:45)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadCancellable(InternalReadAction.kt:73)
	at com.intellij.openapi.application.rw.InternalReadAction.access$tryReadCancellable(InternalReadAction.kt:15)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:59)
	at com.intellij.openapi.application.rw.InternalReadAction$tryReadAction$2.invoke(InternalReadAction.kt:54)
	at com.intellij.openapi.progress.CancellationKt.withCurrentJob$lambda$0(cancellation.kt:17)
	at com.intellij.openapi.progress.CancellationKt$$Lambda$1440/0x00000003017af658.compute(Unknown Source)
	at com.intellij.openapi.progress.Cancellation.withCurrentJob(Cancellation.java:60)
	at com.intellij.openapi.progress.CancellationKt.withCurrentJob(cancellation.kt:17)
	at com.intellij.openapi.progress.CoroutinesKt.blockingContext(coroutines.kt:142)
	at com.intellij.openapi.application.rw.InternalReadAction.tryReadAction(InternalReadAction.kt:54)
	at com.intellij.openapi.application.rw.InternalReadAction.readLoop(InternalReadAction.kt:46)
	at com.intellij.openapi.application.rw.InternalReadAction.access$readLoop(InternalReadAction.kt:15)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$2.invokeSuspend(InternalReadAction.kt:27)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$2.invoke(InternalReadAction.kt)
	at com.intellij.openapi.application.rw.InternalReadAction$runReadAction$2.invoke(InternalReadAction.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.openapi.application.rw.InternalReadAction.runReadAction(InternalReadAction.kt:23)
	at com.intellij.openapi.application.rw.PlatformReadActionSupport.executeReadAction(PlatformReadActionSupport.kt:24)
	at com.intellij.openapi.application.CoroutinesKt.constrainedReadAction(coroutines.kt:51)
	at com.intellij.openapi.application.CoroutinesKt.readAction(coroutines.kt:19)
	at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2.invokeSuspend(impl.kt:57)
	at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2.invoke(impl.kt)
	at com.intellij.lang.documentation.impl.ImplKt$computeDocumentation$2.invoke(impl.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.lang.documentation.impl.ImplKt.computeDocumentation(impl.kt:56)
	at com.intellij.lang.documentation.ide.impl.DocumentationPage.loadPage(DocumentationPage.kt:32)
	at com.intellij.lang.documentation.ide.impl.DocumentationBrowser.handleBrowserRequest(DocumentationBrowser.kt:91)
	at com.intellij.lang.documentation.ide.impl.DocumentationBrowser.access$handleBrowserRequest(DocumentationBrowser.kt:24)
	at com.intellij.lang.documentation.ide.impl.DocumentationBrowser$1$1.invokeSuspend(DocumentationBrowser.kt:51)
	at com.intellij.lang.documentation.ide.impl.DocumentationBrowser$1$1.invoke(DocumentationBrowser.kt)
	at com.intellij.lang.documentation.ide.impl.DocumentationBrowser$1$1.invoke(DocumentationBrowser.kt)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invokeSuspend(Merge.kt:214)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invoke(Merge.kt)
	at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invoke(Merge.kt)
	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invokeSuspend(Merge.kt:34)
	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Merge.kt)
	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Merge.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
	at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source)
	at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1.emit(Merge.kt:33)
	at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:383)
	at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
@ericdallo
Copy link
Member

@afucher I can't repro even adding a Thread/sleep on that line (check the print) 🤔, could you give more details about your OS, Intellij and plugin version?
Also, does that happens on smaller projects like https://github.com/ericdallo/clojure-sample?

image

@afucher
Copy link
Contributor Author

afucher commented Mar 19, 2024

I don't know if I can try with clojure-sample, because it happens randomly while I'm using. But about smaller projects, today it happened when I was working in the https://github.com/afucher/clojure-repl-intellij

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Triage
Development

No branches or pull requests

2 participants