Community
Participate
Working Groups
I20071212-0010. Caused by bug 185502. 1. start a simple Java app (no plug-ins) 2. try to import binary projects ==> !ENTRY org.eclipse.ui 4 0 2007-12-12 15:03:27.639 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper.getWorkspaceBundleMap(BundleLauncherHelper.java:33) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard.areConflictingConfigurations(PluginImportWizard.java:125) at org.eclipse.pde.internal.ui.wizards.imports.PluginImportWizard.performFinish(PluginImportWizard.java:92) at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:742) at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:373) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:623) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3750) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3361) at org.eclipse.jface.window.Window.runEventLoop(Window.java:825) at org.eclipse.jface.window.Window.open(Window.java:801) at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:159) at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:280) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:240) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:475) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:470) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:165) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:582) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:499) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:410) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3750) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3361) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2381) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2345) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2211) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:473) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:468) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) 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:561) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:501) at org.eclipse.equinox.launcher.Main.run(Main.java:1239) at org.eclipse.equinox.launcher.Main.main(Main.java:1215) at org.eclipse.core.launcher.Main.main(Main.java:30)
Created attachment 85087 [details] possible fix As I couldn't reproduce that I can only assume that this is a good patch. NPE can happen in this method only when ILaunchConfiguration passed as parameter to org.eclipse.pde.internal.ui.launcher.BundleLauncherHelper.getWorkspaceBundleMap(BundleLauncherHelper.java:33) is null.
Bartosz, thanks for creating a fix so quickly. Since it was milestone week and this is a major sev. bug, I was also working on the bug. I figured we would take it one step further by checking to see if the running ILaunchConfiguration was actually a PDE configuration. If it is not, then we can ignore it and move on. It seemed a little funny to get a warning about a possible conflict when the only thing running was a java application :)
>I figured we would take it one step further by checking to see if the running >ILaunchConfiguration was actually a PDE configuration. If it is not, then we >can ignore it and move on. What about a simple Java launch config that runs an SWT snippet which is in a Java project that has the imported SWT project on its dependency list? >As I couldn't reproduce that ... I can now also not reproduce with the simple steps from comment 0. I made several tests and launch configs, so maybe it was caused by another config and not the simply one I was running.
> What about a simple Java launch config that runs an SWT snippet which is in a > Java project that has the imported SWT project on its dependency list? I was trying to fix bug 212763 without knowing you opened it. I will remove the fix I placed in there to look for PDE launch configs and we can fix it in that bug.
Reassigned bug to Bartosz since we used his patch to fix the bug. Will be in I20071212-1800.
Tried various scenarios using I20071212-1800 and could not trigger the NPE anymore.