Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 259703

Summary: C++ project build configuration pages became non-functional
Product: [Tools] CDT Reporter: Andrei R <andrei144>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: malaperle
Version: 6.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Andrei R CLA 2008-12-26 15:07:00 EST
Build ID: M20080911-1700

Steps To Reproduce:

1. Open any C++ project, right-click and select "Properties"

2. Navigate to "C++ Build" in the project properties window, or to any sub-page under "C++ Build"

3. Blank page shows up saying "This project is not a CDT project" (it is), and the following message is logged:
"Problems occurred when invoking code from plug-in: "org.eclipse.jface".

All pages under "C/C++ General" work, except for "Paths and Symbols", which causes the same problem. 



More information:

This has definitely worked before. Don't know if it's related, but things became broken after I installed Profiling Tools (TPTP) and used them to profile unrelated Java project, during which time I had to kill and re-start unresponsive Eclipse few times.


Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.NullPointerException
	at org.eclipse.cdt.ui.newui.AbstractPage.populateConfigurations(AbstractPage.java:600)
	at org.eclipse.cdt.ui.newui.AbstractPage.setVisible(AbstractPage.java:658)
	at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1290)
	at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:570)
	at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:702)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:698)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.core.runtime.Platform.run(Platform.java:880)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
	at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1153)
	at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1178)
	at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:250)
	at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:244)
	at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:418)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)


eclipse.buildId=M20080911-1700
java.version=1.6.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  768M
Command-line arguments:  -os win32 -ws win32 -arch x86 768M


This is Windows Vista 64 running Eclipse with 32-bit Java.
Comment 1 Andrei R CLA 2008-12-26 17:41:02 EST
I have upgraded CDT UI to newer version (org.eclipse.cdt.ui_5.0.1.200809120802.jar), and still get the same exception, although line numbers are different now:



eclipse.buildId=M20080911-1700
java.version=1.6.0_02
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  768M
Command-line arguments:  -os win32 -ws win32 -arch x86 768M


Error
Fri Dec 26 17:38:32 EST 2008
Problems occurred when invoking code from plug-in: "org.eclipse.jface".

java.lang.NullPointerException
at org.eclipse.cdt.ui.newui.AbstractPage.populateConfigurations(AbstractPage.java:598)
at org.eclipse.cdt.ui.newui.AbstractPage.setVisible(AbstractPage.java:656)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1290)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:570)
at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:702)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:698)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1153)
at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1178)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:250)
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:244)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:418)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:157)
at org.eclipse.ui.internal.ide.actions.ProjectPropertyDialogAction.run(ProjectPropertyDialogAction.java:77)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

Comment 2 Marc-André Laperle CLA 2009-09-16 23:37:37 EDT
Do you still have the problem in CDT 5.0.2 or 6.0.0 ? If so, can you post the content of your .cproject? Maybe something is missing in it.

I had a similar problem but I'm not sure it's related. I keep a lot of different Eclipse and CDT versions and I have a Makefile project which gives me similar errors. I believe I created the project with Eclipse 3.5.0 and CDT 6.0.0. When I import it into a 3.4.1/5.0.1 or 3.4.2/5.0.2 workspace and I follow your steps, I get the errors. 

This is what my .cproject looks like:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 5.0.0?>

<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage2">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="cdt.managedbuild.toolchain.gnu.cygwin.base.453089186">
<storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.cygwin.base.453089186_org.eclipse.cdt.core.settings" id="cdt.managedbuild.toolchain.gnu.cygwin.base.453089186" name="Cygwin GCC"/>
<storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.cygwin.base.453089186_scannerConfiguration"/>
<storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.cygwin.base.453089186_cdtBuildSystem" version="4.0.0"/>
<storageModule externalCElementFile="cdt.managedbuild.toolchain.gnu.cygwin.base.453089186_org.eclipse.cdt.core.externalSettings"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="testMakefile.null.1777690827" name="testMakefile"/>
</storageModule>
</cproject>

I don't know much about .cproject and .project files but this one is much shorter than the others I have and it has a <?fileVersion 5.0.0?> which I can't find the way to reproduce.
Comment 3 Marc-André Laperle CLA 2012-05-15 23:04:11 EDT

*** This bug has been marked as a duplicate of bug 271628 ***