Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unable to build project (java.lang.NullPointerException)
Unable to build project (java.lang.NullPointerException) [message #1083091] Fri, 09 August 2013 13:03 Go to next message
Thomas Van Parys is currently offline Thomas Van ParysFriend
Messages: 2
Registered: July 2009
Junior Member
It's been a while since I've needed to work on a C++ project, but recently I've been trying to get back into it, by installing CDT. Now I'm not even getting the example Hello World project compiled, and I'm starting to suspect a bug rather than wrong settings.

My environment:
- Fedora 19, 64bit, kernel 3.10.4-300
- g++ (GCC) 4.8.1, GNU Make 3.82, GNU gdb (GDB) Fedora (7.6-32.fc19)
- Eclipse Kepler (manually installed)
- CDT 8.2
- Oracle Java 1.7.0_25

The problem:
I create a new C++ project, with the HelloWorld template. I chose the Linux GCC toolchain. The project is created, but no 'Binary' folder shows up. Only the 'src' folder. Also, in the Project Properties > C/C++ General > Paths and Symbols > Inludes, no includes or symbols show up (I thought this was supposed to work automatically).

So, initially, "#include <iostream>" and "cout" and "endl" show up as errors.
I can manually add the includes to Paths and Symbols to solve this.

Now, clicking the "Build Project" button, gives me this dialog:

Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'HelloWorldCPP'.
Internal error building project HelloWorldCPP configuration Debug
java.lang.NullPointerException
Internal error building project HelloWorldCPP configuration Debug
java.lang.NullPointerException


And that's that.
Creating the project in a new workspace doesn't change a thing.

Would this be a CDT bug? Or something wrong with my setup or settings?


Thanks!
Re: Unable to build project (java.lang.NullPointerException) [message #1083124 is a reply to message #1083091] Fri, 09 August 2013 14:01 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew GvozdevFriend
Messages: 257
Registered: July 2009
Senior Member
Quote:
Would this be a CDT bug?

Yes. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=414557#c6.

[Updated on: Fri, 09 August 2013 14:02]

Report message to a moderator

Re: Unable to build project (java.lang.NullPointerException) [message #1083141 is a reply to message #1083124] Fri, 09 August 2013 14:28 Go to previous messageGo to next message
Thomas Van Parys is currently offline Thomas Van ParysFriend
Messages: 2
Registered: July 2009
Junior Member
Andrew Gvozdev wrote on Fri, 09 August 2013 10:01
Quote:
Would this be a CDT bug?

Yes. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=414557#c6.


Wow, thank you so much.
Using the nightly build just works,


Thanks,
T.
Re: Unable to build project (java.lang.NullPointerException) [message #1403362 is a reply to message #1083091] Wed, 23 July 2014 08:32 Go to previous message
abbas gheisary dehsheikh is currently offline abbas gheisary dehsheikhFriend
Messages: 1
Registered: July 2014
Junior Member
Actually I have this problem too.I imported a cocos2d-x project and it worked fine but i just restart eclipse and then this errors shows up.

I'm using these:

ADT Package 23.0.2.1259578
CDT 8.0.2.201202111925


and this is log:

eclipse.buildId=M20130204-1200
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product com.android.ide.eclipse.adt.package.adtproduct
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.adtproduct

!ENTRY com.android.ide.eclipse.adt 4 0 2014-07-23 12:39:39.892
!MESSAGE
!STACK 1
org.eclipse.core.internal.resources.ResourceException: Resource '/mydamngame/res' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
at org.eclipse.core.internal.resources.Container.members(Container.java:266)
at org.eclipse.core.internal.resources.Container.members(Container.java:249)
at com.android.ide.eclipse.adt.internal.sdk.Sdk$7.run(Sdk.java:1485)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
!SUBENTRY 1 org.eclipse.core.resources 4 368 2014-07-23 12:39:39.894
!MESSAGE Resource '/mydamngame/res' does not exist.

!ENTRY org.eclipse.egit.ui 2 0 2014-07-23 12:39:40.309
!MESSAGE Warning: EGit couldn't detect the installation path "gitPrefix" of native Git. Hence EGit can't respect system level
Git settings which might be configured in ${gitPrefix}/etc/gitconfig under the native Git installation directory.
The most important of these settings is core.autocrlf. Git for Windows by default sets this parameter to true in
this system level configuration. The Git installation location can be configured on the
Team > Git > Configuration preference page's 'System Settings' tab.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.egit.ui 2 0 2014-07-23 12:39:40.313
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\ABBAS-PC'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.cdt.core 4 0 2014-07-23 12:39:44.477
!MESSAGE Error
!STACK 0
java.lang.NullPointerException
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:104)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.core.model.CoreModel.getProjectDescription(CoreModel.java:1423)
at org.eclipse.cdt.internal.core.index.IndexFactory.safeAddProvidedFragments(IndexFactory.java:210)
at org.eclipse.cdt.internal.core.index.IndexFactory.getWritableIndex(IndexFactory.java:106)
at org.eclipse.cdt.internal.core.pdom.PDOMManager.getWritableIndex(PDOMManager.java:1173)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask.run(PDOMRebuildTask.java:69)
at org.eclipse.cdt.internal.core.pdom.PDOMIndexerJob.run(PDOMIndexerJob.java:137)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.core.jobs 4 2 2014-07-23 12:39:44.485
!MESSAGE An internal error occurred during: "C/C++ Indexer".
!STACK 0
java.lang.NullPointerException
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:104)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.core.model.CoreModel.getProjectDescription(CoreModel.java:1423)
at org.eclipse.cdt.internal.core.index.IndexFactory.safeAddProvidedFragments(IndexFactory.java:210)
at org.eclipse.cdt.internal.core.index.IndexFactory.getWritableIndex(IndexFactory.java:106)
at org.eclipse.cdt.internal.core.pdom.PDOMManager.getWritableIndex(PDOMManager.java:1173)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask.run(PDOMRebuildTask.java:69)
at org.eclipse.cdt.internal.core.pdom.PDOMIndexerJob.run(PDOMIndexerJob.java:137)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.cdt.core 4 0 2014-07-23 12:39:45.426
!MESSAGE Error
!STACK 0
java.lang.NullPointerException
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:104)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.internal.core.model.CProject.computeSourceRoots(CProject.java:603)
at org.eclipse.cdt.internal.core.model.CProject.computeChildren(CProject.java:624)
at org.eclipse.cdt.internal.core.model.CProject.buildStructure(CProject.java:588)
at org.eclipse.cdt.internal.core.model.Openable.generateInfos(Openable.java:265)
at org.eclipse.cdt.internal.core.model.CElement.openWhenClosed(CElement.java:428)
at org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:307)
at org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:297)
at org.eclipse.cdt.internal.core.model.Parent.getChildren(Parent.java:55)
at org.eclipse.cdt.internal.core.model.CProject.getSourceRoots(CProject.java:480)
at org.eclipse.cdt.internal.core.model.CModelManager.create(CModelManager.java:327)
at org.eclipse.cdt.internal.core.model.CModelManager.create(CModelManager.java:255)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.createElement(DeltaProcessor.java:88)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.traverseDelta(DeltaProcessor.java:454)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.traverseDelta(DeltaProcessor.java:472)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.processResourceDelta(DeltaProcessor.java:434)
at org.eclipse.cdt.internal.core.model.CModelManager.resourceChanged(CModelManager.java:886)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:395)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1530)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2353)
at org.eclipse.core.internal.events.NotificationManager$NotifyJob.run(NotificationManager.java:40)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.cdt.core 4 0 2014-07-23 12:39:50.886
!MESSAGE Error
!STACK 0
java.lang.NullPointerException
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:104)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.internal.core.model.CProject.computeSourceRoots(CProject.java:603)
at org.eclipse.cdt.internal.core.model.CProject.computeChildren(CProject.java:624)
at org.eclipse.cdt.internal.core.model.CProject.buildStructure(CProject.java:588)
at org.eclipse.cdt.internal.core.model.Openable.generateInfos(Openable.java:265)
at org.eclipse.cdt.internal.core.model.CElement.openWhenClosed(CElement.java:428)
at org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:307)
at org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:297)
at org.eclipse.cdt.internal.core.model.Parent.getChildren(Parent.java:55)
at org.eclipse.cdt.internal.core.model.CModelManager.create(CModelManager.java:280)
at org.eclipse.cdt.internal.core.model.CModelManager.create(CModelManager.java:257)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.createElement(DeltaProcessor.java:88)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.traverseDelta(DeltaProcessor.java:454)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.traverseDelta(DeltaProcessor.java:472)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.processResourceDelta(DeltaProcessor.java:434)
at org.eclipse.cdt.internal.core.model.CModelManager.resourceChanged(CModelManager.java:886)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:395)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1530)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:156)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

