JDK-6298718 : test/java/awt/Clipboard/ImageTransferTest failed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2005-07-19
  • Updated: 2009-04-08
  • Resolved: 2005-08-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.
JDK 6
6 b47Fixed
Related Reports
Relates :  
Relates :  
Description
#Test Results (version 2)
#Tue Jul 19 18:44:40 MSD 2005
#checksum:37539221090616a6
#-----testdescription-----
$file=/export/ST/master/Mustang.AWT-master/test/java/awt/Clipboard/ImageTransferTest/ImageTransferTest.html
$root=/export/ST/master/Mustang.AWT-master/test/java/awt
author=###@###.### area=Clipboard
keywords=bug4397404 othervm
run=USER_SPECIFIED applet/othervm ImageTransferTest.html\n
source=ImageTransferTest.html
title=tests that images of all supported native image formats            are transfered properly

#-----environment-----

#-----testresult-----
description=file:///export/ST/master/Mustang.AWT-master/test/java/awt/Clipboard/ImageTransferTest/ImageTransferTest.html
end=Tue Jul 19 18:44:40 MSD 2005
environment=regtest
execStatus=Failed. Execution failed: Program `/net/piglet/export2/jdk-builds/JDK6.0/b42/solaris-sparc/bin/java' interrupted! (timed out?)
javatestOS=SunOS 5.8 (sparc)
javatestVersion=2.1.6
script=com.sun.javatest.regtest.RegressionScript
sections=script_messages build compile applet
start=Tue Jul 19 18:42:28 MSD 2005
status=Failed. Execution failed: Program `/net/piglet/export2/jdk-builds/JDK6.0/b42/solaris-sparc/bin/java' interrupted! (timed out?)
test=Clipboard/ImageTransferTest/ImageTransferTest.html
work=/home/gas/bugs/test/ss/JTwork/Clipboard/ImageTransferTest

#section:script_messages
----------messages:(5/266)----------
JDK under test: (/net/piglet/export2/jdk-builds/JDK6.0/b42/solaris-sparc)
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b42)
Java HotSpot(TM) Server VM (build 1.6.0-ea-b42, mixed mode)
Timeout signalled after 120.0 seconds

#section:build
----------messages:(3/104)----------
command: build ImageTransferTest
reason: Named class compiled on demand
elapsed time (seconds): 10.637
result: Passed. Compilation successful

#section:compile
----------messages:(3/201)----------
command: compile /export/ST/master/Mustang.AWT-master/test/java/awt/Clipboard/ImageTransferTest/ImageTransferTest.java
reason: .class file out of date or does not exist
elapsed time (seconds): 10.634
----------System.out:(0/0)----------
----------System.err:(4/393)----------
Note: /export/ST/master/Mustang.AWT-master/test/java/awt/Clipboard/ImageTransferTest/ImageTransferTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /export/ST/master/Mustang.AWT-master/test/java/awt/Clipboard/ImageTransferTest/ImageTransferTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
result: Passed. Compilation successful

#section:applet
----------messages:(3/145)----------
command: applet ImageTransferTest.html
reason: User specified action: run applet/othervm ImageTransferTest.html
elapsed time (seconds): 120.795
----------System.out:(0/0)----------
----------System.err:(19/1120)----------
PRODUCER: lost clipboard ownership
received message: BA
testing native image format image/png...
PRODUCER: lost clipboard ownership
received message: Y
testing native image format image/jpeg...
PRODUCER: lost clipboard ownership
Exception occurred during event dispatching:
java.lang.RuntimeException: DataFlavor.stringFlavor is not suppurted by transferable in TImageProducer.lostOwnership()
        at TImageProducer.lostOwnership(ImageTransferTest.java:421)
        at sun.awt.datatransfer.SunClipboard$2.run(SunClipboard.java:297)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:590)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)
result: Failed. Execution failed: Program `/net/piglet/export2/jdk-builds/JDK6.0/b42/solaris-sparc/bin/java' interrupted! (timed out?)


test result: Failed. Execution failed: Program `/net/piglet/export2/jdk-builds/JDK6.0/b42/solaris-sparc/bin/java' interrupted! (timed out?)

###@###.### 2005-07-19 14:56:30 GMT

Comments
EVALUATION When a request to provide some selection data comes, we verify that the time of the request is strictly greater than the time of acquiring selection ownership. If the condition doesn't hold, no data are provided to the requestor. Sometimes, if the connection with the X server is fast, the times in question are the same. After the above issue is fixed the test fails because of the same issue as 6298711: GIF writer (4339415) was implemented, so the format 'image/gif' became available in datatransfer operations. The test verifies that the initial image and the transferred image are identical, but this isn't true since the implementation of GIF writer is lossy. ###@###.### 2005-07-19 14:56:30 GMT
19-07-2005

SUGGESTED FIX Change the condition 'requestTime > ownershipTime' to 'requestTime >= ownershipTime': *** /tmp/geta21120 Tue Jul 19 18:46:44 2005 --- XSelection.java Tue Jul 19 17:57:37 2005 *************** *** 559,565 **** if (ownershipTime != 0 && (requestTime == XlibWrapper.CurrentTime || ! requestTime > ownershipTime)) { property = xsre.get_property(); --- 559,565 ---- if (ownershipTime != 0 && (requestTime == XlibWrapper.CurrentTime || ! requestTime >= ownershipTime)) { property = xsre.get_property(); Also for GIF images skip the verification that the initial image and the transferred image are identical. *** /tmp/geta21062 Tue Jul 19 18:39:36 2005 --- ImageTransferTest.java Tue Jul 19 14:02:45 2005 *************** *** 360,367 **** boolean areImagesIdentical(Image im1, Image im2) { ! if (formats[fi].equals("JFIF") || formats[fi].equals("image/jpeg")) { ! // JFIF is lossy format return true; } int[] ib1 = getImageData(im1); --- 360,368 ---- boolean areImagesIdentical(Image im1, Image im2) { ! if (formats[fi].equals("JFIF") || formats[fi].equals("image/jpeg") || ! formats[fi].equals("GIF") || formats[fi].equals("image/gif")) { ! // JFIF and GIF are lossy formats return true; } int[] ib1 = getImageData(im1); ###@###.### 2005-07-19 14:56:30 GMT
19-07-2005