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

Bug 205209

Summary: [WorkbenchParts] NPE due to null mappingService during dispose
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Paul Webster <pwebster>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pwebster
Version: 3.3   
Target Milestone: 3.4 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 103810    
Bug Blocks:    
Attachments:
Description Flags
Action Bars v01 none

Description Nick Edgar CLA 2007-10-02 13:06:28 EDT
3.3

- closed the workbench window
- in response to some controls getting disposed, the view tried to set a global action handler
- this failed with an NPE due to a null mappingService, since the services had already been disposed

Should either:
- change the lifecycle so that controls are always disposed before the site and its services, or
- make setGlobalActionHandler be resilient to the services having been disposed, or
- both

Thread [main] (Suspended (exception NullPointerException))	
	ViewActionBars(SubActionBars).setGlobalActionHandler(String, IAction) line: 492	
	LocalWorkspaceChangesView$ChangesViewPage$27.hoverToolTipClosed() line: 944	
	TooltipSupport$1.closeRequested() line: 67	
	HoverTooltip(Tooltip).close() line: 100	
	HoverTooltip.close() line: 84	
	HoverTooltip(Tooltip).dispose() line: 171	
	Tooltip$2.widgetDisposed(DisposeEvent) line: 398	
	TypedListener.handleEvent(Event) line: 116	
	EventTable.sendEvent(Event) line: 66	
	Shell(Widget).sendEvent(Event) line: 938	
	Shell(Widget).sendEvent(int, Event, boolean) line: 962	
	Shell(Widget).sendEvent(int) line: 943	
	Shell(Widget).release(boolean) line: 740	
	Shell(Widget).dispose() line: 410	
	Shell(Decorations).dispose() line: 457	
	Shell.dispose() line: 653	
	WorkbenchWindow(Window).close() line: 330	
	WorkbenchWindow(ApplicationWindow).close() line: 306	
	WorkbenchWindow.hardClose() line: 1600	
	WorkbenchWindow.busyClose() line: 699	
	WorkbenchWindow.access$0(WorkbenchWindow) line: 675	
	WorkbenchWindow$2.run() line: 790	
	BusyIndicator.showWhile(Display, Runnable) line: 67	
	WorkbenchWindow.close() line: 788	
	WindowManager.close() line: 109	
	Workbench$15.run() line: 908	
	SafeRunner.run(ISafeRunnable) line: 37	
	Workbench.busyClose(boolean) line: 905	
	Workbench.access$15(Workbench, boolean) line: 834	
	Workbench$22.run() line: 1078	
	BusyIndicator.showWhile(Display, Runnable) line: 67	
	Workbench.close(int, boolean) line: 1076	
	Workbench.close() line: 1048	
	QuitAction.run() line: 57	
	QuitAction(Action).runWithEvent(Event) line: 498	
	ActionContributionItem.handleWidgetSelection(Event, boolean) line: 545	
	ActionContributionItem.access$2(ActionContributionItem, Event, boolean) line: 490	
	ActionContributionItem$5.handleEvent(Event) line: 402	
	EventTable.sendEvent(Event) line: 66	
	MenuItem(Widget).sendEvent(Event) line: 938	
	Display.runDeferredEvents() line: 3682	
	Display.readAndDispatch() line: 3293	
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 2389	
	Workbench.runUI() line: 2353	
	Workbench.access$4(Workbench) line: 2219	
	Workbench$4.run() line: 466	
	Realm.runWithDefault(Realm, Runnable) line: 289	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 461	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.start(IApplicationContext) line: 106	
	EclipseAppHandle.run(Object) line: 153	
	EclipseAppLauncher.runApplication(Object) line: 106	
	EclipseAppLauncher.start(Object) line: 76	
	EclipseStarter.run(Object) line: 363	
	EclipseStarter.run(String[], Runnable) line: 176	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 64	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 615	
	Main.invokeFramework(String[], URL[]) line: 504	
	Main.basicRun(String[]) line: 443	
	Main.run(String[]) line: 1169	
	Main.main(String[]) line: 1144
Comment 1 Paul Webster CLA 2007-11-06 12:25:04 EST
Created attachment 82224 [details]
Action Bars v01

Add NPE protection for services that can be null.

PW
Comment 2 Paul Webster CLA 2007-11-06 12:25:39 EST
Released >20071106
PW
Comment 3 Paul Webster CLA 2007-12-11 13:26:13 EST
In I20071211-0010
PW