JDK-6307564 : Unxpected NPE at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3933)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: generic
  • Submitted: 2005-08-08
  • Updated: 2011-01-19
  • Resolved: 2005-08-11
Related Reports
Duplicate :  
Description
Unexpected NPE during the test.
How to reproduce:
1) Run the test from Comments (I belive the test may be easily reduced) on Windows2000 with JDK6.0b45 (or b40). You would see a frame with JTable in it.
2) Press left mouse button on the bottom of the frame and drag mouse up on the screen till the frame become a title.  You should do it fast enough may be for several times.
3) You may also see an Exception if drag top border of the frame.
The exception is:
Exception occurred during event dispatching:

java.lang.NullPointerException
	at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3933)
	at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4025)
	at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:243)
	at javax.swing.RepaintManager.show(RepaintManager.java:1109)
	at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
	at sun.awt.windows.WComponentPeer.postPaintIfNecessary(WComponentPeer.java:641)
	at sun.awt.windows.WComponentPeer.handleExpose(WComponentPeer.java:625)
	at sun.awt.windows.WToolkit.eventLoop(Native Method)
	at sun.awt.windows.WToolkit.run(WToolkit.java:277)
	at java.lang.Thread.run(Thread.java:608)

Seems this exception doesn't occur with pure AWT testcase.

Comments
EVALUATION Seems to be a result of exception thrown before. See 6307563 for more info. Full dump is: Exception occurred during event dispatching: java.lang.IllegalArgumentException: Width (688) and height (0) cannot be <= 0 at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:999) at sun.awt.image.SunVolatileImage.getBackupImage(SunVolatileImage.java:214) at sun.awt.image.VolatileSurfaceManager.getBackupSurface(VolatileSurfaceManager.java:241) at sun.awt.image.VolatileSurfaceManager.initialize(VolatileSurfaceManager.java:103) at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:66) at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:75) at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:86) at sun.awt.image.SunVolatileImage.<init>(SunVolatileImage.java:80) at sun.awt.windows.WComponentPeer.createVolatileImage(WComponentPeer.java:536) at java.awt.Component.createVolatileImage(Component.java:3182) at java.awt.Component$BltBufferStrategy.createBackBuffers(Component.java:3819) at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3926) at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3911) at java.awt.Component$BltBufferStrategy.getDrawGraphics(Component.java:3835) at javax.swing.BufferStrategyPaintManager.prepare(BufferStrategyPaintManager.java:463) at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:265) at javax.swing.RepaintManager.paint(RepaintManager.java:1052) at javax.swing.JComponent.paint(JComponent.java:994) at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21) at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60) at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97) at java.awt.Container.paint(Container.java:1703) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:689) at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:635) at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:615) at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:590) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158) at java.awt.EventDispatchThread.run(EventDispatchThread.java:119) java.lang.NullPointerException at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3933) at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4025) at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:243) at javax.swing.RepaintManager.show(RepaintManager.java:1109) at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43) at sun.awt.windows.WComponentPeer.postPaintIfNecessary(WComponentPeer.java:641) at sun.awt.windows.WComponentPeer.handleExpose(WComponentPeer.java:625) at sun.awt.windows.WToolkit.eventLoop(Native Method) at sun.awt.windows.WToolkit.run(WToolkit.java:277) at java.lang.Thread.run(Thread.java:608)
11-08-2005