JDK-6928788 : Display change event causes OutOfMemoryError at java.awt.image.DataBufferInt.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u16
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2010-02-23
  • Updated: 2010-07-29
  • Resolved: 2010-06-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7Resolved
Related Reports
Relates :  
Description
OS: Windows XP SP2 Japanese + IE6
JRE: 1.5.0_16 (See comments)

If display change event continually happens when applet is running on IE, java heap will 
be consumed gradually. And finally OutOfMemoryError appears.
This issue would be reproduced by changing screen color within "Display Properties" 
of Windows.

Here's trace log when the issue happen.

Exception in thread "AWT-EventQueue-2" java.lang.OutOfMemoryError: Java heap space
	at java.awt.image.DataBufferInt.<init>(Unknown Source)
	at java.awt.image.Raster.createPackedRaster(Unknown Source)
	at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
	at sun.awt.image.SunVolatileImage.getBackupImage(Unknown Source)
	at sun.awt.image.VolatileSurfaceManager.getBackupSurface(Unknown Source)
	at sun.awt.image.VolatileSurfaceManager.initialize(Unknown Source)
	at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
	at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
	at sun.awt.image.SunVolatileImage.<init>(Unknown Source)
	at sun.awt.Win32GraphicsConfig.createCompatibleVolatileImage(Unknown Source)
	at javax.swing.RepaintManager.getVolatileOffscreenBuffer(Unknown Source)
	at javax.swing.JComponent.paintDoubleBuffered(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at java.awt.GraphicsCallback$PaintCallback.run(Unknown Source)
	at sun.awt.SunGraphicsCallback.runOneComponent(Unknown Source)
	at sun.awt.SunGraphicsCallback.runComponents(Unknown Source)
	at java.awt.Container.paint(Unknown Source)
	at sun.awt.RepaintArea.paintComponent(Unknown Source)
	at sun.awt.RepaintArea.paint(Unknown Source)
	at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(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)

Comments
EVALUATION may target for a jdk7 fix.
23-06-2010

WORK AROUND set the folling flag : -Dswing.volatileImageBufferEnabled=false
26-02-2010

EVALUATION past bug fixes suggest that swing code may be an issue here.
23-02-2010