Sonarlint Plugin crashes

intellij

(Johann Schmitz) #1

The Sonarlint IntelliJ crashes multiple times per day in maven multi-module projects.

Server version: Version 6.7.4 (build 38452)
SonarLint: Version: 3.4.2.2586

IntelliJ: IntelliJ IDEA 2018.1.5 (Ultimate Edition)
Build #IU-181.5281.24, built on June 12, 2018
JRE: 1.8.0_152-release-1136-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-23-generic

Exception:

    Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
Details: Current thread: Thread[Netty Builtin Server 2,4,Idea Thread Group] 545483589
; dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0 2018.1.5#IU-181.5281.24 IDEA, eap:false, os:Linux 4.15.0-23-generic, java-version:JetBrains s.r.o 1.8.0_152-release-1136-b39 [WriteAccessToken],6,Idea Thread Group] 507259548
java.lang.Throwable: Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1055)
    at com.intellij.openapi.roots.impl.RootIndex.<init>(RootIndex.java:78)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getRootIndex(DirectoryIndexImpl.java:113)
    at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:148)
    at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:79)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:107)
    at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:100)
    at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:71)
    at org.sonarlint.intellij.util.SonarLintAppUtils.findModuleForFile(SonarLintAppUtils.java:41)
    at org.sonarlint.intellij.trigger.SonarLintSubmitter.filterAndgetByModule(SonarLintSubmitter.java:136)
    at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitFiles(SonarLintSubmitter.java:116)
    at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitFiles(SonarLintSubmitter.java:110)
    at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitOpenFilesAuto(SonarLintSubmitter.java:73)
    at org.sonarlint.intellij.trigger.MakeTrigger.buildFinished(MakeTrigger.java:63)
    at sun.reflect.GeneratedMethodAccessor765.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
    at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:426)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:387)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:376)
    at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:357)
    at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:43)
    at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:208)
    at com.sun.proxy.$Proxy102.buildFinished(Unknown Source)
    at com.intellij.compiler.server.BuildManager$NotifyingMessageHandler.sessionTerminated(BuildManager.java:1489)
    at com.intellij.compiler.server.DelegatingMessageHandler.sessionTerminated(DelegatingMessageHandler.java:32)
    at com.intellij.compiler.server.BuildMessageDispatcher$1.sessionTerminated(BuildMessageDispatcher.java:58)
    at com.intellij.compiler.server.BuildMessageDispatcher.channelInactive(BuildMessageDispatcher.java:218)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
    at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
    at io.netty.handler.codec.ByteToMessageDecoder.channelInputClosed(ByteToMessageDecoder.java:377)
    at io.netty.handler.codec.ByteToMessageDecoder.channelInactive(ByteToMessageDecoder.java:342)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
    at io.netty.channel.ChannelInboundHandlerAdapter.channelInactive(ChannelInboundHandlerAdapter.java:75)
    at org.jetbrains.io.ChannelRegistrar.channelInactive(ChannelRegistrar.java:61)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelInactive(AbstractChannelHandlerContext.java:224)
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelInactive(DefaultChannelPipeline.java:1329)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:245)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelInactive(AbstractChannelHandlerContext.java:231)
    at io.netty.channel.DefaultChannelPipeline.fireChannelInactive(DefaultChannelPipeline.java:908)
    at io.netty.channel.AbstractChannel$AbstractUnsafe$7.run(AbstractChannel.java:744)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
    at java.lang.Thread.run(Thread.java:745)

(Michael Düsterhus) #2

