I’ve getting a very similar error. We use gcc on Red Hat 7.9 Linux. Sonar Scanner v3.0.3.778 Build wrapper v4.7. What is the following error message trying to tell me? What do I need to check/change?
java.lang.NullPointerException at com.sonar.cpp.analyzer.ClangDriver.envListToMap(ClangDriver.java:500)
that’s a pretty old version of SonarQube and build-wrapper that you are using. I invite you to give it a try with a newer version of SonarQube and see if you still face the problem.
Yes, it’s old but I have no control over that unfortunately. I have to get this version working. I think it will work on my part, but I need some help with what to look for and where, and what to try. How can I find out what sort of thing the null pointer is supposed to be pointing to? Please could you tell me what line 500 is referring to?
Please make sure you use the latest version of sonar-cfamily-plugin and build-wrapper, you should always download build-wrapper from the server each analysis, to make sure you are using the up-to-date version.
Thanks. I updated the build-wrapper by downloading the latest from the server. I now have a 2019 version instead of the old 2017 one. This fixed the issue. Thank you.