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

Bug 343536

Summary: [Compatibility] getOpenPerspectives() may have a null value as one of its array element
Product: [Eclipse Project] e4 Reporter: Thomas Schindl <tom.schindl>
Component: UIAssignee: Remy Suen <remy.suen>
Status: VERIFIED FIXED QA Contact: Remy Suen <remy.suen>
Severity: normal    
Priority: P3 CC: emoffatt, pwebster, remy.suen
Version: unspecified   
Target Milestone: 4.1 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Handle missing perspectives patch v1 none

Description Thomas Schindl CLA 2011-04-21 10:02:21 EDT
I20110421-5000

0) Java Perspective
1) Select all Projects on the right
2) Select Team > Synchronize with Repository


org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
	at org.eclipse.swt.SWT.error(SWT.java:4277)
	at org.eclipse.swt.SWT.error(SWT.java:4192)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3927)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3604)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:868)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:784)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:87)
	at org.eclipse.ui.internal.Workbench$3.run(Workbench.java:542)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:522)
	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(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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)
Caused by: java.lang.NullPointerException
	at org.eclipse.ui.internal.Workbench.activate(Workbench.java:2517)
	at org.eclipse.ui.internal.Workbench.showPerspective(Workbench.java:2545)
	at org.eclipse.ui.internal.Workbench.showPerspective(Workbench.java:2510)
	at org.eclipse.team.internal.ui.synchronize.SynchronizeManager.showSynchronizeViewInActivePage(SynchronizeManager.java:461)
	at org.eclipse.team.internal.ui.synchronize.RefreshUserNotificationPolicy$1.run(RefreshUserNotificationPolicy.java:47)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	... 23 more
Comment 1 Remy Suen CLA 2011-04-21 10:10:43 EDT
How many perspectives did you have already opened? Did you have any dead perspectives (that were not actually there because the plug-ins weren't installed)?
Comment 2 Thomas Schindl CLA 2011-04-21 10:20:07 EDT
right there's one dead perspective because I yet have not installed the SVN-Plugin
Comment 3 Remy Suen CLA 2011-04-25 09:32:44 EDT
Created attachment 193985 [details]
Handle missing perspectives patch v1

getOpenPerspectives() returns descriptors even if the bundles aren't actually there so we should do the same in 4.x.
Comment 4 Remy Suen CLA 2011-04-25 09:33:58 EDT
(In reply to comment #3)
> Created attachment 193985 [details]
> Handle missing perspectives patch v1

Patch released to CVS HEAD. Thanks for the bug report, Tom!
Comment 5 Remy Suen CLA 2011-04-26 14:04:19 EDT
Verified with I20110426-0200 on Windows XP.