-
Bug
-
Resolution: Fixed
-
P3
-
7
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.
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.
- relates to
-
JDK-6804747 Ensure consistent graphicsConfig member across components hierarchy
- Closed