You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line fails if path == null , because it ends up in the else branch.
A quick fix could be to change it into path==null || "".equals(path) ? false : path.startsWith(folder);
But im not sure if that is really the right way.
We decided to fixed it by preprocessing the valgrind file in shell script, since I'm not sure if this error is common in any way.
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: java.lang.IllegalStateException: Cannot feed the data into sonar, details: 'java.lang.NullPointerException'
at org.sonar.plugins.cxx.utils.CxxReportSensor.analyse(CxxReportSensor.java:128)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: java.lang.NullPointerException
at org.sonar.plugins.cxx.valgrind.ValgrindStack.isInside(ValgrindStack.java:90)
at org.sonar.plugins.cxx.valgrind.ValgrindStack.getLastOwnFrame(ValgrindStack.java:82)
at org.sonar.plugins.cxx.valgrind.ValgrindError.getLastOwnFrame(ValgrindError.java:80)
at org.sonar.plugins.cxx.valgrind.CxxValgrindSensor.saveErrors(CxxValgrindSensor.java:75)
at org.sonar.plugins.cxx.valgrind.CxxValgrindSensor.processReport(CxxValgrindSensor.java:70)
at org.sonar.plugins.cxx.utils.CxxReportSensor.analyse(CxxReportSensor.java:109)
... 35 more
The text was updated successfully, but these errors were encountered:
This line fails if path == null , because it ends up in the else branch.
A quick fix could be to change it into path==null || "".equals(path) ? false : path.startsWith(folder);
But im not sure if that is really the right way.
Hi,
When I run sonar cxx on one of the valgrind reports of my projects, it fails to parse properly.
' which contains a weird value "////////////////home/user/src...."It seems to appear on the line '
I think it might fail to handle the large number of slashes.
Although it seems valgrind just sometimes has invalid output, I thought I's share the 'issue' here.
Below is the stacktrace.
The 'problem' is that the method 'isInside()' gets a null-path.
"".equals(path) ? false : path.startsWith(folder);
This line fails if path == null , because it ends up in the else branch.
A quick fix could be to change it into path==null || "".equals(path) ? false : path.startsWith(folder);
But im not sure if that is really the right way.
We decided to fixed it by preprocessing the valgrind file in shell script, since I'm not sure if this error is common in any way.
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:41)
Caused by: java.lang.IllegalStateException: Cannot feed the data into sonar, details: 'java.lang.NullPointerException'
at org.sonar.plugins.cxx.utils.CxxReportSensor.analyse(CxxReportSensor.java:128)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
Caused by: java.lang.NullPointerException
at org.sonar.plugins.cxx.valgrind.ValgrindStack.isInside(ValgrindStack.java:90)
at org.sonar.plugins.cxx.valgrind.ValgrindStack.getLastOwnFrame(ValgrindStack.java:82)
at org.sonar.plugins.cxx.valgrind.ValgrindError.getLastOwnFrame(ValgrindError.java:80)
at org.sonar.plugins.cxx.valgrind.CxxValgrindSensor.saveErrors(CxxValgrindSensor.java:75)
at org.sonar.plugins.cxx.valgrind.CxxValgrindSensor.processReport(CxxValgrindSensor.java:70)
at org.sonar.plugins.cxx.utils.CxxReportSensor.analyse(CxxReportSensor.java:109)
... 35 more
The text was updated successfully, but these errors were encountered: