IssueMatcher$NoMatchException: Start line number (254) larger than lines in file: 254

intellij
php
sonarlint

(Julien Herr) #1

Hi,

Since my last update of PhpStorm, I often see the following random exception and I don’t know how to reproduce.

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarLint: Version: 3.4.2.2586
    PhpStorm 2018.2 EAP
    Build #PS-182.3208.33, built on June 13, 2018
    JRE: 1.8.0_152-release-1226-b7 x86_64
    JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    macOS 10.13.4

  • error observed
    Error finding secondary location for issue
    Details: php:S1192
    255
    24
    255
    35

    org.sonarlint.intellij.issue.IssueMatcher$NoMatchException: Start line number (254) larger than lines in file: 254
      at org.sonarlint.intellij.issue.IssueMatcher.getIssueTextRange(IssueMatcher.java:79)
      at org.sonarlint.intellij.issue.IssueMatcher.match(IssueMatcher.java:69)
      at org.sonarlint.intellij.issue.IssueProcessor.transformFlows(IssueProcessor.java:185)
      at org.sonarlint.intellij.issue.IssueProcessor.transformIssue(IssueProcessor.java:170)
      at org.sonarlint.intellij.issue.IssueProcessor.transformIssues(IssueProcessor.java:153)
      at org.sonarlint.intellij.issue.IssueProcessor.process(IssueProcessor.java:69)
      at org.sonarlint.intellij.analysis.SonarLintTask.run(SonarLintTask.java:117)
      at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$null$1(SonarLintJobManager.java:120)
      at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:157)
      at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:580)
      at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85)
      at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
      at org.sonarlint.intellij.analysis.SonarLintJobManager.lambda$runTask$2(SonarLintJobManager.java:120)
      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)

(Tibor Blenessy) #2

Hello Julien,

can you identify the file which is being analyzed? It should be one in the active editor window. If are able to identify the file, can you share it here?


(Julien Herr) #3

I will try to do it the next time a see the issue.
But I’ve not reproduced it this week. Maybe it was related to a cache or something like that.

BTW, maybe it is possible to have more details in the IntelliJ error window because it is not easy to understand the information you need for the debug and then provide it :slight_smile:


(Hirle) #4