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

Container.setComponentZOrder throws NPE

XMLWordPrintable

    • 7
    • b55
    • x86
    • linux
    • Verified

      Any test with call to setComponentZOrder throws NPE, the stack is

      java.lang.NullPointerException
              at sun.awt.X11.XWindow.initGraphicsConfiguration(XWindow.java:169)
              at sun.awt.X11.XComponentPeer.updateGraphicsData(XComponentPeer.java:1566)
              at java.awt.Component.setGraphicsConfiguration(Component.java:1035)
              at java.awt.Container.removeDelicately(Container.java:509)
              at java.awt.Container.setComponentZOrder(Container.java:711)
              at Test$4.mousePressed(Test.java:593)
              at java.awt.Component.processMouseEvent(Component.java:6247)
              at java.awt.Component.processEvent(Component.java:6015)
              at java.awt.Button.processEvent(Button.java:380)
              at java.awt.Component.dispatchEventImpl(Component.java:4610)
              at java.awt.Component.dispatchEvent(Component.java:4436)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)

      Introduced by the changes in Container.removeDelicately() for 6804747.

                    comp.parent = null;
      + comp.setGraphicsConfiguration(null);
                    component.remove(index);
      The regression test java/awt/Container/ZOrder can be used to reproduce the failure.

            anthony Anthony Petrov (Inactive)
            dcherepanov Dmitry Cherepanov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: