Community
Participate
Working Groups
Change preferences to Open new persp. in a new window. Close all perspectives. Try to open the java perspective. Got the following NPE. There are two problems here. 1) The NPE should not happen 2) the UI should handle the exception better so the perspective should open without that menu option. Copying this bug report to debug since there are two problems. java.lang.NullPointerException at org.eclipse.debug.internal.ui.actions.LaunchWithConfigurationAction.g etActivePerspectiveID(LaunchWithConfigurationAction.java:168) at org.eclipse.debug.internal.ui.actions.LaunchWithConfigurationAction.g etMenu(LaunchWithConfigurationAction.java:106) at org.eclipse.jface.action.ActionContributionItem.fill(ActionContributi onItem.java(Compiled Code)) at org.eclipse.jface.action.SubContributionItem.fill(SubContributionItem .java:45) at org.eclipse.jface.action.MenuManager.update(MenuManager.java(Compiled Code)) at org.eclipse.jface.action.MenuManager.update(MenuManager.java:444) at org.eclipse.jface.action.MenuManager.fill(MenuManager.java:187) at org.eclipse.jface.action.SubMenuManager.fill(SubMenuManager.java:63) at org.eclipse.jface.action.SubContributionItem.fill(SubContributionItem .java:45) at org.eclipse.jface.action.MenuManager.update(MenuManager.java(Compiled Code)) at org.eclipse.jface.action.MenuManager.updateAll(MenuManager.java:575) at org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(WorkbenchWin dow.java:1342) at org.eclipse.ui.internal.WorkbenchWindow.updateActionSets(WorkbenchWin dow.java:1360) at org.eclipse.ui.internal.WorkbenchWindow$7.run(WorkbenchWindow.java:11 63) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow .java:1137) at org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(WorkbenchWindow. java:342) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.j ava:224) at org.eclipse.ui.internal.Workbench.access$8(Workbench.java:217) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:842) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:56) at org.eclipse.ui.internal.Workbench.openWorkbenchWindow(Workbench.java: 839) at org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeToPerspecti veMenu.java:44) at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.java:305) at org.eclipse.ui.actions.PerspectiveMenu$2.widgetSelected(PerspectiveMe nu.java:93) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java( Compiled Code)) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compil ed Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compile d Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1068) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoa der.java:739) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:200) at org.eclipse.core.launcher.Main.run(Main.java:643) at org.eclipse.core.launcher.Main.main(Main.java:476) java.lang.NullPointerException
There is another problem here. If you exit and restart the workbench you will get the dialog: Unable to read workbench state. Workbench UI layout will be reset.
getActiveWindow and getActivePage can return null. Should check all senders. Eduardo, please enter separate PRs for the serviceability issues.
NPE handled in bug 16956 Checked all references and added null checks where necessary.
Please verify (DarinW)
Verified. Made 3 more fixes in BreakpoingHitCountAction EvaluateAction JDIDebugUIPlugin