java.lang.NullPointerException

Hi, I use sonarcloud and circle-ci to build my OS project, but I met some error that I cannot solve, here is the log and link.

11:35:46.887 DEBUG: 'frame/interface/AFIModule.h' generated metadata with charset 'UTF-8'
11:35:46.900 DEBUG: Probing compiler: [/usr/local/bin/c++, -x, c++, --std, c++11, -v, -dM, -E, -]
11:35:46.949 INFO: ------------------------------------------------------------------------
11:35:46.949 INFO: EXECUTION FAILURE
11:35:46.949 INFO: ------------------------------------------------------------------------
11:35:46.949 INFO: Total time: 40.806s
11:35:47.087 INFO: Final Memory: 34M/772M
11:35:47.087 INFO: ------------------------------------------------------------------------
11:35:47.087 ERROR: Error during SonarQube Scanner execution
java.lang.NullPointerException
	at com.sonar.cpp.analyzer.ClangDriver.envListToMap(ClangDriver.java:488)
	at com.sonar.cpp.analyzer.ClangDriver.lambda$probeCompiler$6(ClangDriver.java:479)
	at java.util.HashMap.computeIfAbsent(HashMap.java:1126)
	at com.sonar.cpp.analyzer.ClangDriver.probeCompiler(ClangDriver.java:477)
	at com.sonar.cpp.analyzer.ClangDriver.onCapture(ClangDriver.java:315)
	at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:266)
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:198)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:390)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:385)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:348)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:142)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	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:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Exited with code 1

https://circleci.com/gh/ArkNX/ARK/73

Could someone help me to figure out the wrong configurations? Thanks.

Hello @NickYang1988,

could you please provide me the build-wrapper-dump.json file? I am sending you a PM where you can share privately.

Hi @mpaladin ,

I built it in circleci, so I don’t know how to get build-wrapper-dump.json file cuz I have no permission to connect it by ssh.

Hi @NickYang1988,

you could extract build-wrapper-dump.json file as artifact, see https://circleci.com/docs/2.0/artifacts/.

Get it, I’ll upload the log later, thanks a lot.

Hi @NickYang1988,

any news on that?

Sorry for the late reply, I replaced my scanning solution with jenkins and sonarqube in local environment. I’ll use online services later when I have some time.

Thanks for your concern.

Hi @NickYang1988,

do you have any issue in Jenkins + SonarQube environment?

For now, everything is perfect, thanks.