Community
Participate
Working Groups
Problem: -------- DropTarget cleanup (COM-level) does not seem to be complete. Instantiating another DragDrop instance within the same process fails after calling CoLockObjectExternal COM API. org.eclipse.swt.SWTError: Cannot initialize Drop at org.eclipse.swt.dnd.DND.error(DND.java:220) at org.eclipse.swt.dnd.DND.error(DND.java:181) at org.eclipse.swt.dnd.DropTarget.<init>(DropTarget.java:133) at org.eclipse.swt.examples.dnd.DNDExample.createDropTarget(DNDExample.java:640) at org.eclipse.swt.examples.dnd.DNDExample.access$2000 (DNDExample.java:21) at org.eclipse.swt.examples.dnd.DNDExample$25.widgetSelected(DNDExample.java:839) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:769) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2578) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2256) at org.eclipse.swt.examples.dnd.DNDExample.open(DNDExample.java:1101) at org.eclipse.swt.examples.dnd.DNDExample.access$000 (DNDExample.java:21) at org.eclipse.swt.examples.dnd.DNDExample$1.run(DNDExample.java:67) at java.lang.Thread.run(Thread.java:534) Environment: ------------ Windows XP Pro 2002 SP1 SWT M08 j2sdk1.4.2_03 Steps to reproduce: ------------------ 1. Modify DNDExample.java (SWT sample), main() method as shown below, so that it displays two Shell instances, one after another: public static void main(String[] args) throws Exception{ //fisrt instance works OK DNDExample example = new DNDExample(); example.open(); //second instance has problems with DropTarget initialization //for cleaner experiment, let's use another UI thread Runnable runnable = new Runnable() { public void run() { DNDExample example2 = new DNDExample(); example2.open(); } }; new Thread(runnable).start(); Thread.sleep(Long.MAX_VALUE); } 2. Run DNDExample, make sure example Shell is displayed. 3. Click on DropTarget check box, which causes creation of DropTarget associated with Label control. 4. Close the Shell, which causes disposal of Label control and associated DropTarget. When DropTarget refCount becomes 0, disposeCOMInterfaces() method is called, which should completely release all system resources associated with DropTarget. 5. Make sure example2 Shell instance is displayed. 6. Click on DropTarget check box, which should create another DropTarget instance. Instead, SWT fails with stack trace provided above.
This is a one-off bulk update. (The last one in the triage migration). Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process: https://wiki.eclipse.org/SWT/Devel/Triage See Bug 518478 for details. Tag for notification/mail filters: @TriageBulkUpdate
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.