Error in SonarLint for IntelliJ 10.4.1: Throwable: Read access is allowed from inside read-action

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2022.3.3
  • SonarLint: 10.4.1.77998

Details: Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 939126086
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1339725238

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see c.ij.oa.application.Application.runReadAction())
	at c.ij.oa.diagnostic.Logger.error(Logger.java:228)
	at c.ij.oa.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at c.ij.workspaceModel.core.fileIndex.impl.NonIncrementalContributors.updateIfNeeded(NonIncrementalContributors.kt:39)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexData.getFileInfo(WorkspaceFileIndexData.kt:70)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:88)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:73)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:134)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:126)
	at c.ij.oa.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)

Hello @tihonov.m.i, thank you for your report. I created this bug ticket and we will fix this for the next release.

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Linux amd64
  • IDE: IntelliJ IDEA 2022.3.3
  • SonarLint: 10.4.1.77998

Details: Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 1410454525
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 2063202647

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see c.ij.oa.application.Application.runReadAction())
	at c.ij.oa.diagnostic.Logger.error(Logger.java:228)
	at c.ij.oa.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at c.ij.workspaceModel.core.fileIndex.impl.NonIncrementalContributors.updateIfNeeded(NonIncrementalContributors.kt:39)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexData.getFileInfo(WorkspaceFileIndexData.kt:70)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:88)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:73)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:134)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:126)
	at c.ij.oa.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2022.3.3
  • SonarLint: 10.4.1.77998

Details: Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 939126086
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1339725238

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see c.ij.oa.application.Application.runReadAction())
	at c.ij.oa.diagnostic.Logger.error(Logger.java:228)
	at c.ij.oa.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at c.ij.workspaceModel.core.fileIndex.impl.NonIncrementalContributors.updateIfNeeded(NonIncrementalContributors.kt:39)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexData.getFileInfo(WorkspaceFileIndexData.kt:70)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:88)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:73)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:134)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:126)
	at c.ij.oa.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2022.3.3
  • SonarLint: 10.4.1.77998

Details: Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 939126086
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1339725238

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see c.ij.oa.application.Application.runReadAction())
	at c.ij.oa.diagnostic.Logger.error(Logger.java:228)
	at c.ij.oa.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at c.ij.workspaceModel.core.fileIndex.impl.NonIncrementalContributors.updateIfNeeded(NonIncrementalContributors.kt:39)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexData.getFileInfo(WorkspaceFileIndexData.kt:70)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:88)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:73)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:134)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:126)
	at c.ij.oa.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Windows 10 amd64
  • IDE: IntelliJ IDEA 2022.3.3
  • SonarLint: 10.4.1.77998

Details: Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 884745155
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 454402272

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see c.ij.oa.application.Application.runReadAction())
	at c.ij.oa.diagnostic.Logger.error(Logger.java:228)
	at c.ij.oa.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at c.ij.workspaceModel.core.fileIndex.impl.NonIncrementalContributors.updateIfNeeded(NonIncrementalContributors.kt:39)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexData.getFileInfo(WorkspaceFileIndexData.kt:70)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:88)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:73)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:134)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:126)
	at c.ij.oa.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)

Environment:

  • Java: JetBrains s.r.o. 17.0.6
  • OS: Linux amd64
  • IDE: IntelliJ IDEA 2022.3.3
  • SonarLint: 10.4.1.77998

Details: Current thread: Thread[sonarlint-vfs-events-notifier,6,main] 983751203
Dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1376314874

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see c.ij.oa.application.Application.runReadAction())
	at c.ij.oa.diagnostic.Logger.error(Logger.java:228)
	at c.ij.oa.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1013)
	at c.ij.workspaceModel.core.fileIndex.impl.NonIncrementalContributors.updateIfNeeded(NonIncrementalContributors.kt:39)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexData.getFileInfo(WorkspaceFileIndexData.kt:70)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.getFileInfo(WorkspaceFileIndexImpl.kt:88)
	at c.ij.workspaceModel.core.fileIndex.impl.WorkspaceFileIndexImpl.findFileSetWithCustomData(WorkspaceFileIndexImpl.kt:73)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:134)
	at c.ij.oa.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:126)
	at c.ij.oa.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:80)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at o.sl.ij.fs.DefaultVirtualFileSystemEventsHandler$findModule$2.invoke(DefaultVirtualFileSystemEventsHandler.kt:108)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:210)

We just released SonarLint 10.4.2, which should fix this issue. Could you please update and see if it’s replicable?