Bug 428479 - NullPointerException in Project's Project Preferences page
Summary: NullPointerException in Project's Project Preferences page
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.3.1   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 4.4 M6   Edit
Assignee: Victor Rubezhny CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on: 428476
Blocks:
  Show dependency tree
 
Reported: 2014-02-18 14:43 EST by Nitin Dahyabhai CLA
Modified: 2014-02-18 21:58 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nitin Dahyabhai CLA 2014-02-18 14:43:47 EST
+++ This bug was initially created as a clone of Bug #428476 +++

From looking at the code, org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage#getInputProject() can return null, but the caller code never seems to do anything special to handle that case.

NullPointerException occurs when opening a Project Proeprties page by right-clicking on a projects 'JavaScript Resources' library and selecting 'Project Preferences' on the preference page.

!ENTRY org.eclipse.jface 4 2 2014-02-18 21:22:10.611
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.core.externaltools.internal.model.BuilderCoreUtils.getBuilderFolder(BuilderCoreUtils.java:233)
	at org.eclipse.ui.externaltools.internal.model.BuilderUtils.getBuilderFolder(BuilderUtils.java:136)
	at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.checkBuilderFolder(BuilderPropertyPage.java:1067)
	at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.performCancel(BuilderPropertyPage.java:1232)
	at org.eclipse.jface.preference.PreferenceDialog$1.run(PreferenceDialog.java:265)
	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:176)
	at org.eclipse.jface.preference.PreferenceDialog.cancelPressed(PreferenceDialog.java:263)
	at org.eclipse.jface.preference.PreferenceDialog.buttonPressed(PreferenceDialog.java:240)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:633)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4423)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3771)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3391)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
	at org.eclipse.jface.window.Window.open(Window.java:803)
	at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:158)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:499)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:588)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:415)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4423)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1388)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3771)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3391)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1122)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:146)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:615)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Comment 1 Victor Rubezhny CLA 2014-02-18 19:54:31 EST
The fix for the issue is pushed to Gerrit for review: 

https://git.eclipse.org/r/22196
Comment 2 Michael Rennie CLA 2014-02-18 21:58:19 EST
(In reply to Victor Rubezhny from comment #1)
> The fix for the issue is pushed to Gerrit for review: 
> 
> https://git.eclipse.org/r/22196

Merged into master: http://git.eclipse.org/c/platform/eclipse.platform.debug.git/commit/?id=195d9b2e47ff252337418e91d5e56151b5342d99

Thanks Victor.