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

Bug 274345

Summary: [launch] NPE in LaunchConfigurationTabGroupViewer.handleApplyPressed()
Product: [Eclipse Project] Platform Reporter: Marc Khouzam <marc.khouzam>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: darin.eclipse
Version: 3.5   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marc Khouzam CLA 2009-04-29 13:18:20 EDT
With 3.5M6 I got this NPE when doing an Apply after having done some deletes of configurations.  My Eclipse was deadly slow and I started clicking buttons before the previous operation was finished, which is probably what triggered some race condition.

Since I had the stack trace, I thought I'd write the bug.

!ENTRY org.eclipse.jface 4 2 2009-04-29 13:07:56.986
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
        at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.handleApplyPressed(LaunchConfigurationTabGroupViewer.java:1333)
        at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$2.getConfirmation(LaunchConfigurationsDialog.java:530)
        at org.eclipse.debug.internal.ui.launchConfigurations.AbstractLaunchConfigurationAction.run(AbstractLaunchConfigurationAction.java:94)
        at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog$1.run(LaunchConfigurationsDialog.java:515)
        at org.eclipse.debug.ui.AbstractDebugView.doubleClick(AbstractDebugView.java:731)
        at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:821)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:888)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
        at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:819)
        at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1419)
        at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1195)
        at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:238)
        at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:235)
        at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:296)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1161)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3480)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3099)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
        at org.eclipse.jface.window.Window.open(Window.java:801)
        at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1064)
        at org.eclipse.debug.ui.DebugUITools$1.run(DebugUITools.java:398)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:406)
        at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialogOnGroup(DebugUITools.java:340)
        at org.eclipse.debug.ui.actions.OpenLaunchDialogAction.run(OpenLaunchDialogAction.java:81)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
        at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
        at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1161)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3480)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3099)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2393)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2357)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2209)
        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
        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:368)
        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:556)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1284)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1260)
Comment 1 Darin Wright CLA 2009-04-29 15:26:06 EDT
For this to happen it looks like the selection has to change to a launch config type (or be empty), and then handle an "apply". Not sure if it is possible for the order of event handling to get out of synch (i.e. apply is pressed, selection changes, but the apply is handled after the selection change due to some strange slowness).

Not sure how to reproduce. However, if it does not happen again, I suggest to close as "mysterious".
Comment 2 Darin Wright CLA 2009-06-17 16:25:53 EDT
Please re-open with more info if this continues to be an issue.