cppcheclipse icon indicating copy to clipboard operation
cppcheclipse copied to clipboard

Could not initialize cppcheck

Open steve6354 opened this issue 10 years ago • 0 comments

STEPS: Attempt to run cppcheck on Eclipse CDT project EXPECTED: A run with error, warning, etc... output WHAT I GET: A popup with the error message listed in the title. OUTPUT: Error log has the following; org.eclipse.core.runtime.CoreException: Could not initialize cppcheck for project NIFTY_SHEDS_4.0 at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.initChecker(Builder.java:192) at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.processFile(Builder.java:199) at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.visit(Builder.java:122) at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:126) at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:85) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:86) at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:127) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:95) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:124) at org.eclipse.core.internal.resources.Resource.accept(Resource.java:108) at com.googlecode.cppcheclipse.ui.Builder.processResource(Builder.java:306) at com.googlecode.cppcheclipse.ui.commands.RunCodeAnalysis$RunCodeAnalysisJob.runResource(RunCodeAnalysis.java:26) at com.googlecode.cppcheclipse.ui.commands.ResourceSelectionJob.run(ResourceSelectionJob.java:44) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.NullPointerException at com.googlecode.cppcheclipse.ui.ToolchainSettings.getIncludes(ToolchainSettings.java:181) at com.googlecode.cppcheclipse.ui.ToolchainSettings.getUserIncludes(ToolchainSettings.java:87) at com.googlecode.cppcheclipse.core.Checker.(Checker.java:80) at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.initChecker(Builder.java:164) ... 16 more

ADDITIONAL INFO: This is on a project that I use CrossGCC as a toolchain. Nothing crazy, it's just to use the 4.8 version of GCC that this CentOS did not come with. Also, I made a simple "Hello World" project using the default Toolchain, and cppchkeclipse runs fine. I also ran cppcheck from the command line on the troublesome project, and it runs fine. The OS I'm using is CentOS 5.5. I have a fresh build of cppcheck. Eclipse version is Juno. It really seems like it has trouble picking up the 'CrossGCC" Toolchain parameters. I checked out the source and gave it a quick look, but nothing jumped out. But I'm not familiar with making Eclipse plugins.

steve6354 avatar Oct 15 '15 21:10 steve6354