AnalyzerException with CFamily analyzer

Hi there,

I got the complete same stacktrace on our C++ Project after updating to Sonar Qube * Version 8.8 (build 42792). Currently found no solution for this.

Br,
Eike

sonar-cfamily-reproducer.zip (1.4 MB)

Here are our reproducer.zip.

Thx and best regards,
Eike

I have also checked the possibillities by disable ASIO, but it didn’t help in my case. We don’t use the boost library.

com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: d:/Data/jenkinsHome/workspace/GTFC.sonar/CLV/GtBgColor.cpp
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:125)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:48)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:122)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:48)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$8(CFamilySensor.java:714)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:59)
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.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:834)

Is there anything we can provide to solve / examine this ?

Br,
Eike

Hello @ehauptmann,

Welcome to the community and sorry for the late reply.

What you are facing is a generic crash and this solution was mentioned for a specific one(that is fixed in the latest release)

I’m wondering if your project actually compiles. Looking at the shared analysis.log I see thousands of parsing errors.
When you run build-wrapper does it finish successfully? can you share the output(let me know if you prefer to share it privately)

Thanks,

Hi Abbas,

here is the complete output from our Jenkins:
build_log.txt (104.8 KB)

Only the server-urls are replaced. Build runs through it, but it crashes later inside the sonarScanner.

Br,
Eike

@ehauptmann,
Thanks for the Logs, I investigated further the issue and I might have figured out what is going on.
You have a file called
"D:\Data\jenkinsHome\workspace\GTFC.sonar\CLV\Math.h"
and you have in your include directories:
D:\Data\jenkinsHome\workspace\GTFC.sonar\CLV\

when one of the STL headers have something like:
#include <math.h>

it is resolving to your file instead of the standard header. This lead to thousands of parsing errors/unreliable analysis/ and a crash in your case.

Can you verify my theory by changing the name of "D:\Data\jenkinsHome\workspace\GTFC.sonar\CLV\Math.h"
and re-running the analysis? if it still fails, please share the newly generated zip file.

Thanks,

Hi Abbas

We tried it out and it worked. So we let it renamed to the new name. Thank you for your help.

Br,
Eike

1 Like

@ehauptmann,

Thanks for confirming, this should also be fixed soon on our side.

Thanks,

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.