United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4333906 DnD object dropped is not the object removed
JDK-4333906 : DnD object dropped is not the object removed

Details
Type:
Bug
Submit Date:
2000-04-27
Status:
Resolved
Updated Date:
2003-04-12
Project Name:
JDK
Resolved Date:
2002-09-06
Component:
client-libs
OS:
windows_nt,generic
Sub-Component:
java.awt
CPU:
x86,sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.2.2,1.4.1
Fixed Versions:
1.4.2 (mantis)

Related Reports
Duplicate:
Relates:

Sub Tasks

Description

Name: skT45625			Date: 04/27/2000


Java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)

While implementing DnD between two DnDLists (as in the tutorial example found
http://web2.java.sun.com/docs/books/tutorial/dnd/sheetal.html).  I noticed that
I was somehow creating duplicate objects.  After further investigation I found
that if you click on an object in one list, (speed is the key here) immediately
drag it over the other list (while moving in a diagonal direction), and release
the mouse button, sometimes the object dropped is the one selected in the first
list, but the object removed from the first list is not.  This creates a
duplicate of the selected object in the second list.  An object is removed from
the first list, but it is not the one selected.

I thought this was something particular about my application of the DnD
technology, but found that it also happens in the tutorial example mentioned
above.  This may be a timing problem that is only noticed on slower CPUs.  I'm
using a 233 Mhz Pentium II and had the problem.

Can anyone else reproduce this error and if so, is there a work around?

This is the second time I have submitted this bug.  I didn't get a reply the
first time.

Thank you,
SRGlasgow
(Review ID: 104199) 
======================================================================

                                    

Comments
EVALUATION

Difficult to reproduce, but definitely possible, with merlin build 25. Must
be a race condition.
david.mendenhall@eng 2000-08-03

Name: dsR10078			Date: 07/30/2002


The cause of the bug is the same as 4613903: if the mouse is dragged
at a high speed the java event queue accumulates several mouse dragged
events. Some of these events triggers the drag gesture recognizer and
the drag operation starts. Remaning mouse dragged events are
dispatched to JList and change its selection. So the list selection is
different when the drag starts and when the drag finishes. This causes
the inconsistent behavior documented in the description.
The suggested fix for 4613903 resolves this problem: all mouse events
that are on the java event queue when the drag starts are discarded.

###@###.### 2002-07-30
======================================================================
                                     
2002-07-30
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis
mantis-b02

FIXED IN:
mantis
mantis-b02

INTEGRATED IN:
mantis
mantis-b02


                                     
2004-06-14



Hardware and Software, Engineered to Work Together