Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Could not initialize cppcheck #73

Open
steve6354 opened this issue Oct 15, 2015 · 0 comments
Open

Could not initialize cppcheck #73

steve6354 opened this issue Oct 15, 2015 · 0 comments

Comments

@steve6354
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant