Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358410 - 'org.eclipse.swt.SWTError: Cannot initialize Drop' when installing feature with metaRequirements
Summary: 'org.eclipse.swt.SWTError: Cannot initialize Drop' when installing feature wi...
Status: CLOSED FIXED
Alias: None
Product: MPC
Classification: Technology
Component: Install (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-21 08:59 EDT by Mario Pierro CLA
Modified: 2012-11-23 15:54 EST (History)
5 users (show)

See Also:


Attachments
Two deployable features, one of which contains a metaRequirement and causes the exception to be thrown. (5.22 KB, application/octet-stream)
2011-09-21 09:02 EDT, Mario Pierro CLA
no flags Details
Screenshot (146.71 KB, image/png)
2011-09-21 09:35 EDT, Mario Pierro CLA
no flags Details
Eclipse log (160.65 KB, application/octet-stream)
2011-09-21 09:40 EDT, Mario Pierro CLA
no flags Details
Configuration (174.43 KB, text/plain)
2011-09-21 09:41 EDT, Mario Pierro CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Pierro CLA 2011-09-21 08:59:26 EDT
Build Identifier: I20110613-1736

I am trying to install a feature I developed, which specifies a 'metaRequirement' on a plugin declaring an action. During the install phase, on Indigo I am getting this exception right after the "unsigned plugins" dialog is displayed.
The exception is not fatal - refusing to close the workbench after an SWT exception leads to a successful installation. Also, the error is only seen when installing the first time on a fresh Eclipse. Updating does not show this problem.

Note This does _not_ happen in Eclipse Helios, only in Indigo.

Reproducible: Always

Steps to Reproduce:
1. Add an Archive update site to a fresh Eclipse for C/C++ Developers installation, pointing to the provided archive

2. Select the 'Feature requiring action when installing' _only_.

3. Perform the installation, and verify that the following exception is seen:


org.eclipse.swt.SWTError: Cannot initialize Drop
	at org.eclipse.swt.dnd.DND.error(DND.java:266)
	at org.eclipse.swt.dnd.DND.error(DND.java:227)
	at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:135)
	at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceDropAdapter.installDropTarget(MarketplaceDropAdapter.java:59)
	at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceDropAdapter$1.runInUIThread(MarketplaceDropAdapter.java:48)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.jface.dialogs.ErrorDialog.open(ErrorDialog.java:360)
	at org.eclipse.equinox.internal.p2.ui.ValidationDialogServiceUI$2.run(ValidationDialogServiceUI.java:100)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:164)
	at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:158)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	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:344)
	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:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

4. Verify that ignoring the exception and continuing the install works.

Note this does NOT happen if the 'ContainerFeature' is installed (which ships the plugin containing the action in the feature itself). Also and it does NOT happen if the plugin containing the action is already installed in the target.
Comment 1 Mario Pierro CLA 2011-09-21 09:02:11 EDT
Created attachment 203760 [details]
Two deployable features, one of which contains a metaRequirement and causes the exception to be thrown.

Added zip file attachment containing an update site with two features:

* A container feature shipping the plugin with the action ('ContainerFeature').
* A feature requiring the action in configure phase ('Feature requiring...').

The bug is only seen when installing the latter.
Comment 2 Mario Pierro CLA 2011-09-21 09:17:04 EDT
I have also noted that the exception is NOT seen if 'Contact all update sites' is unchecked before starting to install the 'Feature requiring action when installing'.
Comment 3 Mario Pierro CLA 2011-09-21 09:35:21 EDT
Created attachment 203764 [details]
Screenshot

Added screenshot
Comment 4 Mario Pierro CLA 2011-09-21 09:40:26 EDT
Created attachment 203765 [details]
Eclipse log
Comment 5 Mario Pierro CLA 2011-09-21 09:41:31 EDT
Created attachment 203766 [details]
Configuration
Comment 6 Cedric Brun CLA 2011-09-21 11:29:19 EDT
Moving it to C/CPP package as you start from an  "Eclipse for C/C++ Developers"
Comment 7 Markus Knauer CLA 2011-09-24 04:54:51 EDT
Moving againg... this time to the Marketplace Client... the stack trace tells me that there is something going wrong with the D&D support of the MPC.
Comment 8 Mario Pierro CLA 2011-09-27 07:11:17 EDT
This seems to have been fixed in Indigo SR1, both for 32- and 64-bit versions.

I cannot reproduce the bug anymore using:
eclipse-cpp-indigo-SR1-incubation-win32

org.eclipse.epp.package.cpp.product
Version: Indigo Service Release 1
Build id: 20110916-0149
Comment 9 Ian Skerrett CLA 2012-11-23 15:54:43 EST
Seems to be fixed.