-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage fails with wrong number of lines #842
Comments
build environment #840:
|
I would expect release builds to cause more issues than debug. Optimization On Sun, 1 May 2016 19:21 Günter Wirth, [email protected] wrote:
|
ERROR - Ctype : 'UT_COVERAGE' Exception 'Can't create measure for line 31 for file 'C:/TFS/Builds/Agent404_01/1/s/aaa/View/MyClass.cpp' with 17 lines' Is throwing an exception because coverage should be assigned to line 31 whereas file has only 17 lines. There is an ongoing discussion how to handle this case #758: |
@guwirth just to illustrate my point, this is a very good example of data completely messing up your project. Is not that its off by one line. Its almost double the size of the file. so the results of the coverage are totally not to be trusted |
Hi, We are having the same UT_COVERAGE exception due to wrong line number. I must precise we recently upgraded sonar cxx from 0.9.4 RC2 to 0.9.5 and SonarQube from 5.2 to 5.6. Thanks. |
Hi, same problem here. Did you make a decision on the strict/resume mode? |
Hey guys, I also have the same issue. Any news ? Thanks. |
@Djoules I'm sorry no news. Focus is still on removing deprecated APIs ... |
Hi, Do you have any estimate on when this would be fixed...? I am now using the standard SonarQueb default step with gtest trx tests results and .coverage(xml) coverage... and I still have this issue and it is preventing a full analysis... and i do not see any workaround. |
Hi, |
@Jonathan34 it's sommer vacation time. I expect no solution before end of August |
Closed with #959 |
any updates on the issue? |
Hi,
Following up on #840, i have changed my configuration to debug to see how optimization could affect the coverage.
I have deleted and recreated the project in SonarQube.
During the POST step in SonarQube, i have an exception:
`
2016-04-21T18:40:32.1475520Z 13:40:32.085 DEBUG - Saving '7' coverage measures for file 'C:\TFS\Builds\Agent404_01\1\s\Acidizing\View\AcidizingCoiledTubingView.cpp'
2016-04-21T18:40:32.1475520Z 13:40:32.085 ERROR - Saving cov measure 'coverage_line_hits_data' = 'null' failed
2016-04-21T18:40:32.1475520Z 13:40:32.085 ERROR - Obtained 'coverage_line_hits_data' = '8=0;9=0;10=0;11=0;14=0;15=0;16=0;31=0' failed
2016-04-21T18:40:32.1475520Z 13:40:32.085 ERROR - Ctype : 'UT_COVERAGE' Exception 'Can't create measure for line 31 for file 'C:/TFS/Builds/Agent404_01/1/s/aaa/View/MyClass.cpp' with 17 lines'
2016-04-21T18:40:32.1475520Z 13:40:32.100 INFO - Analysis report generated in C:\TFS\Builds\Agent404_01\1.sonarqube\out.sonar\batch-report
...
2016-04-21T18:40:33.0694300Z ##[error]ERROR: Error during Sonar runner execution
2016-04-21T18:40:33.0694300Z ##[error]org.sonar.runner.impl.RunnerException: Unable to execute Sonar
2016-04-21T18:40:33.0694300Z ##[error]at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
2016-04-21T18:40:33.0694300Z ##[error]at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
2016-04-21T18:40:33.0694300Z ##[error]at java.security.AccessController.doPrivileged(Native Method)
2016-04-21T18:40:33.0694300Z ##[error]at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
2016-04-21T18:40:33.0694300Z ##[error]at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
2016-04-21T18:40:33.0694300Z ##[error]at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
2016-04-21T18:40:33.0850573Z ##[error]at org.sonar.runner.api.Runner.execute(Runner.java:100)
2016-04-21T18:40:33.0850573Z ##[error]at org.sonar.runner.Main.executeTask(Main.java:70)
2016-04-21T18:40:33.0850573Z ##[error]at org.sonar.runner.Main.execute(Main.java:59)
2016-04-21T18:40:33.0850573Z ##[error]at org.sonar.runner.Main.main(Main.java:53)
2016-04-21T18:40:33.0850573Z ##[error]Caused by: java.lang.IllegalStateException: Can't create measure for line 31 for file 'C:/TFS/Builds/Agent404_01/1/s/aaa/View/MyClass.cpp' with 17 lines
2016-04-21T18:40:33.0850573Z ##[error]at org.sonar.batch.sensor.coverage.CoverageExclusions.validateMaxLine(CoverageExclusions.java:158)
2016-04-21T18:40:33.0850573Z ##[error]at org.sonar.batch.sensor.coverage.CoverageExclusions.validate(CoverageExclusions.java:129)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.batch.deprecated.DeprecatedSensorContext.saveMeasure(DeprecatedSensorContext.java:204)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.plugins.cxx.coverage.CxxCoverageSensor.saveMeasures(CxxCoverageSensor.java:173)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.plugins.cxx.coverage.CxxCoverageSensor.analyse(CxxCoverageSensor.java:98)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:102)
2016-04-21T18:40:33.1006797Z ##[error]at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:185)
2016-04-21T18:40:33.1163069Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
2016-04-21T18:40:33.1163069Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
2016-04-21T18:40:33.1163069Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:264)
2016-04-21T18:40:33.1163069Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:259)
2016-04-21T18:40:33.1163069Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:257)
2016-04-21T18:40:33.1163069Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:249)
2016-04-21T18:40:33.1319340Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
2016-04-21T18:40:33.1319340Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:127)
2016-04-21T18:40:33.1319340Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
2016-04-21T18:40:33.1319340Z ##[error]at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
2016-04-21T18:40:33.1475572Z ##[error]at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
2016-04-21T18:40:33.1475572Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
2016-04-21T18:40:33.1475572Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
2016-04-21T18:40:33.1475572Z ##[error]at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
2016-04-21T18:40:33.1475572Z ##[error]at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
2016-04-21T18:40:33.1475572Z ##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:79)
2016-04-21T18:40:33.1631829Z ##[error]at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
2016-04-21T18:40:33.1631829Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2016-04-21T18:40:33.1631829Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2016-04-21T18:40:33.1631829Z ##[error]at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2016-04-21T18:40:33.1631829Z ##[error]at java.lang.reflect.Method.invoke(Unknown Source)
2016-04-21T18:40:33.1631829Z ##[error]at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
2016-04-21T18:40:33.1631829Z ##[error]... 9 more
2016-04-21T18:40:33.1631829Z ##[error]ERROR:
2016-04-21T18:40:33.1788054Z ##[error]ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
2016-04-21T18:40:33.2881901Z Process returned exit code 1
2016-04-21T18:40:33.2881901Z ##[error]The SonarQube Scanner did not complete successfully
2016-04-21T18:40:33.3038072Z 13:40:33.194 Creating a summary markdown file...
2016-04-21T18:40:33.3038072Z ##[error]Post-processing failed. Exit code: 1
2016-04-21T18:40:33.6171780Z ##[error]Unexpected exit code received from batch file: 1`
As I only changed the configuration from Release to Debug, i assume this is a bug...?
The text was updated successfully, but these errors were encountered: