Although the dragging part of the test works, clicking on one of the "Drag ME!" buttons once it has been "dragged" onto the red field throws the following exception on Linux, Win32 and Solaris:
mouse pressed
starting Drag
java.lang.NullPointerException
at sun.awt.datatransfer.DataTransferer.getFormatsForFlavors(DataTransferer.java:485)
at sun.awt.datatransfer.DataTransferer.getFormatsForTransferable(DataTransferer.java:453)
at sun.awt.dnd.SunDragSourceContextPeer.startDrag(SunDragSourceContextPeer.java:93)
at java.awt.dnd.DragSource.startDrag(DragSource.java:297)
at java.awt.dnd.DragSource.startDrag(DragSource.java:394)
at java.awt.dnd.DragGestureEvent.startDrag(DragGestureEvent.java:196)
at DnDSource.dragGestureRecognized(DnDSource.java:43)
at java.awt.dnd.DragGestureRecognizer.fireDragGestureRecognized(DragGestureRecognizer.java:342)
at MyMouseDragGestureRecognizer.mousePressed(MyMouseDragGestureRecognizer.java:32)
at java.awt.Component.processMouseEvent(Component.java:4859)
at java.awt.Component.processEvent(Component.java:4688)
at java.awt.Button.processEvent(Button.java:330)
at java.awt.Component.dispatchEventImpl(Component.java:3460)
at java.awt.Component.dispatchEvent(Component.java:3327)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:437)
at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:140)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:121)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
It is also curious that on win32, clicking on the original "Drag Me!" button will initiate a drag, even though the user is no longer dragging. Another click of the mouse will perform the "drop".
=====
During the 26Feb2001 AWT/DnD integration, Brent reported the following:
Clicking several buttons at once or in rapid succession on the "Drag Me" bar will seg fault pretty easily on Solaris. On win32 this merely hangs. Also in the promotion, so I'm still going to putback the integration. Looks like it may be in the motif library, so perhaps there's not much that can be done.
-Brent
( 99 )bchristi@blackthorne: /home/bchristi/jano/Merlin-integrate/test/java/awt/d
nd/DnDAcceptanceTest % jdkx -r 1.4 sun.applet.AppletViewer DnDAcceptanceTest.htm
l
/usr/local/java/jdk1.4/solsparc/bin/java sun.applet.AppletViewer DnDAcceptanceTe
st.html
mouse pressed
starting Drag
[Source] dragExit
[Source] dragDropEnd
mouse pressed
starting Drag
[Source] dragExit
[Source] dragExit
[Source] dragDropEnd
mouse pressed
starting Drag
[Source] dragExit
[Source] dragDropEnd
mouse pressed
starting Drag
[Source] dragExit
[Source] dragDropEnd
mouse pressed
starting Drag
[Source] dragExit
[Source] dragDropEnd
mouse pressed
starting Drag
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0xffffffff2fbfd164
Function name=_XmAllocReceiverInfo
Library=/usr/dt/lib/sparcv9/libXm.so.4
Current Java thread:
at sun.awt.motif.MToolkit.run(Native Method)
at java.lang.Thread.run(Thread.java:579)
Dynamic libraries:
0x100000000 /usr/local/java/jdk1.4/solsparc/bin/../bin/sparcv9/native_thread
s/java
0xffffffff7f200000 /usr/lib/sparcv9/libthread.so.1
0xffffffff7f400000 /usr/lib/sparcv9/libdl.so.1
0xffffffff7ef00000 /usr/lib/sparcv9/libc.so.1
0xffffffff7ee00000 /usr/platform/SUNW,Ultra-5_10/lib/sparcv9/libc_psr.so.1
0xffffffff7d000000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/server/l
ibjvm.so
0xffffffff7ce00000 /usr/lib/sparcv9/libCrun.so.1
0xffffffff7cc00000 /usr/lib/sparcv9/libsocket.so.1
0xffffffff7ca00000 /usr/lib/sparcv9/libnsl.so.1
0xffffffff7c800000 /usr/lib/sparcv9/libm.so.1
0xffffffff7d900000 /usr/lib/sparcv9/libw.so.1
0xffffffff7c500000 /usr/lib/sparcv9/libmp.so.2
0xffffffff7c300000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/native_t
hreads/libhpi.so
0xffffffff7c000000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/libverif
y.so
0xffffffff7bd00000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/libjava.
so
0xffffffff7bb00000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/libzip.s
o
0xffffffff30500000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/libawt.s
o
0xffffffff30200000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/motif21/
libmawt.so
0xffffffff30000000 /usr/local/java/jdk1.4/solsparc/bin/../jre/lib/sparcv9/l
ibmlib_image.so
0xffffffff2fb00000 /usr/dt/lib/sparcv9/libXm.so.4
0xffffffff2f900000 /usr/openwin/lib/sparcv9/libXt.so.4
0xffffffff2f700000 /usr/openwin/lib/sparcv9/libXext.so.0
0xffffffff2f500000 /usr/openwin/lib/sparcv9/libXtst.so.1
0xffffffff2f300000 /usr/openwin/lib/sparcv9/libX11.so.4
0xffffffff2f000000 /usr/openwin/lib/sparcv9/libSM.so.6
0xffffffff2ee00000 /usr/openwin/lib/sparcv9/libICE.so.6
0xffffffff2e000000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/libfontm
anager.so
0xffffffff2da00000 /usr/lib/sparcv9/liblayout.so
0xffffffff2d800000 /usr/local/java/jdk1.4/solsparc/jre/lib/sparcv9/libnio.s
o
0xffffffff2d500000 /usr/lib/sparcv9/librt.so.1
0xffffffff2d300000 /usr/local/java/jdk1.4/solsparc/bin/../jre/lib/sparcv9/l
ibnet.so
0xffffffff2d100000 /usr/lib/sparcv9/libaio.so.1
0xffffffff2ce00000 /usr/lib/sparcv9/nss_files.so.1
0xffffffff2cb00000 /usr/local/java/jdk1.4/solsparc/bin/../jre/lib/sparcv9/l
ibsunwjdga.so
0xffffffff2c800000 /usr/openwin/lib/sparcv9/libdga.so.1
Local Time = Mon Feb 26 21:20:21 2001
Elapsed Time = 46
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) 64-Bit Server VM (1.4beta-B53 mixed mode)
#
# An error report file has been saved as hs_err_pid21422.log.
# Please refer to the file for further information.
#
/java/jdk/bin/jdkx[12]: 21422 Abort(coredump)
( 100 )bchristi@blackthorne: /home/bchristi/jano/Merlin-integrate/test/java/awt/dnd/DnDAcceptanceTest %