IntelliJ freezes with SonarLint 4.12.1.22375 enabled

Hi,
I’m using IntelliJ IDEA 2020.2.3 Ultimate Edition Build#IU-202.7660.26/ Windows 10 and SonarLint 4.12.1.22375 without connection to server.
java --version openjdk 11.0.7 2020-04-14
Kotlin 1.4.10-release-IJ2020.2-1

After starting test project with minimum files on Kotlin and typing main method IDEA hangs with message “Updating SonarLint issues:0”

Hello Bohdan.

Welcome to community!
Thank you for feedback. Unfortunately i was unable to reproduce issue with data you provided.
Can you provide more detailed steps?

  1. How do you create sample project? Or may be you can provide link to repository with problematic project?
  2. How exactly do you type main method? Do you use any shortcut (main, psvm) or you just type it?

Also may i ask you to post log output of SonarLint? You can find it in tab “Log” of SonarLint tool window.


Make sure that “Analysis logs” and “Verbose output” are enabled.
Even if IntelliJ frontend is frozen you should be able to open this tab before typing and make a screenshot of output.

Link to the test project. https://github.com/Myslyvchuk/LearningKotlinFromSctratch.
I’m using live template for main method. Just start typing main and you will see hint for main method without params in Kotlin.

Log:

Analysing 6 files…
Error running SonarLint analysis
java.lang.IllegalStateException: Failed to read issues
at org.sonarlint.intellij.issue.persistence.IssuePersistence.lambda$new$0(IssuePersistence.java:56)
at org.sonarlint.intellij.issue.persistence.IndexedObjectStore.read(IndexedObjectStore.java:65)
at org.sonarlint.intellij.issue.persistence.IssuePersistence.read(IssuePersistence.java:85)
at org.sonarlint.intellij.issue.IssueManager.getPreviousIssues(IssueManager.java:132)
at org.sonarlint.intellij.issue.IssueManager.lambda$matchWithPreviousIssues$0(IssueManager.java:173)
at org.sonarlint.intellij.issue.tracking.Tracking.(Tracking.java:41)
at org.sonarlint.intellij.issue.tracking.Tracker.lambda$track$0(Tracker.java:37)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:851)
at org.sonarlint.intellij.issue.tracking.Tracker.track(Tracker.java:36)
at org.sonarlint.intellij.issue.IssueManager.updateTrackedIssues(IssueManager.java:192)
at org.sonarlint.intellij.issue.IssueManager.matchWithPreviousIssues(IssueManager.java:175)
at org.sonarlint.intellij.issue.IssueManager.store(IssueManager.java:167)
at org.sonarlint.intellij.issue.IssueManager.store(IssueManager.java:154)
at org.sonarlint.intellij.issue.IssueProcessor.lambda$process$0(IssueProcessor.java:70)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:869)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
at org.sonarlint.intellij.issue.IssueProcessor.process(IssueProcessor.java:66)
at org.sonarlint.intellij.analysis.SonarLintTask.lambda$run$1(SonarLintTask.java:125)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:192)
at org.sonarlint.intellij.analysis.SonarLintTask.run(SonarLintTask.java:121)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:935)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:442)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:235)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:235)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at com.google.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:102)
at com.google.protobuf.CodedInputStream$StreamDecoder.readTag(CodedInputStream.java:2068)
at org.sonarlint.intellij.proto.Sonarlint$Issues.(Sonarlint.java:87)
at org.sonarlint.intellij.proto.Sonarlint$Issues.(Sonarlint.java:48)
at org.sonarlint.intellij.proto.Sonarlint$Issues$1.parsePartialFrom(Sonarlint.java:2073)
at org.sonarlint.intellij.proto.Sonarlint$Issues$1.parsePartialFrom(Sonarlint.java:2067)
at com.google.protobuf.AbstractParser.parsePartialFrom(AbstractParser.java:215)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:232)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:237)
at com.google.protobuf.AbstractParser.parseFrom(AbstractParser.java:48)
at com.google.protobuf.GeneratedMessageV3.parseWithIOException(GeneratedMessageV3.java:339)
at org.sonarlint.intellij.proto.Sonarlint$Issues.parseFrom(Sonarlint.java:1561)
at org.sonarlint.intellij.issue.persistence.IssuePersistence.lambda$new$0(IssuePersistence.java:54)
… 39 more

It hung again. When it hang I also see log “File won’t be refreshed because there were errors during alalysis: {path to file}”

Hello Bohdan.
Thank you for additional data. This is the problem with issue store. Files were corrupted for some reason. You need to purge storage and it will be recreated. If it’s not to much hassle for you, i would ask to create a .zip of storage and post to this thread. So we could look more closely what exactly not right with files. But your problem should be solved just by deleting the storage.
Storage location is in .idea folder of your project, path inside: “/sonarlint/issuestore”.

issuestore.zip (4.9 KB)

Done. As I can see cleaning up helped. Thanks

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.