!ENTRY org.eclipse.ui 2 2 2014-07-23 12:44:25.128
!MESSAGE Invalid property category path: ValidationPropertiesPage (bundle: org.eclipse.wst.xml.ui, propertyPage: org.eclipse.wst.xml.ui.propertyPage.project.validation)

!ENTRY org.eclipse.cdt.core 4 0 2014-07-23 12:44:25.451
!MESSAGE Error
!STACK 0
java.lang.NullPointerException
at org.eclipse.cdt.internal.core.settings.model.CConfigurationDescriptionCache.loadData(CConfigurationDescriptionCache.java:104)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescription.loadDatas(CProjectDescription.java:196)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.loadProjectDescription(XmlProjectDescriptionStorage.java:486)
at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.getProjectDescription(XmlProjectDescriptionStorage.java:231)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescriptionInternal(CProjectDescriptionManager.java:416)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:398)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:393)
at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.getProjectDescription(CProjectDescriptionManager.java:386)
at org.eclipse.cdt.internal.core.model.CProject.computeSourceRoots(CProject.java:603)
at org.eclipse.cdt.internal.core.model.CProject.computeChildren(CProject.java:624)
at org.eclipse.cdt.internal.core.model.CProject.buildStructure(CProject.java:588)
at org.eclipse.cdt.internal.core.model.Openable.generateInfos(Openable.java:265)
at org.eclipse.cdt.internal.core.model.CElement.openWhenClosed(CElement.java:428)
at org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:307)
at org.eclipse.cdt.internal.core.model.CElement.getElementInfo(CElement.java:297)
at org.eclipse.cdt.internal.core.model.Parent.getChildren(Parent.java:55)
at org.eclipse.cdt.internal.core.model.CModelManager.create(CModelManager.java:280)
at org.eclipse.cdt.internal.core.model.CModelManager.create(CModelManager.java:257)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.createElement(DeltaProcessor.java:88)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.traverseDelta(DeltaProcessor.java:454)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.traverseDelta(DeltaProcessor.java:472)
at org.eclipse.cdt.internal.core.model.DeltaProcessor.processResourceDelta(DeltaProcessor.java:434)
at org.eclipse.cdt.internal.core.model.CModelManager.resourceChanged(CModelManager.java:886)
at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:395)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1530)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:156)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Previous Topic:External build command not invoked
Next Topic:Using build variables in Configurations Names
Goto Forum:
  


Current Time: Thu Oct 03 18:01:08 GMT 2024

Powered by FUDForum. Page generated in 0.04574 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top