JDK-4882934 : Reg test Clipboard/FlavorChangeNotificationTest/SystemClipboardTest failure
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2003-06-24
  • Updated: 2003-07-25
  • Resolved: 2003-07-25
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
5.0 tigerFixed
Related Reports
Relates :  
Description

Name: agR10216			Date: 06/24/2003



#Test Results (version 2)
#Tue Jun 24 12:23:19 MSD 2003
#checksum:164c4d0f89557bd0
#-----testdescription-----
$file=/net/titan/export1/gas/tiger/test/java/awt/Clipboard/FlavorChangeNotificationTest/SystemClipboardTest/SystemClipboardTest.html
$root=/net/titan/export1/gas/tiger
author=###@###.### area=Clipboard
keywords=bug4259272
run=USER_SPECIFIED applet SystemClipboardTest.html\n
source=SystemClipboardTest.html
title=tests that notifications on changes to the set of DataFlavors            available on the system clipboard are delivered properly

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

#-----testresult-----
description=file:///net/titan/export1/gas/tiger/test/java/awt/Clipboard/FlavorChangeNotificationTest/SystemClipboardTest/SystemClipboardTest.html
end=Tue Jun 24 12:23:19 MSD 2003
environment=regtest
execStatus=Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: notifications about flavor changes delivered incorrectly!
javatestOS=SunOS 5.8 (sparc)
javatestVersion=2.1.6
script=com.sun.javatest.regtest.RegressionScript
sections=script_messages build applet
start=Tue Jun 24 12:23:08 MSD 2003
status=Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: notifications about flavor changes delivered incorrectly!
test=test/java/awt/Clipboard/FlavorChangeNotificationTest/SystemClipboardTest/SystemClipboardTest.html
work=/home/gas/bugs/test/ss/JTwork/test/java/awt/Clipboard/FlavorChangeNotificationTest/SystemClipboardTest

#section:script_messages
----------messages:(4/220)----------
JDK under test: (/set/jdk-builds/JDK1.5.0b09/solaris-sparc)
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b09)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b09, mixed mode)

#section:build
----------messages:(3/106)----------
command: build SystemClipboardTest
reason: Named class compiled on demand
elapsed time (seconds): 0.0020
result: Passed. No need to compile: SystemClipboardTest.java

#section:applet
----------messages:(3/140)----------
command: applet SystemClipboardTest.html
reason: User specified action: run applet SystemClipboardTest.html
elapsed time (seconds): 10.352
----------System.out:(0/0)----------
----------System.err:(19/1460)----------
Warning: Cannot convert string "<Key>Escape,_Key_Cancel" to type VirtualBinding
Warning: Cannot convert string "<Key>Home,_Key_Begin" to type VirtualBinding
Warning: Cannot convert string "<Key>F1,_Key_Help" to type VirtualBinding
Warning: Cannot convert string "Shift<Key>F10,_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>F10,Shift_Key_Menu" to type VirtualBinding
Warning: Cannot convert string "<Key>KP_Enter,_Key_Execute" to type VirtualBinding
Warning: Cannot convert string "Alt<Key>Return,Alt_Key_KP_Enter" to type VirtualBinding
listener's notified1=true notified2=false count=1 flavorChanged() called 1 time
listener's notified1=true notified2=false count=1 flavorChanged() called 1 time
listener's notified1=true notified2=true count=2 flavorChanged() called 2 time
listener's notified1=true notified2=true count=2 flavorChanged() called 2 time
listener's notified1=true notified2=true count=3 flavorChanged() called 3 time
listener1: notified1=true notified2=true count=2
listener2: notified1=true notified2=true count=3
java.lang.RuntimeException: notifications about flavor changes delivered incorrectly!
        at SystemClipboardTest.start(SystemClipboardTest.java:154)
        at com.sun.javatest.regtest.AppletWrapper$AppletThread.run(AppletWrapper.java:145)
        at java.lang.Thread.run(Thread.java:534)
STATUS:Failed.Applet thread threw exception: java.lang.RuntimeException: notifications about flavor changes delivered incorrectly!
result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: notifications about flavor changes delivered incorrectly!


test result: Failed. Execution failed: Applet thread threw exception: java.lang.RuntimeException: notifications about flavor changes delivered incorrectly!

###@###.### 2003-06-24
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b13
24-08-2004

WORK AROUND Name: agR10216 Date: 06/24/2003 ======================================================================
24-08-2004

SUGGESTED FIX Name: agR10216 Date: 06/26/2003 Synchronize access to the field SunClipboard.currentDataFlavors. ###@###.### 2003-06-26 ====================================================================== Name: agR10216 Date: 07/09/2003 When SunClipboard.checkChange(long[] formats) is called on the toolkit thread on the timeout the passed 'formats' may appear outdated if setContents() is called (on another thread) nearly at that time. So superfluous notification may be sent even if we are synchronizing access to the field SunClipboard.currentDataFlavors. The more reliable fix is to send notifications only from X11Selection.getSelectionOwnership() holding awtLock, which is called in SunClipboard.setContents(), while the JVM is the selection owner. ###@###.### 2003-07-09 ======================================================================
09-07-2003

EVALUATION Name: agR10216 Date: 06/26/2003 The test failed because some superfluous notifications about change of data flavors available on the system clipboard were sent. On X platforms when tracking changes of data flavors available on the system clipboard (selection), we call SunClipboard.checkChange(long[] formats) on the toolkit thread at regular intervals and from setContents() on the thread on which setContents() is called. checkChange() sends notifications (PeerEvents) to proper EDTs if available data flavors have been changed. The field SunClipboard.currentDataFlavors, used to store currently available data flavors, is accessed in checkChange(). Access to the field SunClipboard.currentDataFlavors is unsynchronized, and so superfluous notifications may be sent. ###@###.### 2003-06-26 ======================================================================
26-06-2003