JDK-6173770 : JCK-5.0 test api/java_awt/Graphics/index.html#CopyArea[Graphics0018_14] fails intermittently
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0,5.0u1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_redhat_9.0,solaris_1
  • CPU: x86,sparc
  • Submitted: 2004-10-04
  • Updated: 2012-10-09
  • Resolved: 2004-10-26
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.
Other JDK 6
5.0u1Fixed 6 b10Fixed
Related Reports
Duplicate :  
Description
Filed By       : JCK Team [###@###.###
JDK            : JDK1.5.0-b64, JDK1.5.0-b63
JCK            : JCK1.5-runtime 
Platform[s]    : Linux, Solaris
switch/Mode    : default
JCK test owner:
  http://javaweb.sfbay/jcce/tcks/jck/1.5/project/data_reports/owners.jto
Falling test[s]: 
  api/java_awt/Graphics/index.html#CopyArea[Graphics0018_14] 

Problem desciption:
------------------
The following JCK 5.0 test: 
   api/java_awt/Graphics/index.html#CopyArea[Graphics0018_14] 
fails intermittently on Linux and Solaris using 1.5.0 JDK: 
  Linux 2.4.7-10smp 1.5.0-rc-b63 - Using JDK  1.5.0-rc-b63
  SunOS 5.8 sparc SUNW,Ultra-4 - Using JDK  1.5.0-b64
  SunOS 5.9 sparc SUNW,Ultra-60 - Using JDK  1.5.0-b64

Please use the attached test case ( bug-report.tar.gz )
derived from the JCK test for reproducing the issue.
Note that sometimes it takes hundreds of run to reproduce,
while on some machines it can be reproduced quickly.

Please see simple test output that demonstrates the issue:
====================
<gyi@mars> ./run.sh
< 1
true
PASSED
0
1 >
< 2
true
PASSED
...
0
46 >
< 47
true
Unexpected exception thrown:
sun.java2d.InvalidPipeException: bounds changed
e.getMessage(): bounds changed
---------------
sun.java2d.InvalidPipeException: bounds changed
       at sun.awt.X11Renderer.devCopyArea(Native Method)
       at sun.awt.X11SurfaceData.copyArea(X11SurfaceData.java:399)
       at sun.java2d.SunGraphics2D.copyArea(SunGraphics2D.java:1870)
       at HelloAWT.test(HelloAWT.java:58)
       at HelloAWT.main(HelloAWT.java:9)
Unexpected exception thrown:
sun.java2d.InvalidPipeException: bounds changed
e.getMessage(): bounds changed
---------------
sun.java2d.InvalidPipeException: bounds changed
       at sun.awt.X11Renderer.devCopyArea(Native Method)
       at sun.awt.X11SurfaceData.copyArea(X11SurfaceData.java:399)
       at sun.java2d.SunGraphics2D.copyArea(SunGraphics2D.java:1870)
       at HelloAWT.test(HelloAWT.java:58)
       at HelloAWT.main(HelloAWT.java:9)
FAILED
1
47 >
====================
###@###.### 10/4/04 16:28 GMT

Comments
EVALUATION I can reproduce the problem on my dual USIII with 1.5.0-b64 pretty easily if the main() is changed like this, for example: for (int i = 0; i < 100; i++) { HelloAWT myTest = new HelloAWT(); myTest.test(); } I can't reproduce it with 1.4.2, so it's a regression in 1.5. The exception is thrown because we're trying to render to an invalidated surface. We check if the surface is valid in X11SD_GetGC, and throw IPE if it's not. A surface is invalidated when it's disposed of, or if the bounds of the corresponding component have changed. This is the latter case. This is supposed to be handled when an InvalidPipeException is thrown: the exception should be catched in the pipe code and we should replace the surface and try the rendering operation again. But it looks like this code path is missing from X11Renderer, so we don't attempt to re-create the surface as we do in DrawImage pipe, for example. SunGraphics2D.copyArea X11SurfaceData.copyArea X11Renderer.devCopyArea Java_sun_awt_X11Renderer_devCopyArea X11SD_GetDC ---> the IPE is thrown and dropped on the floor ###@###.### 10/7/04 23:46 GMT The fix is to catch IPE, revalidateAll and try again. ###@###.### 10/9/04 01:46 GMT
04-10-2004