Same here.

Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
Details: Current thread: Thread[sonarlint-auto-trigger-OnlineSuite GIT,4,Idea Thread Group] 2123423318
; dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0 2018.1.5#IU-181.5281.24 IDEA, eap:false, os:Windows 7 6.1, java-version:JetBrains s.r.o 1.8.0_152-release-1136-b39,6,Idea Thread Group] 201325573
java.lang.Throwable: Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1055)
at com.intellij.openapi.roots.impl.RootIndex.(RootIndex.java:78)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getRootIndex(DirectoryIndexImpl.java:113)
at com.intellij.openapi.roots.impl.DirectoryIndexImpl.getInfoForFile(DirectoryIndexImpl.java:148)
at com.intellij.openapi.roots.impl.FileIndexBase.getInfoForFileOrDirectory(FileIndexBase.java:79)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:107)
at com.intellij.openapi.roots.impl.ProjectFileIndexImpl.getModuleForFile(ProjectFileIndexImpl.java:100)
at com.intellij.openapi.module.ModuleUtilCore.findModuleForFile(ModuleUtilCore.java:71)
at org.sonarlint.intellij.util.SonarLintAppUtils.findModuleForFile(SonarLintAppUtils.java:41)
at org.sonarlint.intellij.trigger.SonarLintSubmitter.filterAndgetByModule(SonarLintSubmitter.java:136)
at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitFiles(SonarLintSubmitter.java:116)
at org.sonarlint.intellij.trigger.SonarLintSubmitter.submitFiles(SonarLintSubmitter.java:110)
at org.sonarlint.intellij.trigger.EditorChangeTrigger$EventWatcher.triggerFile(EditorChangeTrigger.java:149)
at org.sonarlint.intellij.trigger.EditorChangeTrigger$EventWatcher.checkTimers(EditorChangeTrigger.java:167)
at org.sonarlint.intellij.trigger.EditorChangeTrigger$EventWatcher.run(EditorChangeTrigger.java:138)


(Duarte Meneses) #3

Hi,

Thanks for reporting this.
The problem was fixed in the latest release done last week: https://jira.sonarsource.com/browse/SLI-286

If you still have the error in v3.5, please let us know.


(Johann Schmitz) #4

This was fine for a few days. However, I updated IntelliJ to 2018.2 this morning and the errors start to appear again:

Details: Current thread: Thread[pool-9-thread-5,5,Idea Thread Group] 1825475341
; dispatch thread: false; isDispatchThread(): false
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,Idea Thread Group] 516734137

java.lang.Throwable: Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:145)
    at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1073)
    at com.intellij.openapi.fileEditor.impl.FileDocumentManagerImpl.getDocument(FileDocumentManagerImpl.java:172)
    at com.intellij.openapi.editor.impl.RangeMarkerImpl.getDocument(RangeMarkerImpl.java:115)
    at com.intellij.openapi.editor.impl.RangeMarkerImpl.getDocument(RangeMarkerImpl.java:31)
    at org.sonarlint.intellij.issue.LiveIssue.getLine(LiveIssue.java:106)
    at org.sonarlint.intellij.issue.tracking.Tracker$LineAndTextRangeHashKey.<init>(Tracker.java:105)
    at org.sonarlint.intellij.issue.tracking.Tracker$LineAndTextRangeHashKeyFactory.apply(Tracker.java:141)
    at org.sonarlint.intellij.issue.tracking.Tracker.match(Tracker.java:77)
    at org.sonarlint.intellij.issue.tracking.Tracker.track(Tracker.java:38)
    at org.sonarlint.intellij.issue.IssueManager.updateTrackedIssues(IssueManager.java:156)
    at org.sonarlint.intellij.issue.IssueManager.matchWithServerIssues(IssueManager.java:147)
    at org.sonarlint.intellij.core.ServerIssueUpdater$IssueUpdater.matchFile(ServerIssueUpdater.java:239)
    at org.sonarlint.intellij.core.ServerIssueUpdater$IssueUpdater.downloadAndMatchFile(ServerIssueUpdater.java:221)
    at org.sonarlint.intellij.core.ServerIssueUpdater.lambda$fetchAndMatchServerIssues$0(ServerIssueUpdater.java:144)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

(Nicolas Bontoux) #5

Thanks for following-up.

Latest error does’t look entirely the same error as initial one.

Initial
at org.sonarlint.intellij.util.SonarLintAppUtils.findModuleForFile(SonarLintAppUtils.java:41)

Latest
at org.sonarlint.intellij.issue.LiveIssue.getLine(LiveIssue.java:106)

That latest one is already being discussed here: