Objc scanner error after update to 10.7

Hello we faced issues while analyzing our project after update to 10.7 from 10.5. Is there any things we should try?

  • Exception: com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:270)
  • Sonar version: 10.7
  • Deployed by Docker
  • I’m using json-compilation-database file to analyse obj-c / swift project
  • SonarQube Scanner version 6.2.1.4610 on Jenkins
  • Project analyzed successfully on 10.5 version
  • What already tried:
    • Compiler settings in Xcode project
    • Memory increase for sonar
    • Difference versions of scanner
Sonar Scanner Exception

10:37:23.176 ERROR Error during SonarScanner Engine execution
java.lang.IllegalStateException:

at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:270)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:183)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:64)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Analysis Exception

10:36:56.729 ERROR Exception in thread pool-4-thread-3
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 139: /Users/jenkins/build/workspace/*_SonarQube_master/Classes/Controls/DateSwitcher.m
at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(AnalysisHandler.java:76)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:128)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$12(CFamilySensor.java:811)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:58)
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)

hi @mpashnyov,

Which XCode version are you using and did it change recently?

Thanks,

Hi, we’re currently using Xcode 16.0, and we haven’t made any changes in setup recently.

Hi @mpashnyov, and welcome to the community.

Would you be willing to share the generated sonar-cfamily-reproducer.tar.xz file with us? This can help us track down the problem and suggest possible solutions.

I can start a thread with you if you prefer to share it privately.

Thanks,
Michael

Sure, I have several of them. Let’s start a thread.

Thanks for sharing the reproducer @mpashnyov, this is really helpful.

I have opened a ticket, and we are investigating the issue in [CPP-5815] - Jira.

Best regards,
Michael

Hello,

Thanks for the feedback. I am happy to share that the issue was fixed in CFamily version 6.61. This is now live on SonarQube Cloud (since a couple of weeks actually), and also available in SonarQube Server version 10.8.

If you have excluded any files because of this crash, it should be possible to include them again in the analysis. Let us know if you encounter any further issues. Any feedback is always appreciated!

Best regards,
Michael