Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 340215 - exception when opening wizard on clean workspace
Summary: exception when opening wizard on clean workspace
Status: RESOLVED FIXED
Alias: None
Product: MPC
Classification: Technology
Component: wizard (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.1   Edit
Assignee: Benjamin Muskalla CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-16 14:52 EDT by Thomas Ehrnhoefer CLA
Modified: 2011-03-16 17:44 EDT (History)
2 users (show)

See Also:


Attachments
patch v1 (4.18 KB, patch)
2011-03-16 16:23 EDT, Thomas Ehrnhoefer CLA
no flags Details | Diff
suggested fix (1.25 KB, patch)
2011-03-16 17:04 EDT, Benjamin Muskalla CLA
steffen.pingel: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Ehrnhoefer CLA 2011-03-16 14:52:43 EDT
using the latest build
https://hudson.eclipse.org/hudson/job/epp-mpc-release/16/testReport/junit/org.eclipse.epp.mpc.tests.service.xml/UnmarshallerTest/marketplaceCatalogs/
upon opening of the MPC wizard I am seeing almost always an IllegalStateException, here is the full stack trace

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1008)
at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer.updateCatalog(CatalogViewer.java:563)
at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.updateCatalog(MarketplaceViewer.java:435)
at org.eclipse.epp.internal.mpc.ui.wizards.MarketplacePage$6.run(MarketplacePage.java:314)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4041)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3660)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand.execute(MarketplaceWizardCommand.java:158)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:820)
at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:806)
at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:796)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
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:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
Caused by: java.lang.IllegalStateException
at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:64)
at org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog.performDiscovery(MarketplaceCatalog.java:254)
at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer$6.run(CatalogViewer.java:569)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Root exception:
java.lang.IllegalStateException
at org.eclipse.equinox.internal.p2.discovery.Catalog.performDiscovery(Catalog.java:64)
at org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog.performDiscovery(MarketplaceCatalog.java:254)
at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer$6.run(CatalogViewer.java:569)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Comment 1 Thomas Ehrnhoefer CLA 2011-03-16 15:54:55 EDT
seems like the newest build does not have this problem anymore. Steffen?
Comment 2 Steffen Pingel CLA 2011-03-16 16:16:08 EDT
I still saw it, but less frequently. I'll take a quick look at the code appears to be a race condition.
Comment 3 Thomas Ehrnhoefer CLA 2011-03-16 16:23:25 EDT
Created attachment 191347 [details]
patch v1
Comment 4 Thomas Ehrnhoefer CLA 2011-03-16 16:26:02 EDT
sorry, wrong task
Comment 5 Benjamin Muskalla CLA 2011-03-16 17:04:32 EDT
Created attachment 191358 [details]
suggested fix

I think the problem that we always had a selection in the past with the catalog table but with the first wizardpage gone, this isn't true anymore.
Comment 6 Steffen Pingel CLA 2011-03-16 17:44:02 EDT
Thanks Benjamin! I have applied the patch. If no selection was stored the first catalog is no always selected by default.