United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7121482 some sun/java2d and sun/awt tests failed with InvalidPipeException
7121482 : some sun/java2d and sun/awt tests failed with InvalidPipeException

Details
Type:
Bug
Submit Date:
2011-12-14
Status:
Closed
Updated Date:
2012-08-24
Project Name:
JDK
Resolved Date:
2012-01-17
Component:
client-libs
OS:
solaris_10,windows_7
Sub-Component:
2d
CPU:
x86,sparc
Priority:
P1
Resolution:
Fixed
Affected Versions:
6u31,7u3
Fixed Versions:
7u3

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
some tests failed since 1.7.0_03b02 only on stt-27.ru.oracle.com (windows 7 x64), passed on other machines include same win 7 x64 (stt-70-vbx2.ru), win xp, solaris, linux

tests passed or failed with other exceptions (related to other CRs) with jdk 1.7.0_03b01, 1.7.0_02b12 and 1.6.0_31b01

log:
sun.java2d.InvalidPipeException: attempt to validate Pipe with invalid SurfaceData
	at sun.java2d.SunGraphics2D.validatePipe(SunGraphics2D.java:381)
	at sun.java2d.SunGraphics2D.clearRect(SunGraphics2D.java:2372)
	at sun.awt.RepaintArea.paint(RepaintArea.java:235)
	at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347)
	at java.awt.Component.dispatchEventImpl(Component.java:4937)
	at java.awt.Component.dispatchEvent(Component.java:4687)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
	at java.awt.EventQueue.access$000(EventQueue.java:101)
	at java.awt.EventQueue$3.run(EventQueue.java:666)
	at java.awt.EventQueue$3.run(EventQueue.java:664)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
	at java.awt.EventQueue$4.run(EventQueue.java:680)
	at java.awt.EventQueue$4.run(EventQueue.java:678)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


see comments for more details
2 tests failed also on stt-134.ru.oracle.com (win 7 x86) with jdk7u03b02 (not only stt-27.ru):
sun/java2d/SunGraphics2D/PolyVertTest.java
sun/java2d/SunGraphics2D/SimplePrimQuality.java

these tests failed with jdk6u31b02 on stt-27.ru.oracle.com and stt-134.ru.oracle.com

see no same failures with jdk1.4.2_36b02 and jdk1.5.0_34b02

see also comments steps to reproduce in comments for jdk6u31b02

                                    

Comments
SUGGESTED FIX

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/547b2917b303
                                     
2012-08-24
EVALUATION

Here are the results of running test on my laptop:

test/closed/sun/java2d/SunGraphics2D/EmptyClipRenderingTest Total number of test rects: 133
Test PASSED.

test/sun/java2d/SunGraphics2D/DrawImageBilinear
Exception in thread "main" java.lang.RuntimeException: Test failed at x=10 y=10
(expected=0xffff0000 actual=0xffffffff)
        at DrawImageBilinear.testRegion(DrawImageBilinear.java:148)
        at DrawImageBilinear.main(DrawImageBilinear.java:213)
COMMENT: I'm not sure that it has relation to 7112642.

test/sun/java2d/DirectX/RenderingToCachedGraphicsTest
Test PASSED

test/sun/java2d/SunGraphics2D/PolyVertTest
Exception in thread "AWT-EventQueue-0" sun.java2d.InvalidPipeException: attempt
to validate Pipe with invalid SurfaceData
        at sun.java2d.SunGraphics2D.validatePipe(SunGraphics2D.java:381)
        at sun.java2d.SunGraphics2D.revalidateAll(SunGraphics2D.java:2358)
        at sun.java2d.SunGraphics2D.drawLine(SunGraphics2D.java:2134)
COMMENT: revalidation of renderers failed (fix for 7112642 just discovers the real problem).

