Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4485438

Frame.setLocation(x, y) randomly fails to set location - possible race condition

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.4.0
    • client-libs
    • None
    • sparc
    • solaris_8

      The JCK interactive test framework has had reports of random frames no longer always showing up centered. Attached pls find an example (I stripped out as much of the framework as I dare, sorry, it is still quite large) that exhibits the behaviour. Steps to repro:

      1. compile all the attached files
      2. in jdk1.4 build 72, run java ButtonTests

      Wait. The tests will run on screen correctly, and you should see println's that state what we called to setLocation and what we receive back from getLocation, the test loops on the tests 1000 times, when they do not match (eventuall always happens for me, see run info below) a System.exit() is called, displaying what mismatched.

      run 1 mismatch on iteration 34
      run 2 mismatch on iteration 5
      run 3 mismatch on iteration 27
      run 4 mismatch on iteration 38
      run 5 mismatch on iteration 17

      Specific code information for the setLocation call is in the InteractiveTest.java file, specificly the invokeTestCase method.

            rraysunw Richard Ray (Inactive)
            jdixonsunw John Dixon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: