Sonarscanner error on analizy in PLSQL project: "is not a valid line offset for pointer"

I havea plsql project with files can be: anonymous blocks, Stored procedure(package, packages body, functions, procedures, types, bodies types, tables, triggers, synonyms, constraints, etc) and non stored procedure, like DML(truncate, insert, delete, update). Well, i’m have a problem with some files like this error:

ERROR: Error during SonarQube Scanner execution
java.lang.IllegalArgumentException: Unable to highlight file [moduleKey=ATH:ATH1, relative=src/others/TAB_AUTH_XAUTH.sql, basedir=c:\POC\Authorities]
        at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:96)
        at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:36)
        at com.sonar.plsql.A.A.A(Unknown Source)
        at com.sonar.plsql.A.A.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.O.A(Unknown Source)
        at com.sonar.oracle.Q.A(Unknown Source)
        at com.sonar.plsql.plugin.I.execute(Unknown Source)
        at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
        at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
        at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
        at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:184)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
        at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:118)
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
        at com.sun.proxy.$Proxy0.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240)
        at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
        at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
        at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
        at org.sonarsource.scanner.cli.Main.main(Main.java:60)
Caused by: java.lang.IllegalArgumentException: 6 is not a valid line offset for pointer. File [moduleKey=ATH:ATH1, relative=src/others/TAB_AUTH_XAUTH.sql, basedir=c:\POC\Authorities] has 5 character(s) at line 1
        at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
        at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:215)
        at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:206)
        at org.sonar.api.batch.fs.internal.DefaultInputFile.newRange(DefaultInputFile.java:237)
        at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.highlight(DefaultHighlighting.java:94)
        ... 43 more

But the file contains just this:

------------------------------------------------ VERSÃO  = 0.1 --------------------------------------------------
--
/* ---------------------------------------------- Change log --------------------------------------------------
|| User               - Date        - Version    - Description
|| Yernor Bblzior        - 16/02/2017  - 0.01      - Remove all
*/ --------------------------------------------------------------------------------------------------------------
--
TRUNCATE TABLE AUTH_XAUTH;

Are there some rule to break line, carriage return or can’t init with comments or any thing can make this error?

The error isn’t triggered by a rule, it’s a failure when preparing data for syntax highlighting.

I can’t reproduce the error with the file you sent.
Ideas:

  • Maybe it’s a problem with an old version: can you check the version of the PL/SQL analyzer?
  • Maybe the problem comes from some unusual characters in the original file: can you try uploading the file instead of copy-pasting its content?