JDK-4771101 : REGRESSION: Regtest sun/java2d/SunGraphics2D/PolyVertTest.java failed
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux,solaris_8,windows_98
  • CPU: x86,sparc
  • Submitted: 2002-10-30
  • Updated: 2008-11-05
  • Resolved: 2003-04-21
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
5.0 tigerFixed
Related Reports
Relates :  
Relates :  
Relates :  
Description

Name: aaR10208			Date: 10/30/2002


Filed By       : J2SE-SQA [###@###.###
JDK            : JDK1.4.2-b04
Testbase       : RegTest-test
Platform[s]    : RedHat Linux 8.0 (GNOME)
switch/Mode    : -client -Xmixed -Xfuture
Falling test[s]: 
        sun/java2d/SunGraphics2D/PolyVertTest.java 

RegTest-test sun/java2d/SunGraphics2D/PolyVertTest.java test fails on JDK1.4.2-b04

Test source location:
=====================
/net/jdk/export/disk8/local.java/jdk1.4.2/ws/j2se/test/sun/java2d/SunGraphics2D/PolyVertTest.java

jtr file location:
==================
/net/jtgb4u4c.eng/export/sail15/results/mantis/b04/regtest/linux/redhat8.0_gnome_linux-11/sun/java2d/SunGraphics2D/PolyVertTest.jtr

How to reproduce:
=================
Run the following script (you may need to change its variables)
 
--- script start ---
#!/bin/sh
TESTJAVA="/net/jdk/export/disk8/local.java/jdk1.4.2/linux"
export TESTJAVA
TEST_BASE="/net/jdk/export/disk8/local.java/jdk1.4.2/ws/j2se"
JCT_PATH="/net/linux-15/export/home/java/jct"
JT="$JCT_PATH/lib/javatest.jar"
JTREG="$JCT_PATH/lib/jtreg.jar"
TEST_BASE_ROOT="$TEST_BASE/test"
TEST_PACKAGE=sun/java2d/SunGraphics2D
TEST_SHORT_NAME=PolyVertTest
TEST_NAME=$TEST_PACKAGE/$TEST_SHORT_NAME
TESTSRC="$TEST_BASE_ROOT/$TEST_PACKAGE"
export TESTSRC
CLASSPATH=".:$TESTJAVA:$TESTJAVA/lib/tools.jar:$TEST_BASE:$TESTSRC:$JT:$JTREG"
export CLASSPATH^S
$TESTJAVA/bin/javac -g -classpath "$CLASSPATH" -d . $TEST_BASE_ROOT/$TEST_NAME.java
#$TESTJAVA/bin/java -showversion -cp "$CLASSPATH" -Dtest.src=$TEST_BASE_ROOT/$TEST_PACKAGE $TEST_SHORT_NAME
$TESTJAVA/bin/java -showversion -cp "$CLASSPATH" -Dtest.src=$TEST_BASE_ROOT/$TEST_PACKAGE $TEST_SHORT_NAME  -count  -showerrors

--- script end ---

Test output:
============
java version "1.4.2-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b04)
Java HotSpot(TM) Client VM (build 1.4.2-beta-b04, mixed mode)

4 bad pixels found while testing Screen
9 bad pixels found while testing Offscreen
9 bad pixels found while testing Volatile
9 bad pixels found while testing X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x23].createCompat()
9 bad pixels found while testing X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x23].createCompat(OPAQUE)
9 bad pixels found while testing X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x23].createVolatile()
9 bad pixels found while testing X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x24].createCompat()
9 bad pixels found while testing X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x24].createCompat(OPAQUE)
9 bad pixels found while testing X11GraphicsConfig[dev=X11GraphicsDevice[screen=0],vis=0x24].createVolatile()
Exception in thread "main" java.lang.RuntimeException: 76 bad pixels found in 9 tests
        at PolyVertTest.main(PolyVertTest.java:284)


Specific machine info:
======================
Hostname: linux-11
OS: RedHat Linux 8.0 (GNOME)
Video Card: ATI Mach64 3D Range IIC AGP


======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b05 VERIFIED IN: tiger-beta
27-08-2004

EVALUATION This test actually fails on all platforms, not just Linux. The failures are limited to the screen rendering tests (or accelerated offscreen rendering; basically any case that uses the platform renderer (GDI/X11)). This regression test was introduced with the putback for 4678208 (single pixel polygons are not drawn), the fix for which was Windows-centric. Therefore, this test originally passed just fine on Windows due to the fixes in 4678208, but similar fixes were not applied on the X11 side, so the screen tests fail on Solaris and Linux. Just as 4678208 included some changes to Win32Renderer.TransformPoly(), the X11Renderer.transformPoints() method requires similar changes so that some degenerate polygon cases are handled properly. Most of the failures are related to rendering polygon segments that don't go anywhere (e.g. (0,0) to (0,0)). I discovered two other sources of failure. One is that drawRect(x, y, 0, 0) should produce a single pixel at (x,y), but does not render anything on X11. The fix here is to trap the zero width/height case and instead issue an XFillRect with the appropriate dimensions. The second failure is in the transformPoints() method; line 71 of X11Renderer.c should be close = (npoints > 1 to allow polygons with two points to be closed (in keeping with the drawPolygon() spec). This helps the "XOR'd drawPolygon() call with 2 points" testcase work slightly better on X11, but it will still require the extended transformPoints() changes mentioned above in order to pass completely. Note that there is also now a single pixel failure on Windows due to the putback of platform XOR rendering support in 4665237. This case will require more investigation. Also note that these failures only affect corner cases and are not necessarily new in Mantis; the issue is that there is a new regression test (PolyVertTest) that calls out these failures. In fact, Mantis provides much more consistent results with degenerate primitive rendering than previous releases due to the fixes for 4678208. With the suggested fixes (mentioned above) in place, PolyVertTest should pass completely in all cases on all platforms. ###@###.### 2002-11-04 Transferring to engineer reponsible for 4678208. ###@###.### 2002-11-08 I modified the X11 renderer to collapse empty edges out of polygons and then to use a more reliable rendering method like XDrawLine (or XFillRect in the case of empty XDrawRectangles) if the polygon simplifies down to empty or a single segment. This seems to correct the non-XOR rendering in every X11 implementation I ran against, including 2 configurations that got most of our "empty primtive" tests wrong. ###@###.### 2003-02-26
26-02-2003