-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2, 5.0
-
b35
-
x86, sparc
-
linux, linux_redhat_9.0, linux_suse_sles_8.2, solaris_2.6, solaris_8
-
Verified
Tested_Java_Location : /net/koori.sfbay/p/jdk01/jdk/1.4.2/beta/b16/binaries/linux-i586
Tested_Machine_Name : sqe-jpi-05/dnm-dtf-016
Tested O/S : redhat 7.3/redhat 8.0
Problem Description:
Combination of methods keyPress(KeyCode) and keyRelease(KeyCode) in java.awt.Robot are not working as desired on Redhat linux8.0. Somehow it's generating multiple key events against the single keystroke(key is pressed and released once). Same piece of code works fine on linux7.3 and all other windows and solaris platforms
Steps to Reproduce :
--------------------
a)Single key
1) Try to run the attached Robot1.java file. In this file key "t" is tried to press and release just only once using robot.
2) if you see the the text on the TextField as "tt" instead of "t" then the bug is reproduced
b)key combinations
1) Try to run the attached Robot.java file. In this file cliboard is being set with text "*Testing Robot*" and the same text is tried to get pasted on the textfield using CNTRL-V key combination.
2) If Instead of "*Testing Robot*" you happened to see "*Testing Robot**Testing Robot**TestingRobot**TestingRobot*..............*TestingRobot**TestingRobot*vvvvvvvvvvvvvvv" then the bug is reproduced
The bug is also getting reflected to the Prorobot. File using Prorobot(ProrobotTest.java) instead of Robot has been attached with the bug report.
--------------------------------------------------------------------------------
One of the workaround suggested i.e Increase the key repeat delay on the RedHat 8.0 machine works fine. One has to set the delay to maximum.
But the reducing the robot delay within the code is not changing the behavior at all. We are specifying delays at two places (RobotTest1.java and RobotTest.java), one before the keyPress and one between the keyPress and keyRelease. Below are the code snipets
RobotTest1.java
Delay1 robot.setAutoDelay(500);
robot.keyPress(java.awt.event.KeyEvent.VK_T);
Delay2 robot.setAutoDelay(500);
robot.keyRelease(java.awt.event.KeyEvent.VK_T);
RobotTest.java
sClip.setContents(content,content);
Delay1 robot.setAutoDelay(1000);
robot.keyPress(java.awt.event.KeyEvent.VK_CONTROL);
robot.keyPress(java.awt.event.KeyEvent.VK_V);
Delay2 robot.setAutoDelay(500);
robot.keyRelease(java.awt.event.KeyEvent.VK_CONTROL);
robot.keyRelease(java.awt.event.KeyEvent.VK_V);
Following behavior has been noticed while evaluating the bug:
1) If the Delay1 is there the Delay2 becomes irrelevant i.e. one can still notice the repetion of keys even the Delay2 is completely removed.
2) If the Delay1 is removed then it's work fine even without touching the Delay2 at all.
It's quite interesting that what Delay1 has to do with keyPress and KeyRelease combination which is called before these two events has been called. Also we can't get rid of Delay1 ,as in our test cases we have to make sure that the Cliboard has been set with the desired contents so that the same contents can later be pasted to desired location to proceed with testing.
###@###.### 2003-03-03
========================================================================================================================
###@###.### 2003-10-28
JDK: mantis, tiger
Platforms: RH8, RH9, Mercury, SuSE8.2, SLES
Window Manager: Metacity
Failed testcases: 31 testcases:
4812771 (dup of 4817479, this bug.)
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/DisableTraversalKeyTest/DisableTraversalKeyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/DisableTraversalKeyTest/DisableTraversalKeyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/DisableTraversalKeyTest/DisableTraversalKeyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/DisableTraversalKeyTest/DisableTraversalKeyTest.html
4814272 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/ForwardReversetraversalTest/ForwardReverseTraversalTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/ForwardReverseTraversalTest/ForwardReverseTraversalTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/ForwardReverseTraversalTest/ForwardReverseTraversalTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/ForwardReverseTraversalTest/ForwardReverseTraversalTest.html
4814244 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/TemporaryFocusEventTest/TemporaryFocusEventTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/TemporaryFocusEventTest/TemporaryFocusEventTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/TemporaryFocusEventTest/TemporaryFocusEventTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/TemporaryFocusEventTest/TemporaryFocusEventTest.html
4814233 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/SetTraversalPolicyTest/SetTraversalPolicyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/SetTraversalPolicyTest/SetTraversalPolicyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/SetTraversalPolicyTest/SetTraversalPolicyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/SetTraversalPolicyTest/SetTraversalPolicyTest.html
4814222 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/OppositeComponentTest/OppositeComponentTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/OppositeComponentTest/OppositeComponentTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/OppositeComponentTest/OppositeComponentTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/OppositeComponentTest/OppositeComponentTest.html
4812845 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/KeyboardFocusManagerEventTest/KeyboardFocusManagerEventTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/KeyboardFocusManagerEventTest/KeyboardFocusManagerEventTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/KeyboardFocusManagerEventTest/KeyboardFocusManagerEventTest.html
4812831 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/FocusTraversalTest/FocusTraversalTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/FocusTraversalTest/FocusTraversalTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/FocusTraversalTest/FocusTraversalTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/FocusTraversalTest/FocusTraversalTest.html
4812816 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/AWT/FocusCycleTest/FocusCycleTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Swing/FocusCycleTest/FocusCycleTest.html
4812809 (dup of 4812771)
AWT_Merlin_WS/MerlinFocus/src/Automated/Lw/DefaultTraversalKeyTest/DefaultTraversalKeyTest.html
AWT_Merlin_WS/MerlinFocus/src/Automated/Mw/DefaultTraversalKeyTest/DefaultTraversalKeyTest.html
- duplicates
-
JDK-4978154 JCK AWT key event test fails: RedHat Linux 8/9, Gnome Desktop, NS 7.1 jvm plugin
- Closed
- relates to
-
JDK-5106147 Robot is generating multiple key events against single keystroke on Redhat Linux
- Closed
-
JDK-4153069 keyReleased behaviour incorrect
- Open
-
JDK-5030154 RAS : Tiger reliability testsuite(SwingBasher) hangs in LinuxAS
- Resolved
-
JDK-7021700 Solaris11 x64/x86, java.awt.Robot generates duplicated key events.
- Closed
-
JDK-6763068 Robot is generating multiple key events against single keystroke on Redhat Linux
- Closed
-
JDK-4966881 RFE: Need API to get mouse and keyboard's Desktop specific properties
- Open