Sonar scanner failing with Java assertion error

Working in a project where Java code is being analyzed, we’re seeing an odd situation where we get an error while running the scanner locally that is not reproducible when running in CI.

The scanner beings running as usual, but then eventually aborts with this error:

17:19:36.968 ERROR [stderr] Exception in thread “main” java.lang.AssertionError: Popped one too many words from operand stack!

It seems like this is something related to a mismatch with Java versions or similar, but we’ve validated that the Java version running in CI is the same as the version running locally. Has anyone seen anything like this before?

Hi,

Can we have that full analysis log, from the analysis command through to the full stacktrace of that error?

Even better, can you rerun analysis with -Dsonar.verbose=true on the command line and provide that analysis log?

 
Thx,
Ann

Sure, thanks for looking into it. The output is quite large, please let me know if paring it down somehow would help at all, or if there’s a better place to share/upload a file like this for you all.

sonar.txt