JDK-4333906 : DnD object dropped is not the object removed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.2,1.4.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_nt
  • CPU: x86,sparc
  • Submitted: 2000-04-27
  • Updated: 2003-04-12
  • Resolved: 2002-09-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Duplicate :  
Relates :  
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
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

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