JDK-4531145 : Robot's child process is not being initialized correctly
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: linux
  • CPU: x86
  • Submitted: 2001-11-26
  • Updated: 2006-02-01
  • Resolved: 2006-02-01
Related Reports
Relates :  
Description
Name: dmR10075			Date: 11/26/2001

###@###.###

On Solaris/Linux robot has separate child process which performs all 
robot actions (like mouse moves etc.) When this process is got killed by 
some reason we need to restart it automatically to provide robot 
functionality in applications. However when robot is restarted it is not 
being initialized correctly and unable to work. On some platforms (like 
Madrake 7.0/8.0) "killing" of robot happens very often so on that platforms 
robot doesn't work very often.

Steps to reproduce:
1. Open terminal window to full-screen
2. Run the test shown below with 'java_g Test&'
3. The test will provide some output, you should see one initilization section 
  starting with 'CHILD: process started'
4. Every 3 second you will see action section (like mouse press).
4. Run 'ps' to see the PID of awt_robot
5. Run 'kill -9 <robot_pid>
6. Now every 3 seconds you will see initialization section 'CHILD: process 
  started' which means that every time we try to access robot AWT tries to start 
  new robot process and never succeeds.

The automatic reproduction requires some large test case, if you need it 
contact me for details.

The system configuration to reproduce:
Linux

Reproducible from release/build:
No information

======================================================================

Comments
EVALUATION In the fix for 6287244 child robot process has been eliminated, so this issue is not applicable anymore.
01-02-2006

WORK AROUND Name: dmR10075 Date: 11/26/2001 None Test case: import java.awt.Robot; import java.awt.event.InputEvent; public class Test { static Robot robot = null; public static void main(String[] args) { try { robot = new Robot(); } catch (Exception e) { System.err.println(e.getMessage()); System.exit(1); } robot.mouseMove(300, 300); while (true) { robot.mousePress(InputEvent.BUTTON1_MASK); robot.mouseRelease(InputEvent.BUTTON1_MASK); robot.delay(3000); } } } ======================================================================
17-09-2004

EVALUATION Once I found a build w/ a debug version of the robot child executable, I found it's easy to cause problems on Solaris and Linux by killing the awt_robot_g process. On Linux, you can see attempts to restart the robot child, but I didn't see this on Solaris, which is a bit strange. It would be nice for all Unix platforms to have execution of the robot child process made a bit more robust. ###@###.### 2002-08-20
20-08-2002