AWT application which adds lot of awt components to a panel,
which inturn is added to a Frame, throws an exception when
the number of components increases.
For simulating the problem, see the comments part.
1.4.2_04,1.4.2_05 gives the following exception :
Exception in thread "main" java.lang.NullPointerException: disposed component
at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
at sun.awt.windows.Win32SurfaceData.<init>(Unknown Source)
at sun.awt.windows.Win32SurfaceData.createData(Unknown Source)
at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
at sun.awt.windows.WLabelPeer.<init>(Unknown Source)
at sun.awt.windows.WToolkit.createLabel(Unknown Source)
at java.awt.Label.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Panel.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Panel.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at java.awt.Window.addNotify(Unknown Source)
at java.awt.Frame.addNotify(Unknown Source)
at java.awt.Window.pack(Unknown Source)
at Grid.main(Grid.java:27)
1.5.2-beta2 :
the application hangs with the following stack trace:
----------------Stack Trace Begins here ---------------------------------------
Full thread dump Java HotSpot(TM) Client VM (1.5.0-beta2-b51 mixed mode, sharing
):
"AWT-EventQueue-0" prio=7 tid=0x009fd5e0 nid=0x7b8 waiting for monitor entry [0x
0398f000..0x0398fbe4]
at sun.awt.windows.WComponentPeer.replaceSurfaceData(Unknown Source)
- waiting to lock <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(Unknown Source)
at sun.awt.windows.WComponentPeer$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
"AWT-Shutdown" prio=7 tid=0x009f9e20 nid=0xcc in Object.wait() [0x0388f000..0x03
88fc64]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Unknown Source)
at sun.awt.AWTAutoShutdown.run(Unknown Source)
- locked <0x22facef8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)
"AWT-Windows" daemon prio=7 tid=0x009fa1e8 nid=0x7bc runnable [0x0376f000..0x037
6fce4]
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"Java2D Disposer" daemon prio=10 tid=0x009f8d38 nid=0x678 in Object.wait() [0x03
56f000..0x0356f9e4]
at java.lang.Object.wait(Native Method)
- waiting on <0x22facf80> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x22facf80> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at sun.java2d.Disposer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"Low Memory Detector" daemon prio=5 tid=0x0099bd38 nid=0x330 runnable [0x0000000
0..0x00000000]
"CompilerThread0" daemon prio=10 tid=0x0099a850 nid=0x714 waiting on condition [
0x00000000..0x0303f8bc]
"Signal Dispatcher" daemon prio=10 tid=0x00999b10 nid=0x128 waiting on condition
[0x00000000..0x00000000]
"Finalizer" daemon prio=9 tid=0x0023eea8 nid=0x600 in Object.wait() [0x02e3f000.
.0x02e3fc64]
at java.lang.Object.wait(Native Method)
- waiting on <0x22fad128> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x22fad128> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
"Reference Handler" daemon prio=10 tid=0x009979a0 nid=0x44c in Object.wait() [0x
02d3f000..0x02d3fce4]
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Unknown Source)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x22fad1a8> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=0x00236030 nid=0x63c runnable [0x0006f000..0x0006fc3c]
at sun.awt.windows.WPanelPeer.pRestack(Native Method)
at sun.awt.windows.WPanelPeer.restack(Unknown Source)
at java.awt.Component.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Panel.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Panel.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Container.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Frame.addNotify(Unknown Source)
- locked <0x22fb1a48> (a java.awt.Component$AWTTreeLock)
at java.awt.Window.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at Grid.main(Grid.java:24)
"VM Thread" prio=10 tid=0x00976100 nid=0x628 runnable
"VM Periodic Task Thread" prio=10 tid=0x0099d2c0 nid=0x6f0 waiting on condition
--------------------------Stack Trace Ends------------------------------------
Justification: Customer has migrated their product to use Sun JVM from Microsoft JVM.
With their new release, end users of the customer are unable to see the application. This accounts to a total failure of a feature they used to support with Microsoft JVM.