Error on Sonar Scanner -- Error during SonarScanner execution java.lang.StackOverflowError

Hello, good Afternoon.

The Version i’m using is the below:

INFO: Scanner configuration file: /usr/local/Cellar/sonar-scanner/4.6.2.2472/libexec/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 16.0.1 Homebrew (64-bit)
INFO: Mac OS X 11.3.1 x86_64

I’m execute the sonar scanner, using the latest version of the scanner 4.6.2, on my project, but the project is return the error below.

INFO: Sensor JavaXmlSensor [java] (done) | time=955ms
INFO: Sensor HTML [web]
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:59.775s
INFO: Final Memory: 282M/924M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.StackOverflowError
	at org.sonar.plugins.html.checks.sonar.TableWithoutHeaderCheck.isTableHeader(TableWithoutHeaderCheck.java:54)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:632)
	at org.sonar.plugins.html.checks.sonar.TableWithoutHeaderCheck.hasHeader(TableWithoutHeaderCheck.java:49)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:632)
	at org.sonar.plugins.html.checks.sonar.TableWithoutHeaderCheck.hasHeader(TableWithoutHeaderCheck.java:50)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602)

Can anyone help me to discover how to resolve this problem?

Thanks.

Hi,

This looks like a bug on our side. Can you provide a small reproducer file?

And if you’re just looking to get past this and complete analysis, you can set up an exclusion to skip this file during analysis.

 
Ann