test/sun/java2d/SunGraphics2D/SimplePrimQuality
Exception in thread "AWT-EventQueue-0" sun.java2d.InvalidPipeException: attempt
to validate Pipe with invalid SurfaceData
        at sun.java2d.SunGraphics2D.validatePipe(SunGraphics2D.java:381)
        at sun.java2d.SunGraphics2D.revalidateAll(SunGraphics2D.java:2358)
        at sun.java2d.SunGraphics2D.drawLine(SunGraphics2D.java:2134)
        at SimplePrimQuality.drawLine(SimplePrimQuality.java:80)
        at SimplePrimQuality.drawLines(SimplePrimQuality.java:84)
        at SimplePrimQuality.renderShapes(SimplePrimQuality.java:130)
        at SimplePrimQuality.renderTest(SimplePrimQuality.java:161)
        at SimplePrimQuality.paint(SimplePrimQuality.java:169)
        at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
        at sun.awt.RepaintArea.paint(RepaintArea.java:240)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347)
        at java.awt.Component.dispatchEventImpl(Component.java:4936)
COMMENT: revalidation of renderers failed (fix for 7112642 just discovers the real problem).

test/sun/java2d/SunGraphics2D/SourceClippingBlitTest/SourceClippingBlitTest (resolved)
Exception in thread "AWT-EventQueue-0" sun.java2d.InvalidPipeException: attempt
to validate Pipe with invalid SurfaceData
        at sun.java2d.SunGraphics2D.validatePipe(SunGraphics2D.java:381)
        at sun.java2d.SunGraphics2D.clearRect(SunGraphics2D.java:2372)
        at sun.awt.RepaintArea.paint(RepaintArea.java:235)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347)
        at java.awt.Component.dispatchEventImpl(Component.java:4936)
COMMENT: surplus validatePipe() call outside try {} block. I've just prepared the fix for it and it works.
                                     
2011-12-14
EVALUATION

These tests have invalid D3DWindowSurfaceData for WCanvasPeer:
test/sun/java2d/SunGraphics2D/PolyVertTest
test/sun/java2d/SunGraphics2D/SimplePrimQuality

So, when it is retrieved by SunGraphics2D inside revalidateAll()
it throws the exception having no chance to create pipes for invalid surface data.

Seems like we should understand why D3DWindowSurfaceData couldn't 
be properly initialized for these tests.

It's more complicated because validatePipe() is called from two threads simultaneously:
"AWT-EventQueue-0"
sun.java2d.SunGraphics2D.validatePipe(SunGraphics2D.java:381)
sun.java2d.SunGraphics2D.revalidateAll(SunGraphics2D.java:2358)
sun.java2d.SunGraphics2D.getCompClip(SunGraphics2D.java:496)
sun.java2d.loops.XorDrawLineANY.DrawLine(GeneralRenderer.java:895)
sun.java2d.pipe.LoopPipe.drawLine(LoopPipe.java:62)
sun.java2d.pipe.ValidatePipe.drawLine(ValidatePipe.java:62)
sun.java2d.SunGraphics2D.drawLine(SunGraphics2D.java:2132)
PolyVertTest.render(PolyVertTest.java:195)
PolyVertTest$TestCanvas.paint(PolyVertTest.java:636)
sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
sun.awt.RepaintArea.paint(RepaintArea.java:240)
sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347)
java.awt.Component.dispatchEventImpl(Component.java:4937)
java.awt.Component.dispatchEvent(Component.java:4687)
java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
java.awt.EventQueue.access$000(EventQueue.java:101)
java.awt.EventQueue$3.run(EventQueue.java:666)
java.awt.EventQueue$3.run(EventQueue.java:664)
java.security.AccessController.doPrivileged(AccessController.java)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
java.awt.EventQueue$4.run(EventQueue.java:680)
java.awt.EventQueue$4.run(EventQueue.java:678)
java.security.AccessController.doPrivileged(AccessController.java)
java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)

"D3D Screen Updater"
sun.java2d.SunGraphics2D.validatePipe(SunGraphics2D.java:381)
sun.java2d.pipe.ValidatePipe.validate(ValidatePipe.java:55)
sun.java2d.pipe.ValidatePipe.fillRect(ValidatePipe.java:75)
sun.java2d.SunGraphics2D.fillRect(SunGraphics2D.java:2321)
sun.java2d.d3d.D3DScreenUpdateManager.validate(D3DScreenUpdateManager.java:496)
sun.java2d.d3d.D3DScreenUpdateManager.run(D3DScreenUpdateManager.java:466)
java.lang.Thread.run(Thread.java:722)
java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
                                     
2011-12-14



Hardware and Software, Engineered to Work Together