java.lang.IllegalArgumentException: not a valid line offset for pointer

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
    Community Edition v9.9.8
  • how is SonarQube deployed: zip, Docker, Helm
    Docker
  • what are you trying to achieve
    Trying to figure out why we keep getting “not a valid line offset” errors
  • what have you tried so far to achieve this
    Not much

We seem to keep getting “not a valid line offset” errors for our c# files. This is happening in some unit test code files, and seems to always happen around lines that are comments.

It started Feb 14th, and seems to have not stopped. We’ve tried to rack our brains about what changed locally at that time. The best we can come up with is perhaps we updated Visual Studio to the latest on the build machines (where the SonarQube analysis runs).

Hi,

Welcome to the community!

Only the latest version of SonarQube Community Build is considered active, so you’ll need to upgrade and see if the situation is still replicable before we can help you.

Your upgrade path is:

9.9.8 → 24.12 → 25.3

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your issue persists after upgrade, please come back to us.