Community
Participate
Working Groups
I opened a workspace that seemed to have a perspective from another plug-in so it could not be rendered correctly. It was not the one I currently had opened and when I tried to debug something, Debug tried to switch perspectives for me but it failed with an NPE. Manually going 'Window > Open Perspective > Debug' worked though. java.lang.NullPointerException at org.eclipse.ui.internal.Workbench.activate(Workbench.java:2535) at org.eclipse.ui.internal.Workbench.showPerspective(Workbench.java:2563) at org.eclipse.ui.internal.Workbench.showPerspective(Workbench.java:2528) at org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager.switchToPerspective(PerspectiveManager.java:316) at org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager$4.runInUIThread(PerspectiveManager.java:395) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
The array returned by WorkbenchPage's getOpenedPerspectives() may contain null entries.
The same happened to me, but I had the regular Java perspective open. Then started an application to be debugged (Debug As...) and got also an NPE. eclipse.buildId=I20120315-1300 java.version=1.6.0_29 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US Framework arguments: -keyring /Users/claudio/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/claudio/.eclipse_keyring -showlocation Error Sun Mar 18 22:54:33 CET 2012 An internal error has occurred. java.lang.NullPointerException at org.eclipse.ui.internal.Workbench.activate(Workbench.java:2535) at org.eclipse.ui.internal.Workbench.showPerspective(Workbench.java:2563) at org.eclipse.ui.internal.Workbench.showPerspective(Workbench.java:2528) at org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager.switchToPerspective(PerspectiveManager.java:316) at org.eclipse.debug.internal.ui.launchConfigurations.PerspectiveManager$4.runInUIThread(PerspectiveManager.java:395) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) 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:3940) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3617) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1015) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:909) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:580) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:535) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) 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:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) 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:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Claudio, what did you debug your application 'as' ? I'm just trying to figure out how to reproduce this (I've never seen it but I just launch regular configurations..
You need to have a dead perspective from another plug-in that's no longer in your Eclipse installation.
> Claudio, what did you debug your application 'as' ? Must have been "Java Application".
Kai mentioned this problem at the Eclipse 4 BOF at EclipseCon North America 2012. It's probably this bug.
Fixed. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=0e62440540c9ff7a295e7a71918de5e81542df4c
Verified using I20120430-1800.