SonarQube 7.6 java.lang.IllegalArgumentException

Hello !

We’ve recently upgraded our SonarQube server from the version 7.2.1 to the version 7.6 (build 21501) but we encounter now an error during the analyse :

        at com.sonar.cpp.llvm.BitstreamReader.jumpToBit(
        at com.sonar.cpp.llvm.BitstreamReader.readRecord(
        at com.sonar.cpp.llvm.ClangPCH.getOriginalSourceFile(
        at com.sonar.cpp.llvm.ClangPCH.getOriginalSourceFile(
        at com.sonar.cpp.analyzer.ClangDriver.onCapture(
        at com.sonar.cpp.plugin.CFamilySensor.process(
        at com.sonar.cpp.plugin.CFamilySensor.execute(
        at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(
        at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(
        at org.sonar.core.platform.ComponentContainer.startComponents(
        at org.sonar.core.platform.ComponentContainer.execute(
        at org.sonar.scanner.scan.ProjectScanContainer.scan(
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(
        at org.sonar.core.platform.ComponentContainer.startComponents(
        at org.sonar.core.platform.ComponentContainer.execute(
        at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(
        at org.sonar.core.platform.ComponentContainer.startComponents(
        at org.sonar.core.platform.ComponentContainer.execute(
        at org.sonar.batch.bootstrapper.Batch.doExecute(
        at org.sonar.batch.bootstrapper.Batch.execute(
        at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(
        at com.sun.proxy.$Proxy0.execute(Unknown Source)
        at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(
        at org.sonarsource.scanner.api.EmbeddedScanner.execute(
        at org.sonarsource.scanner.cli.Main.execute(
        at org.sonarsource.scanner.cli.Main.execute(
        at org.sonarsource.scanner.cli.Main.main( 

Our project is a C++ project which use clang for NX for compiling.

Here are the different version used :

  • SonarCFamily 6.2 (build 11201)
  • build-wrapper-win-x86-64.exe 6.1
  • sonar-scanner
  • clang for NX 1.5.8 (based on LLVM 6.0.1)

I’ve also tried with the version 6.2 of the build-wrapper and clang for NX 1.7.5 (based on LLVM 7.0.1) but the crash still remains.

Let me know if you need me to provide other informations.


Hello @vbordenave,

it seems like there is a failure trying to read a precompiled header. Would you be able to disable precompiled headers in your build to see if you get a successful analysis? Once that works we could then check the failure with precompiled headers.

Hello @mpaladin,

It works perfectly when the precompiled headers are disabled !

I’ve recreated a minimal project in order to reproduce it and the result is the same, when the precompiled header are enabled it crashes, otherwise it works without any issue.

Hi @vbordenave,

what compiler is Clang for NX? To help me to reproduce the issue.

It’s a clang provided by Nintendo (also called Rynda clang) in order to compile project for the Nintendo Switch console.
I guess you have to register on the Nintendo Developer Portal if you need to get it :thinking:

Hi @vbordenave,

ok, I am going to try to reproduce with clang version 6 as a start, would you be able to share with me the build-wrapper-dump.json file? I am sending you a PM where you can share it privately.

Hi @vbordenave,

FYI the issue comes from a failure in our Clang precompiled headers parser, I created a ticket to fix it, it is going to be released beginning of June:
Thank you very much for your collaboration and help.

1 Like

Hi. Was the fix released. If so, how can I get it?

Hi ! Yes the fix has been released in the version 6.3 of the SonarCFamily plugin.
I guess that you just need to upgrade to this version at least.

Do you have any idea about my other post?

Thank you,