Null Pointer Exception during SonarScanner while Parsing VisualStudio Code Coverage Report

  • Version: SonarCloud SonarScanner
  • Error: The SonarScanner results in a NullPointerException while parsing the VisualStudio VSTest code coverage report (XML file):
ERROR: Error during SonarScanner execution
java.lang.NullPointerException
	at com.sonar.cpp.plugin.visualstudio.VisualStudioCoverageParser.handleSourceFileTag(VisualStudioCoverageParser.java:76)
	at com.sonar.cpp.plugin.visualstudio.VisualStudioCoverageParser.dispatchTags(VisualStudioCoverageParser.java:47)
	at com.sonar.cpp.plugin.visualstudio.VisualStudioCoverageParser.parse(VisualStudioCoverageParser.java:35)
	at com.sonar.cpp.plugin.visualstudio.VisualStudioCoverageParser.parse(VisualStudioCoverageParser.java:17)
	at com.sonar.cpp.plugin.visualstudio.VisualStudioCoverageSensor.execute(VisualStudioCoverageSensor.java:57)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:45)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:66)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:48)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:68)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:438)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:434)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:392)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:126)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	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:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
1 Like

Hi @hterry,

you are affected by regression https://jira.sonarsource.com/browse/CPP-2850. It has been fixed and will be released soon.

1 Like

Unfortunately, I also upgraded to SonarQube 8.6 yesterday and now I’m in trouble. What is the meaning of “soon”? Is any release date available or do we have to restore previous SonarQube database and revert back to 8.4?

As no longer the SonarQube plugins can be updated in marketplace, will we have to upgrade complete SonarQube server?

Hi @milbrandt,

we plan to release a new version of CFamily plugin beginning of next week which means that will be deployed in SonarCloud soon after that. About SonarQube it is going to come with next version, release date not scheduled yet.

Great. When will this fix be released?

Hi @hterry,

as written:

which means it should make it to SonarCloud in about 1 week time.