Bug 36084 - [DND] SWT error on GTK Linux: Cannot initialize Drop
Summary: [DND] SWT error on GTK Linux: Cannot initialize Drop
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Knut Radloff CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-04 11:58 EST by Andrew Agno CLA
Modified: 2003-05-27 10:19 EDT (History)
2 users (show)

See Also:


Attachments
Portion of log file from today. (6.80 KB, text/plain)
2003-04-04 11:59 EST, Andrew Agno CLA
no flags Details
Configuration details (113.59 KB, text/plain)
2003-04-04 15:55 EST, Andrew Agno CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Agno CLA 2003-04-04 11:58:32 EST
Log will be attached in next comment.

Got the error by creating a new Ant target, and hitting the "Run" button on the
Ant target dialog (Run->External Tools->External Tools... then Ant Build, New
button, select Location and Target, hit "Run").  This would have normally
brought up the Debug view.

Using Linux GTK 2.1 with Sun's 1.4.1_02 SDK.

Andrew.
Comment 1 Andrew Agno CLA 2003-04-04 11:59:46 EST
Created attachment 4460 [details]
Portion of log file from today.

Here's the stack trace.
Comment 2 Andrew Irvine CLA 2003-04-04 15:00:44 EST
Please attach the output from (Help->About->Configuration Details).
Please provide the build number in all bug reports (Help-About).
Comment 3 Andrew Irvine CLA 2003-04-04 15:12:52 EST
There is an attempt to initiate a second drag and drop operation, causing the 
reported log.  A previously generated log is of interest.  Thus the request for 
the configuration details that contains a copy of all logs in the .log file.
Comment 4 Andrew Agno CLA 2003-04-04 15:54:12 EST
Version: 2.1.0
Build id: 200303272130

Full log and config details in next messages.
Comment 5 Andrew Agno CLA 2003-04-04 15:55:21 EST
Created attachment 4467 [details]
Configuration details
Comment 6 Veronika Irvine CLA 2003-04-07 10:36:30 EDT
You can not create multiple drop targets for the same control.  Doing so will 
result in the SWT error seen here.

Andrew seems to have a basic Eclipse install without any additional plugins so 
that would imply that the JavaOutlinePage tries to create a second DropTarget 
for the same control.

I was unable to reproduce the problem on my GTK machine.

Andrew, does the problem happen every time for you with the steps you have 
indicated?
Comment 7 Andrew Agno CLA 2003-04-07 11:12:39 EDT
I haven't been able to reproduce this bug.  When I got the bug, it was the
first time I had created an Ant build for the workspace (I think).  The
workspace itself was fairly new, having been created for the released 2.1 build.
 I'm also fairly certain that it was the first time the debug view had come up.

I also don't know why it's referencing drag and drop, since, as far as I
remember, I wasn't doing any dragging of anything.

Andrew.
Comment 8 Andrew Irvine CLA 2003-04-08 11:25:22 EDT
Eclipse R2.1 (20030327)
RH 8.0, GTK 2.0.6

I created a new workspace, imported the preferences as per the configuration 
details.  I then populated the workspace via file->import->external plug-ins 
and fragments.  I imported as source and chose the plug-in org.eclipse.ui.  I 
then used the'Add Required Plug-ins' button to import 20 plug-ins.  I changed 
to the Java Browsing perspective.  Opened three files (SWT, EditorList and 
EditorWorkbook).  I then created an ant build file from the plugin.xml of 
org.eclipse.ui.workbench.  Finally I selected Run->External Tools->External 
Tools ...->Ant Build and then New.  I set the Location to 
org.eclipse.ui.workbench and the Base Directory to org.eclipse.ui.workbench

When I run in this configuration the debug perspective is openned and the 
workbench.jar file is created.  In this scenario the debug perspective was 
openned for the first time.  Subsequent runs with the debug perspective either 
the current perspective, closed or open but not current also were successfull.

Transfering to JDT so they can investigate if JavaOutlinePage attempts to 
create a second DropTarget on a control.
Comment 9 Dirk Baeumer CLA 2003-04-08 11:59:02 EDT
The method initDragAndDrop is only called from 'public void createControl
(Composite parent)' which is a framework method and is called from the 
platform. So if initDragAndDrop is called more than once this can only happen 
if createControl is called more than once.

Asking Platfrom if there are scenarios that can cause this.
Comment 10 Knut Radloff CLA 2003-04-10 09:51:37 EDT
JavaOutlinePage.createControl creates a new Tree widget for the 
JavaOutlineViewer. That tree is used to add drop support to the viewer. So even 
if createControl was called more than once it would just create another tree 
widget to install drop support on. Do you agree, Dirk?
Comment 11 Knut Radloff CLA 2003-04-10 09:52:13 EDT
Dirk, please see my comment #10.
Comment 12 Dirk Baeumer CLA 2003-04-10 10:14:02 EDT
Yup, this is correct and means that the assumption that we try to init drap 
and drop more than once can never happen.
Comment 13 Knut Radloff CLA 2003-04-10 13:35:05 EDT
Veronika, I checked the code in JavaOutlinePage.createControl between "new 
Tree" and where the drop target is created on the tree widget. I don't see any 
place where a drop target would have already been created in between those two.
Since this is not reproducable there's not much we can do.
Comment 14 Knut Radloff CLA 2003-05-27 10:19:01 EDT
Closing. Please reopen if drag and drop exception occurs again.