Unable to get C++ files analysed


I am trying to analyse a C++ project on Windows PC. The project is compiled using mingw32-make and the makefile not only builds the C++ project (embedded) but also invokes build of Windows C# applications using dotnet.exe. The main interest for me is to get the C++ project analyzed but of course the C# projects would nice to have analyzed as well.

I am using SonarCFamily 6.4 and SonarQube 7.9.1

My first problem was that build-wrapper-win-x86-64.exe could not be called with both ‘clean’ and ‘all’ targets at the same as it would clean simultanuously as building, which inevitably led to build failure. I could solve that by splitting it into two separate steps.
Now it builds but when I run sonar-scanner it fails. It claims to have found issues and processed some 360k lines of code. But the coverage is 0% and when I try to look at file in which an issue is reported then I can’t see any indication of where the issue is. All I can see is that all lines of code are marked as having been skipped.

Failure output
org.sonar.ce.task.projectanalysis.component.VisitException: Visit of Component {key=CFD,uuid=AW3PZ9wblJO-cX-iWHci,type=PROJECT} failed
at org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:41)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep.execute(PurgeDatastoresStep.java:70)
at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:209)
at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:191)
at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:158)
at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:133)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:85)
at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.IllegalStateException: Unrecoverable indexation failures: 546 errors among 546 requests
at org.sonar.server.es.IndexingListener$1.onFinish(IndexingListener.java:39)
at org.sonar.server.es.BulkIndexer.stop(BulkIndexer.java:122)
at org.sonar.server.component.index.ComponentIndexer.delete(ComponentIndexer.java:165)
at org.sonar.ce.task.projectanalysis.purge.IndexPurgeListener.onComponentsDisabling(IndexPurgeListener.java:41)
at org.sonar.db.purge.PurgeDao.purgeDisabledComponents(PurgeDao.java:107)
at org.sonar.db.purge.PurgeDao.purge(PurgeDao.java:71)
at org.sonar.ce.task.projectanalysis.purge.ProjectCleaner.purge(ProjectCleaner.java:63)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep.execute(PurgeDatastoresStep.java:76)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep.access$000(PurgeDatastoresStep.java:38)
at org.sonar.ce.task.projectanalysis.purge.PurgeDatastoresStep$1.visitProject(PurgeDatastoresStep.java:63)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitNode(DepthTraversalTypeAwareCrawler.java:70)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:51)
at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
… 18 more

SonarQube plugins:

  • SonarCSS (cssfamily)
  • Svn (scmsvn)
  • SonarPLSQL (plsql)
  • SonarScala (sonarscala)
  • SonarC# (csharp)
  • Vulnerability Analysis (security)
  • SonarJava (java)
  • LDAP (ldap)
  • SonarHTML (web)
  • SonarFlex (flex)
  • SonarXML (xml)
  • SonarTS (typescript)
  • SonarVB (vbnet)
  • SonarSwift (swift)
  • SonarCFamily (cpp)
  • SonarPython (python)
  • GitHub Authentication for SonarQube (authgithub)
  • JaCoCo (jacoco)
  • SonarGo (go)
  • SonarKotlin (kotlin)
  • SonarTSQL (tsql)
  • SonarJS (javascript)
  • SonarRuby (ruby)
  • Vulnerability Rules for C# (securitycsharpfrontend)
  • Vulnerability Rules for Java (securityjavafrontend)
  • License for SonarLint 7.9.1 (license)
  • Git (scmgit)
  • SAML 2.0 Authentication for SonarQube (authsaml)
  • SonarPHP (php)
  • SonarABAP (abap)
  • Vulnerability Rules for PHP (securityphpfrontend)
    Global server settings:
  • sonar.core.id=BF41A1F2-AWwZHmbQbCUd29UAnVfq
  • sonar.core.startTime=2019-10-17T14:20:35+0200
    Project server settings:
    Project scanner properties:
  • sonar.cfamily.build-wrapper-output=./cfd/build/bw_output_directory
  • sonar.cfamily.threads=2
  • sonar.host.url=http://localhost:9000
  • sonar.log.level=DEBUG
  • sonar.projectBaseDir=C:\Work\RemoteLink
  • sonar.projectKey=CFD
  • sonar.projectName=CFD Project
  • sonar.projectVersion=1.0
  • sonar.scanner.app=ScannerCli
  • sonar.scanner.appVersion=
  • sonar.sourceEncoding=UTF-8
  • sonar.sources=base,cfd
  • sonar.working.directory=C:\Work\RemoteLink.scannerwork

This is my properties file:


must be unique in a given SonarQube instance


— optional properties —

defaults to project key

sonar.projectName=CFD Project

defaults to ‘not provided’



Path is relative to the sonar-project.properties file. Defaults to .



Encoding of the source code. Default is default system encoding




Hi @conscwit,

are is the analysis succeeding client side?
Do you consistently get the failure of the background task?

Hi Massimo,
I don’t get any error indications in the command prompt. It is only when I look at the server that I can see that something is wrong. And yes, it fails consistently.

Hi @conscwit,

if you are setting it up, did you try to delete it from SonarQube and re-analyze it?

I tried to clean everything and start all over and now it seems better. I can actually see where issues are located and the reason why it is deemed an issue.
So far so good. I am running on my own PC so how do I go about sharing a report for other people to see? I don’t want/need other people to run any checks but I want them to see what SonarQube can do.


Your best bet here is to share the URL for your project homepage. We’ve built the interface to be communicative and easy to use and it should (hopefully!) sell itself far better than any flat report could.


1 Like