com.intellij.diagnostic.PluginException: annotator: org.sonarlint.intellij.editor.SonarExternalAnnotator@192c2a8e (class org.sonarlint.intellij.editor.SonarExternalAnnotator) [Plugin: org.sonarlint.idea]

Environment:

  • Java version=11.0.9
  • Java vendor=JetBrains s.r.o.
  • OS name=Windows 10
  • OS architecture=amd64
  • IDE=IntelliJ IDEA 2020.3
  • SonarLint version=4.13.0.24781

ExternalToolPass:

com.intellij.diagnostic.PluginException: annotator: org.sonarlint.intellij.editor.SonarExternalAnnotator@192c2a8e (class org.sonarlint.intellij.editor.SonarExternalAnnotator) [Plugin: org.sonarlint.idea]
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:335)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:59)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.process(ExternalToolPass.java:255)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass.doApply(ExternalToolPass.java:220)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$1(ExternalToolPass.java:184)
	at com.intellij.openapi.application.ReadAction.lambda$run$1(ReadAction.java:52)
	at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:889)
	at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:61)
	at com.intellij.openapi.application.ReadAction.run(ReadAction.java:51)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.lambda$run$2(ExternalToolPass.java:181)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:658)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:65)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
	at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:254)
	at com.intellij.codeInsight.daemon.impl.ExternalToolPass$1.run(ExternalToolPass.java:179)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:333)
	at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:323)
	at com.intellij.util.ui.update.MergingUpdateQueue.lambda$flush$1(MergingUpdateQueue.java:273)
	at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:287)
	at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:242)
	at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238)
	at com.intellij.util.Alarm$Request.runSafely(Alarm.java:372)
	at com.intellij.util.Alarm$Request.run(Alarm.java:358)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:220)
	at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:216)
	at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:27)
	at com.intellij.util.concurrency.BoundedTaskExecutor$1.execute(BoundedTaskExecutor.java:195)```

Dear @a-campos, this is the third time you report this very same exception.

This time, I suggest that you please provide additional information to help us investigate the issue - e.g what you were doing when the exception occurred.

Please understand that willful duplication of messages leads to noise and increased response time on this community forum. Please also bear in mind that this forum is read and maintained by human beings.

Should this happen again, I believe we would have no choice but to restrict your access to this forum. Thank you for your understanding.

I was just open a java class file with 624 line

Thank you for this additional info.

Do you observe this behavior frequently? Does it happen with all Java files, only on some files, or at random?

It looks like the stack trace is truncated - it does not mention any indication about the exception that caused it.

Next time you encounter this issue, could you please copy it to a text file and attach it to this thread? This would greatly help us understand what is going on.

Do you observe this behavior frequently?
Yes

Does it happen with all Java files, only on some files, or at random?
Only in …/DataLogSQLiteDb.java

Next time you encounter this issue, could you please copy it to a text file and attach it to this thread?
Sorry I can NOT post the file, but if you tell me what to look for I can search the file for what you tell me

Obrigado(Thanks)

Thank you for coming back, this is great info!

If it always happens with the same file, there is probably something specific to this file that triggers the behavior - e.g, a bad line ending, an encoding issue that throws offset computations off, a construct in this file that results in strange analyzer behavior. Unfortunately, I don’t have a precise idea of what exactly could cause this issue.

Would it be possible for you to send me this file in a private message on this forum?

Otherwise, the next best thing would be for you to craft a minimal reproducer for the issue, starting with this file and removing/commenting out bits until it works - that can be time consuming though :sweat_smile: