Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350067 - [Compatibility] Cannot shutdown with Mylyn due to NPE
Summary: [Compatibility] Cannot shutdown with Mylyn due to NPE
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.1   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 4.2 M1   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
: 349452 351177 352483 (view as bug list)
Depends on:
Blocks: 321278 331444
  Show dependency tree
 
Reported: 2011-06-22 11:11 EDT by Remy Suen CLA
Modified: 2011-07-19 12:37 EDT (History)
6 users (show)

See Also:
pwebster: review+


Attachments
Menu contributions patch v1 (7.82 KB, patch)
2011-06-27 16:06 EDT, Remy Suen CLA
no flags Details | Diff
Menu contributions patch v2 (7.67 KB, patch)
2011-06-28 15:00 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2011-06-22 11:11:28 EDT
java.lang.RuntimeException: error: viewPart is null
	at org.eclipse.mylyn.context.ui.AbstractFocusViewAction.getPartForAction(AbstractFocusViewAction.java:202)
	at org.eclipse.mylyn.internal.context.ui.actions.FocusTaskListAction.getViewers(FocusTaskListAction.java:93)
	at org.eclipse.mylyn.context.ui.AbstractFocusViewAction$2.preShutdown(AbstractFocusViewAction.java:163)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:821)
	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.ui.internal.Workbench.firePreShutdown(Workbench.java:819)
	at org.eclipse.ui.internal.Workbench.busyClose(Workbench.java:954)
	at org.eclipse.ui.internal.Workbench.access$13(Workbench.java:944)
	at org.eclipse.ui.internal.Workbench$15.run(Workbench.java:1125)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.Workbench.close(Workbench.java:1123)
	at org.eclipse.ui.internal.Workbench.restart(Workbench.java:2223)
	at org.eclipse.equinox.internal.p2.ui.ProvisioningOperationRunner$1.run(ProvisioningOperationRunner.java:91)
	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:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:969)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:885)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:539)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:519)
	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 Remy Suen CLA 2011-06-23 09:27:52 EDT
Likely the same problem as bug 349452, which was introduced by the fix for bug 325768.
Comment 2 Remy Suen CLA 2011-06-27 16:06:15 EDT
Created attachment 198683 [details]
Menu contributions patch v1

This patch tweaks the context function to not just arbitrarily assume that all contributions of this type is an action set for the workbench window. This prevents CCEs from occurring as well as proper initialization and clean-up of these actions.
Comment 3 Remy Suen CLA 2011-06-27 16:19:08 EDT
(In reply to comment #2)
> Created attachment 198683 [details]
> Menu contributions patch v1

Paul, could you take a look at this, please? Thanks.
Comment 4 Remy Suen CLA 2011-06-28 09:11:00 EDT
*** Bug 349452 has been marked as a duplicate of this bug. ***
Comment 5 Paul Webster CLA 2011-06-28 14:29:31 EDT
I think we need to still use the static context, but just like the IWW add the MPart as well.

PW
Comment 6 Remy Suen CLA 2011-06-28 15:00:14 EDT
Created attachment 198769 [details]
Menu contributions patch v2

(In reply to comment #5)
> I think we need to still use the static context, but just like the IWW add the
> MPart as well.

You're right, sorry about that.
Comment 7 Paul Webster CLA 2011-06-29 07:16:10 EDT
(In reply to comment #6)
> Created attachment 198769 [details]
> Menu contributions patch v2

OK, looks fine.

PW
Comment 8 Remy Suen CLA 2011-06-29 07:36:04 EDT
(In reply to comment #6)
> Created attachment 198769 [details]
> Menu contributions patch v2

Patch released to CVS HEAD. I also added a missing switch statement for T_EDITOR.
Comment 9 Steffen Pingel CLA 2011-07-05 10:36:56 EDT
*** Bug 351177 has been marked as a duplicate of this bug. ***
Comment 10 Steffen Pingel CLA 2011-07-19 12:37:52 EDT
*** Bug 352483 has been marked as a duplicate of this bug. ***