Environment:
- Java: JetBrains s.r.o. 17.0.5
- OS: W11
- IDE: IntelliJ IDEA 2024.1
- SonarLint: 10.4.2.78113
In IntelliJ 2024.1 a new possibly related exception is thrown
com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: Read access is allowed from inside read-action only (see Application.runReadAction()); see https://jb.gg/ij-platform-threading for details
Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 260438041 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1137204208
at com.intellij.util.concurrency.ThreadingAssertions.createThreadAccessException(ThreadingAssertions.java:180)
at com.intellij.util.concurrency.ThreadingAssertions.softAssertReadAccess(ThreadingAssertions.java:131)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:908)
at com.intellij.psi.impl.source.tree.TreeElement.assertReadAccessAllowed(TreeElement.java:421)
at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:175)
at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:234)
at com.intellij.psi.impl.source.tree.LazyParseablePsiElement.getFirstChild(LazyParseablePsiElement.java:82)
at com.intellij.psi.PsiWalkingState$PsiTreeGuide.getFirstChild(PsiWalkingState.java:32)
at com.intellij.psi.PsiWalkingState$PsiTreeGuide.getFirstChild(PsiWalkingState.java:14)
at com.intellij.util.WalkingState.next(WalkingState.java:70)
at com.intellij.util.WalkingState.walkChildren(WalkingState.java:49)
at com.intellij.util.WalkingState.elementStarted(WalkingState.java:40)
at com.intellij.psi.PsiWalkingState.elementStarted(PsiWalkingState.java:62)
at com.intellij.lang.javascript.psi.JSRecursiveWalkingElementVisitor.visitElement(JSRecursiveWalkingElementVisitor.java:29)
at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSElement(JSElementVisitor.java:235)
at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSSourceElement(JSElementVisitor.java:239)
at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSStatement(JSElementVisitor.java:249)
at com.intellij.lang.javascript.psi.JSElementVisitor.visitJSExpressionStatement(JSElementVisitor.java:203)
at com.intellij.lang.javascript.psi.impl.JSExpressionStatementImpl.accept(JSExpressionStatementImpl.java:47)
at com.intellij.psi.impl.source.tree.SharedImplUtil.acceptChildren(SharedImplUtil.java:183)
at com.intellij.psi.impl.source.PsiFileImpl.acceptChildren(PsiFileImpl.java:753)
at com.intellij.lang.javascript.index.JSFileCachedDataEvaluator.calculateReferencedPaths(JSFileCachedDataEvaluator.java:173)
at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getReferencedPaths(JSFileBaseImpl.java:218)
at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubImpl.<init>(JSFileStubImpl.java:29)
at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder.createStubForFile(JSFileStubBuilder.java:114)
at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder.doBuildStubTree(JSFileStubBuilder.java:65)
at com.intellij.lang.javascript.psi.stubs.impl.JSFileStubBuilder.buildStubTree(JSFileStubBuilder.java:45)
at com.intellij.psi.stubs.StubTreeBuilder.lambda$buildStubTree$1(StubTreeBuilder.java:142)
at com.intellij.psi.stubs.StubTreeBuilder.handleStubBuilderException(StubTreeBuilder.java:98)
at com.intellij.psi.stubs.StubTreeBuilder.lambda$buildStubTree$3(StubTreeBuilder.java:142)
at com.intellij.psi.impl.PsiManagerImpl.runInBatchFilesMode(PsiManagerImpl.java:462)
at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:132)
at com.intellij.psi.stubs.StubTreeBuilder.buildStubTree(StubTreeBuilder.java:91)
at com.intellij.psi.stubs.StubTreeLoaderImpl.lambda$build$0(StubTreeLoaderImpl.java:70)
at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66)
at com.intellij.psi.stubs.StubTreeLoaderImpl.lambda$build$1(StubTreeLoaderImpl.java:70)
at com.intellij.openapi.vfs.newvfs.impl.VirtualFileImpl.computeWithPreloadedContentHint(VirtualFileImpl.java:88)
at com.intellij.psi.stubs.StubTreeLoaderImpl.build(StubTreeLoaderImpl.java:59)
at com.intellij.psi.stubs.StubTreeLoaderImpl.readOrBuild(StubTreeLoaderImpl.java:50)
at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:630)
at com.intellij.psi.impl.source.PsiFileImpl.getGreenStubTree(PsiFileImpl.java:952)
at com.intellij.psi.impl.source.PsiFileImpl.getGreenStub(PsiFileImpl.java:607)
at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getGreenJSFileStub(JSFileBaseImpl.java:65)
at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getCachedData(JSFileBaseImpl.java:52)
at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.getTestFileType(JSFileBaseImpl.java:124)
at com.intellij.lang.javascript.psi.impl.JSFileBaseImpl.isTestFile(JSFileBaseImpl.java:119)
at com.intellij.javascript.testFramework.JsTestFileIndexingHandler.isTestFile(JsTestFileIndexingHandler.java:92)
at com.intellij.javascript.testing.JsTestSourcesFilter.isTestSource(JsTestSourcesFilter.java:12)
at com.intellij.openapi.roots.TestSourcesFilter.isTestSources(TestSourcesFilter.java:31)
at org.sonarlint.intellij.fs.IdeaClientModuleFileEventBuilderKt.buildClientModuleFileEventToVirtual(IdeaClientModuleFileEventBuilder.kt:43)
at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.allEventsFor(DefaultVirtualFileSystemEventsHandler.kt:98)
at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.fileEventsByModules(DefaultVirtualFileSystemEventsHandler.kt:88)
at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.forwardEvents(DefaultVirtualFileSystemEventsHandler.kt:59)
at org.sonarlint.intellij.fs.DefaultVirtualFileSystemEventsHandler.forwardEventsAsync$lambda$1(DefaultVirtualFileSystemEventsHandler.kt:49)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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:840)