Info:
- SonarQube Enterprise Edition, Version 7.9.2 (build 30863), Scanner Version 4.2.0.1873, build-wrapper, version 6.6 (win-x86-64)
Error message:
12:49:44.749 ERROR: Exception in thread pool-1-thread-1
java.lang.IllegalStateException: java.io.UTFDataFormatException: encoded string too long: 197163 bytes
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:46)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:33)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$5(CFamilySensor.java:498)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:53)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.UTFDataFormatException: encoded string too long: 197163 bytes
at java.base/java.io.DataOutputStream.writeUTF(Unknown Source)
at java.base/java.io.DataOutputStream.writeUTF(Unknown Source)
at com.sonar.cpp.analyzer.Protocol.write(Protocol.java:32)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:44)
... 8 common frames omitted
Steps to reproduce:
- Have a LOT of macros defined (and i mean 200KB of macro)
Hello,
i encountered this problem while trying to scan a C++ Project with SonarCFamily today. We have a lot of macros in our build environment. I could narrow down the problem to the stdout out line in the build-wrapper-dump.json. By manually adding macros and removing macros i could watch the bytecount in the error message change accordingly. It is not possible for me to leave out any macros and still have a functioning build.
Thanks in advance,
Moritz