# com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0:

**URL:** <https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048>\
**Category:** SonarQube Server / Community Build\
**Tags:** cfamily, sonarqube\
**Created:** [April 21, 2021, 4:44pm UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048 "2021-04-21T16:44:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuypanqui](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/yuypanqui/32/21427_2.png) [@Yuypanqui](https://community.sonarsource.com/u/Yuypanqui)\
**Post date:** [April 21, 2021, 4:44pm UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048/1 "2021-04-21T16:44:54Z")

</div>

Must-share information (formatted with [Markdown](https://commonmark.org/help/)):

- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)  
– sonarqube-developer-8.8.0.42792  
– CFamily plugin version: 6.18.0.29274  
– build-wrapper, version 6.18 (win-x86-64)
- what are you trying to achieve  
I’m trying to scan a solution (visual studio 2019) with a mix of c# and c++ (/std:c++14) projects.  
The c++ project is using BOOST (1.74.0)  
– scan for c# projects of the solution is working well  
– scan for another simple c++ project (not using BOOST) works fine too
- what have you tried so far to achieve this  
– SonarScanner.MSBuild.exe begin /k:“hdb:develop” /d:sonar.cfamily.build-wrapper-output=“bw\_output”  
– build-wrapper-win-x86-64.exe --out-dir E:\Projects\hoodbSolution\bw\_output MSBuild.exe /t:Rebuild /p:configuration=Release /p:Platform=x64 /m  
– SonarScanner.MSBuild.exe end  
**WITH**  
– #undef BOOST\_ASIO\_DISABLE\_NOEXCEPT  
– #undef ASIO\_DISABLE\_NOEXCEPT  
(I added these 2 lines after exploring [https://jira.sonarsource.com/browse/CPP-2696](https://jira.sonarsource.com/browse/CPP-2696))

I got the following output

```auto
INFO: Requesting reproducer for: E:/Projects/hoodbSolution/HoodbExe/source/HCommand/command_interpreter.cpp
INFO: [pool-1-thread-8] E:/Projects/hoodbSolution/HoodbExe/source/hfilesystem/volume_collection.cpp
INFO: [pool-1-thread-1] E:/Projects/hoodbSolution/HoodbExe/source/hfilesystem/inode_allocator.cpp
ERROR: Exception in thread pool-1-thread-2
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: E:/Projects/hoodbSolution/HoodbExe/source/HCommand/command_interpreter.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:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:832)

ERROR: Exception in thread pool-1-thread-3
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code != 0: E:/Projects/hoodbSolution/HoodbExe/source/hfilesystem/timed_storage_closing.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.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:1130)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
        at java.base/java.lang.Thread.run(Thread.java:832)

ERROR:
An error occurred while analyzing the following compilation unit:
  E:/Projects/hoodbSolution/HoodbExe/source/HCommand/command_interpreter.cpp
A file named "sonar-cfamily-reproducer.zip" has been generated to help the problem investigation.
Please contact SonarSource support providing the following file to help improving the analyzer:
  E:\Projects\hoodbSolution\sonar-cfamily-reproducer.zip

```

I can share the reproducer.zip if it helps to find the origin of the issue.  
Thanks for any clue or solution !

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [April 26, 2021, 8:22am UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048/2 "2021-04-26T08:22:57Z")

</div>

Hi @Yuypanqui ,

I am sending you a PM where you can share the original reproducer.

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [April 26, 2021, 9:40am UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048/5 "2021-04-26T09:40:31Z")

</div>

Hi @Yuypanqui ,

you are affected by [CPP-2696](https://jira.sonarsource.com/browse/CPP-2696).

> [@Yuypanqui](#):
>
> – #undef BOOST\_ASIO\_DISABLE\_NOEXCEPT  
> – #undef ASIO\_DISABLE\_NOEXCEPT

These are wrong, please drop them. What you need to add is:

```auto
#define BOOST_ASIO_DISABLE_NOEXCEPT

```

or add to the build:

```auto
-DBOOST_ASIO_DISABLE_NOEXCEPT

```

---

<div class="post-metadata">

**Author:** ![Yuypanqui](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/yuypanqui/32/21427_2.png) [@Yuypanqui](https://community.sonarsource.com/u/Yuypanqui)\
**Post date:** [April 26, 2021, 11:30am UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048/6 "2021-04-26T11:30:45Z")

</div>

@mpaladin … it works well now.  
Thanks for your efficient help.  
Patrick

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [April 26, 2021, 12:13pm UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048/7 "2021-04-26T12:13:57Z")

</div>

Hi @Yuypanqui ,

> [@Yuypanqui](#):
>
> it works well now.

great, thank you for the update. FYI, it has been fixed and will soon be released as part of the next SonarQube version and soon deployed on SonarCloud.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [May 3, 2021, 12:14pm UTC](https://community.sonarsource.com/t/com-sonar-cpp-analyzer-analyzer-analyzerexception-exit-code-0/42048/8 "2021-05-03T12:14:12Z")

</div>

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