gregsh / Clojure-Kit

Clojure/ClojureScript plugin for IntelliJ-based IDEs
Other
248 stars 21 forks source link

Do not perform a synchronous refresh under read lock (causes deadlocks if there are events to fire). EDT=false #49

Open Mishail opened 1 year ago

Mishail commented 1 year ago

Getting this exception for the following configuration:

java.lang.Throwable: Do not perform a synchronous refresh under read lock (causes deadlocks if there are events to fire). EDT=false
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:370)
    at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.execute(RefreshQueueImpl.java:62)
    at com.intellij.openapi.vfs.newvfs.RefreshSessionImpl.launch(RefreshSessionImpl.java:119)
    at com.intellij.openapi.vfs.newvfs.RefreshQueueImpl.processEvents(RefreshQueueImpl.java:189)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.createAndFindChildWithEventFire(VirtualDirectoryImpl.java:308)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:87)
    at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.refreshAndFindChild(VirtualDirectoryImpl.java:349)
    at com.intellij.openapi.vfs.newvfs.VfsImplUtil.refreshAndFindFileByPath(VfsImplUtil.java:117)
    at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.refreshAndFindFileByPath(LocalFileSystemBase.java:132)
    at com.intellij.openapi.vfs.LocalFileSystem.refreshAndFindFileByIoFile(LocalFileSystem.java:42)
    at org.intellij.clojure.tools.Tools_depsKt.resolveDependency(tools-deps.kt:232)
    at org.intellij.clojure.tools.Tools_depsKt.access$resolveDependency(tools-deps.kt:1)
    at org.intellij.clojure.tools.ClojureProjectDeps$allDependencies$2.invoke(tools-deps.kt:90)
    at org.intellij.clojure.tools.ClojureProjectDeps$allDependencies$2.invoke(tools-deps.kt:66)
    at org.intellij.clojure.tools.Tools_depsKt$sam$com_intellij_util_Function$0.fun(tools-deps.kt)
    at com.intellij.util.containers.JBIterator$MapOp.apply(JBIterator.java:271)
    at com.intellij.util.containers.JBIterator.peekNext(JBIterator.java:132)
    at com.intellij.util.containers.JBIterator.hasNext(JBIterator.java:92)
    at com.intellij.util.containers.JBIterable.addAllTo(JBIterable.java:884)
    at org.intellij.clojure.tools.ClojureProjectDeps.getAllDependencies(tools-deps.kt:92)
    at org.intellij.clojure.tools.ClojureProjectDeps$RootsProvider.getAdditionalProjectLibraries(tools-deps.kt:77)
    at com.intellij.openapi.roots.impl.RootIndex.buildRootInfo(RootIndex.java:163)
    at com.intellij.openapi.roots.impl.RootIndex.getOrderEntryGraph(RootIndex.java:349)
    at com.intellij.openapi.roots.impl.RootIndex.getOrderEntries(RootIndex.java:843)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getOrderEntries(DirectoryIndexImpl.java:146)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getOrderEntriesForFile(ProjectFileIndexImpl.java:105)
    at com.intellij.psi.search.ProjectAndLibrariesScope.compare(ProjectAndLibrariesScope.java:38)
    at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:110)
    at com.intellij.psi.impl.PsiElementFinderImpl.findClass(PsiElementFinderImpl.java:40)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:94)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:72)
    at com.intellij.java.library.JavaLibraryUtil.lambda$getLibraryClassMap$0(JavaLibraryUtil.java:95)
    at com.intellij.util.containers.ConcurrentFactoryMap$2.create(ConcurrentFactoryMap.java:174)
    at com.intellij.util.containers.ConcurrentFactoryMap.get(ConcurrentFactoryMap.java:40)
    at java.base/java.util.concurrent.ConcurrentMap.getOrDefault(ConcurrentMap.java:88)
    at com.intellij.java.library.JavaLibraryUtil.hasLibraryClass(JavaLibraryUtil.java:77)
    at com.intellij.ws.rest.utils.RSUtils.hasRestLibrary(RSUtils.java:154)
    at com.intellij.ws.rest.model.jam.RSSemContributor.isAvailable(RSSemContributor.java:37)
    at com.intellij.semantic.SemServiceImpl.lambda$collectProducers$2(SemServiceImpl.java:99)
    at com.intellij.openapi.extensions.impl.ExtensionPointImpl.processWithPluginDescriptor(ExtensionPointImpl.java:300)
    at com.intellij.openapi.extensions.ExtensionPointName.processWithPluginDescriptor(ExtensionPointName.kt:139)
    at com.intellij.semantic.SemServiceImpl.collectProducers(SemServiceImpl.java:83)
    at com.intellij.semantic.SemServiceImpl.ensureInitialized(SemServiceImpl.java:161)
    at com.intellij.semantic.SemServiceImpl.createSemElements(SemServiceImpl.java:117)
    at com.intellij.semantic.SemServiceImpl.getSemElements(SemServiceImpl.java:111)
    at com.intellij.semantic.SemService.getSemElement(SemService.java:31)
    at com.intellij.microservices.url.parameters.RenameableSemElementKt.getSemElement(RenameableSemElement.kt:65)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt.l(SemElementRenamePsiElementProcessor.kt:160)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt.access$createPomTargetFromSemElement(SemElementRenamePsiElementProcessor.kt:1)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt$supportedElement$2.invoke(SemElementRenamePsiElementProcessor.kt:147)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt$supportedElement$2.invoke(SemElementRenamePsiElementProcessor.kt:147)
    at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)
    at kotlin.sequences.FilteringSequence$iterator$1.calcNext(Sequences.kt:170)
    at kotlin.sequences.FilteringSequence$iterator$1.hasNext(Sequences.kt:194)
    at kotlin.sequences.SequencesKt___SequencesKt.firstOrNull(_Sequences.kt:168)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt.l(SemElementRenamePsiElementProcessor.kt:153)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt.l(SemElementRenamePsiElementProcessor.kt:147)
    at com.intellij.microservices.url.parameters.SemElementRenamePsiElementProcessorKt.access$supportedElement(SemElementRenamePsiElementProcessor.kt:1)
    at com.intellij.microservices.url.parameters.RenameableSemElementFindUsagesHandlerFactory.canFindUsages(SemElementRenamePsiElementProcessor.kt:38)
    at com.intellij.find.findUsages.FindUsagesManager.getFindUsagesHandler(FindUsagesManager.java:160)
    at com.intellij.find.findUsages.FindUsagesManager.getFindUsagesHandler(FindUsagesManager.java:154)
    at com.intellij.codeInsight.highlighting.HighlightUsagesKt.getPsiUsageRanges(highlightUsages.kt:83)
    at com.intellij.codeInsight.highlighting.HighlightUsagesKt.getUsageRanges(highlightUsages.kt:65)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.lambda$highlightTargetUsages$0(IdentifierHighlighterPass.java:235)
    at com.intellij.util.AstLoadingFilter.lambda$toComputable$2(AstLoadingFilter.java:172)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:130)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:114)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightTargetUsages(IdentifierHighlighterPass.java:234)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.highlightReferencesAndDeclarations(IdentifierHighlighterPass.java:210)
    at com.intellij.codeInsight.daemon.impl.IdentifierHighlighterPass.doCollectInformation(IdentifierHighlighterPass.java:97)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$5(BackgroundHighlighter.java:219)
    at com.intellij.codeInsight.daemon.impl.HighlightingSessionImpl.runInsideHighlightingSession(HighlightingSessionImpl.java:157)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$6(BackgroundHighlighter.java:217)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
    at com.intellij.codeInsight.highlighting.BackgroundHighlighter.lambda$submitIdentifierHighlighterPass$7(BackgroundHighlighter.java:214)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor.callWrapped(NonBlockingReadActionImpl.java:832)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$OTelMonitor$MonitoredComputation.call(NonBlockingReadActionImpl.java:864)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.insideReadAction(NonBlockingReadActionImpl.java:602)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$attemptComputation$4(NonBlockingReadActionImpl.java:565)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runInReadActionWithWriteActionPriority$0(ProgressIndicatorUtils.java:76)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:133)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:114)
    at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:71)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
    at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
    at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:71)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:111)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runInReadActionWithWriteActionPriority(ProgressIndicatorUtils.java:76)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.attemptComputation(NonBlockingReadActionImpl.java:565)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$1(NonBlockingReadActionImpl.java:466)
    at com.intellij.openapi.application.impl.NonBlockingReadActionImpl$Submission.lambda$transferToBgThread$2(NonBlockingReadActionImpl.java:481)
    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.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
    at java.base/java.lang.Thread.run(Thread.java:833)