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

Bug 77018

Summary: NPE while opening launch configuration dialog.
Product: [Eclipse Project] PDE Reporter: Alex Chapiro <achapiro>
Component: UIAssignee: PDE-UI-Inbox <pde-ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Alex Chapiro CLA 2004-10-26 10:56:03 EDT
Created launch configuration for Run-Time Workbench, at the Plug-in page
selected Choose plug-ins and fragments to launch from the list. Un-checked some
plugins and saved. Then re-opened this dialog and select this configuraion. Have
got the following error message in the .log file:


java.lang.NullPointerException
	at java.util.TreeMap.compare(Unknown Source)
	at java.util.TreeMap.getEntry(Unknown Source)
	at java.util.TreeMap.containsKey(Unknown Source)
	at java.util.TreeSet.contains(Unknown Source)
	at
org.eclipse.pde.internal.ui.launcher.AdvancedLauncherTab.initWorkspacePluginsState(AdvancedLauncherTab.java:412)
	at
org.eclipse.pde.internal.ui.launcher.AdvancedLauncherTab.initializeFrom(AdvancedLauncherTab.java:470)
	at
org.eclipse.pde.internal.ui.launcher.WorkbenchLauncherTabGroup$1.run(WorkbenchLauncherTabGroup.java:73)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at
org.eclipse.pde.internal.ui.launcher.WorkbenchLauncherTabGroup.initializeFrom(WorkbenchLauncherTabGroup.java:55)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(LaunchConfigurationTabGroupViewer.java:540)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$5.run(LaunchConfigurationTabGroupViewer.java:473)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(LaunchConfigurationTabGroupViewer.java:490)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(LaunchConfigurationTabGroupViewer.java:454)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.handleLaunchConfigurationSelectionChanged(LaunchConfigurationsDialog.java:775)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$3.selectionChanged(LaunchConfigurationsDialog.java:585)
	at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:616)
	at org.eclipse.core.runtime.Platform.run(Platform.java:747)
	at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157)
	at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1394)
	at
org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:693)
	at
org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:718)
	at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:180)
	at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:175)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:324)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:668)
	at org.eclipse.jface.window.Window.open(Window.java:648)
	at
org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:419)
	at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:381)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at
org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:385)
	at
org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:327)
	at
org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:80)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:881)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:915)
	at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:866)
	at
org.eclipse.jface.action.ActionContributionItem$7.handleEvent(ActionContributionItem.java:785)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
	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.core.launcher.Main.basicRun(Main.java:185)
	at org.eclipse.core.launcher.Main.run(Main.java:704)
	at org.eclipse.core.launcher.Main.main(Main.java:688)



Sorry if this bug was already reported, but it's really difficult to find
duplication for this sort of errors.
Comment 1 Wassim Melhem CLA 2004-10-26 16:22:36 EDT

*** This bug has been marked as a duplicate of 77043 ***
Comment 2 Wassim Melhem CLA 2004-10-26 16:23:08 EDT
Reopening.  Wrong bug.
Comment 3 Thomas D. Johnson CLA 2004-11-01 10:29:04 EST
I also see similar behavior and traceback in 3.0.1.

For now I would really like to know how to restore my ability
to run existing PDE runtime workbench launches.
Comment 4 Alex Chapiro CLA 2004-11-01 10:59:31 EST
It's easy:-) I just deleted bad run-time workbench launch configuration and
re-created new one.
Comment 5 Wassim Melhem CLA 2004-11-02 23:29:01 EST
This code has changed in 3.1, and the method in question guards against all 
NPEs.