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

PIT: Changing the z-order of the component at run time throws exception

XMLWordPrintable

    • x86
    • windows_xp

      setComponentZOrderTest_11 is an automated test which changes the z-order of the component at run time. When i execute the testcase, it throws the following exception

      [button1,81,35,59x23,label=Button 2]
              at java.awt.EventQueue.invokeAndWait(EventQueue.java:997)
              at setComponentZOrderTest_11.changeComponentZOrder(setComponentZOrderTes
      t_11.java:219)
              at setComponentZOrderTest_11.doTest(setComponentZOrderTest_11.java:141)
              at setComponentZOrderTest_11.main(setComponentZOrderTest_11.java:281)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: No such child: -1
              at java.awt.Container.getComponent(Container.java:289)
              at java.awt.Component.mixOnZOrderChanging(Component.java:9746)
              at java.awt.Container.setComponentZOrder(Container.java:702)
              at setComponentZOrderTest_11$4.run(setComponentZOrderTest_11.java:221)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
      ad.java:269)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
      java:184)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
      ad.java:174)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      FocusLost: java.awt.FocusEvent[FOCUS_LOST,temporary,opposite=null,cause=ACTIVATI
      ON] on java.awt.Button[button1,81,35,59x23,label=Button 2]


      I tested the same testcase in 6u10b31 , its works fine. but in 6u10b33 , the testcase hands & i need to kill the java process. Where as in 6u12 pit b01 build, the testcase throws the exception. I tested the same in jdk7 b38 & it works fine. Hence its a regrssion from 6u10 to 6u12.

      Step to reproduce :-
      -------------------
      1) Run the attached automated testcase
      java -DresultsDir=. setComponentZOrderTest_11
      If you see the exception then the bug is reproduced.

      The exception can be seen on all the platform. ( Solaris 10 , linux & windows xp)

            anthony Anthony Petrov (Inactive)
            lpremkumsunw Lawrence Premkumar1 (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: