Scenario I:
With new Plugin out-of-process model , mulitple applets inside the htmls fasils to load by throwing following exception. Exception is getting thrown even -Xmx512m is specified as Runtime Parameters.
Load the following applet inside the browser
http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_JDK7_int_ws/deployment/src/plugin/manual/html/JvmGifVulPoc.html
If following exception is getting thrown while loading the applets then bug is reproduced:
Exception in thread "AWT-EventQueue-4" java.lang.OutOfMemoryError: Java heap space
at JvmGifVulPoc.paint(JvmGifVulPoc.java:285)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:265)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:315)
at java.awt.Component.dispatchEventImpl(Component.java:4496)
at java.awt.Container.dispatchEventImpl(Container.java:2132)
at java.awt.Component.dispatchEvent(Component.java:4250)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
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)
Plugin2: java.lang.OutOfMemoryError thrown while loading multiple applets with/without -Xmx param
Exception in thread "AWT-EventQueue-2" java.lang.OutOfMemoryError: Java heap space
at JvmGifVulPoc.paint(JvmGifVulPoc.java:285)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:265)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:315)
at java.awt.Component.dispatchEventImpl(Component.java:4496)
at java.awt.Container.dispatchEventImpl(Container.java:2132)
at java.awt.Component.dispatchEvent(Component.java:4250)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
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)
Exception in thread "AWT-EventQueue-3" java.lang.OutOfMemoryError: Java heap space
at JvmGifVulPoc.paint(JvmGifVulPoc.java:285)
at sun.awt.RepaintArea.paintComponent(RepaintArea.java:265)
at sun.awt.RepaintArea.paint(RepaintArea.java:241)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:315)
at java.awt.Component.dispatchEventImpl(Component.java:4496)
at java.awt.Container.dispatchEventImpl(Container.java:2132)
at java.awt.Component.dispatchEvent(Component.java:4250)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:276)
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)
Scenario II:
Trey loading the following applet inside the browser
http://sqeweb.sfbay.sun.com/deployment2/jitu/deployment_JDK7_int_ws/deployment/src/plugin/manual/html/MemoryTest.html
If on refreshing the page following exception is getting thrown then bug is reproduced:
Exception in thread "thread applet-MemoryTest.class-6" java.lang.OutOfMemoryError: Java heap space
at MemoryTest.init(MemoryTest.java:65)
at sun.plugin2.applet.Applet2Manager$AppletExecutionRunnable.run(Applet2Manager.java:767)
at java.lang.Thread.run(Thread.java:644)
Note: In this particular test we are defining a byte array, if we set array to null inside the destroy method then no exception is getting thrown.