java.lang.NullPointerException when running sonar-scanner

Sonar Qube version : * Enterprise Edition * Version 7.6 (build 21501)
SonarCFamily, Code Analyzer for C, C++, Objective-C: 6.1 (build 11021)

We are running Sonar Qube on a linux machine.
With a sonar property defined locally on windows machine. First we are running the below command.

build-wrapper-win-x86-64 --out-dir bw-outputs app-build.bat

the application build is happening using Scons.
This is creating files in the build-wrapper-dump.json and build-wrapper.log in
bw-outputs folder.

Post this when we run sonar-scanner -X command we are getting null pointer exception as below.

11:23:16.505 ERROR: Error during SonarQube Scanner execution
        at com.sonar.cpp.analyzer.StdFlags.fromCppMacros(
        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(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        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(

Can you please help in resolving this issue.

Hi @Pradeep_K_V,

could you please share build-wrapper-dump.json and build-wrapper.log files? Thank you.

Sure, Please find attached build-wrapper.log.txt (25.7 KB)
build-wrapper-dump.json.txt (14.5 KB)

Hi @Pradeep_K_V,

we fail because of vrxcc.exe which we detect as compiler but which we don’t support (even if I see that vrxcc.exe is calling armcc).

Hi @mpaladin,

Before trying it on the actual project, we first tried with a sample project which also uses vrxcc.exe compiler and for that project we are able to see the results on the server for the sample project.

Attaching the sample project build-wrapper-dump.json, build-wrapper.log and the results screen shot for your reference. build-wrapper.log.txt (30.4 KB)
build-wrapper-dump.json.txt (17.6 KB)

Once we found the sample project working, then only we tried it on the actual project.

Can you please help on this.

Thanks in advance.

Hi @Pradeep_K_V,

did you upgrade the version of SonarQube or the C/C++ analyzer in the mean time?

Hi @mpaladin No, We did not upgrade. We are trying both the applications on same versions of SonarQube and C++ analyzer.

Hi @mpaladin, hope you are doing good. By any chance did you get any idea how to resolve this?

Hi @Pradeep_K_V,

unfortunately we don’t support vrxcc.exe, even if under the cover it is calling armcc, I am not sure what we can do about it. Could you please share what vrxcc.exe you are using? What tool, version?