Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346131 - NPE when opening the project properties page and going to the C/C++ Build -> Build Variables for Managed Build projects
Summary: NPE when opening the project properties page and going to the C/C++ Build -> ...
Status: CLOSED INVALID
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 5.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-17 14:21 EDT by Michael Lindo CLA
Modified: 2011-05-25 16:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Lindo CLA 2011-05-17 14:21:16 EDT
Create a remote C/C++ XL manged build project. Right-click on the project and go to Properties -> C/C++ Build ->Build Variables. 

This NPE will occur:

java.lang.NullPointerException
at org.eclipse.ptp.rm.jaxb.core.variables.RMVariableResolver.resolveValue(RMVariableResolver.java:46)
at org.eclipse.core.internal.variables.DynamicVariable.getValue(DynamicVariable.java:54)
at org.eclipse.cdt.internal.core.cdtvariables.EclipseVariablesVariableSupplier$EclipseVarMacro.loadValue(EclipseVariablesVariableSupplier.java:103)
at org.eclipse.cdt.internal.core.cdtvariables.EclipseVariablesVariableSupplier$EclipseVarMacro.getStringValue(EclipseVariablesVariableSupplier.java:90)
at org.eclipse.cdt.managedbuilder.internal.macros.BuildMacroProvider$VariableWrapper.getStringValue(BuildMacroProvider.java:172)
at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor.resolveMacro(SupplierBasedCdtVariableSubstitutor.java:355)
at org.eclipse.cdt.internal.core.cdtvariables.CdtVariableManager$1.resolveMacro(CdtVariableManager.java:164)
at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor.resolveMacro(SupplierBasedCdtVariableSubstitutor.java:286)
at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor.resolveMacro(SupplierBasedCdtVariableSubstitutor.java:274)
at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor.getResolvedMacro(SupplierBasedCdtVariableSubstitutor.java:259)
at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor.resolveToString(SupplierBasedCdtVariableSubstitutor.java:222)
at org.eclipse.cdt.utils.cdtvariables.SupplierBasedCdtVariableSubstitutor.resolveToString(SupplierBasedCdtVariableSubstitutor.java:240)
at org.eclipse.cdt.utils.cdtvariables.CdtVariableResolver.checkIntegrity(CdtVariableResolver.java:252)
at org.eclipse.cdt.internal.core.cdtvariables.CdtVariableManager.checkVariableIntegrity(CdtVariableManager.java:168)
at org.eclipse.cdt.managedbuilder.ui.properties.CPropertyVarsTab.checkVariableIntegrity(CPropertyVarsTab.java:478)
at org.eclipse.cdt.managedbuilder.ui.properties.CPropertyVarsTab.updateData(CPropertyVarsTab.java:503)
at org.eclipse.cdt.managedbuilder.ui.properties.CPropertyVarsTab.updateData(CPropertyVarsTab.java:462)
at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.setVisible(AbstractCPropertyTab.java:243)
at org.eclipse.cdt.ui.newui.AbstractCPropertyTab.handleTabEvent(AbstractCPropertyTab.java:551)
at org.eclipse.cdt.ui.newui.AbstractPage.setVisible(AbstractPage.java:810)
at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1323)
at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:674)
at org.eclipse.jface.preference.PreferenceDialog$10.run(PreferenceDialog.java:708)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:704)
at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886)
at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1226)
at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1251)
at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:262)
at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:256)
at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:433)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4138)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3755)
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:158)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
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:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4163)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:344)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Comment 1 Albert L. Rossi CLA 2011-05-17 15:08:14 EDT
Greg, this is the same bug you discovered which I thought we had taken care of by changing the prefix for the resolver.

Why the cdt supplier is pulling out the JAXB resolver I don't know ...

Al
Comment 2 Albert L. Rossi CLA 2011-05-17 15:14:17 EDT
Mike,

It looks like you are not using the version from HEAD where we tried to supply a fix for this.

The current FQN is:

org.eclipse.ptp.rm.jaxb.control.internal.variables.RMVariableResolver

yours is the older:

org.eclipse.ptp.rm.jaxb.core.variables.RMVariableResolver

Al
Comment 3 Michael Lindo CLA 2011-05-25 16:39:40 EDT
(In reply to comment #2)
> Mike,
> 
> It looks like you are not using the version from HEAD where we tried to supply
> a fix for this.
> 
> The current FQN is:
> 
> org.eclipse.ptp.rm.jaxb.control.internal.variables.RMVariableResolver
> 
> yours is the older:
> 
> org.eclipse.ptp.rm.jaxb.core.variables.RMVariableResolver
> 
> Al

I can verify that it is working after upgrading. Thanks.