-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b31
-
x86
-
windows_2000, windows_xp
-
Verified
Name: vsR10238 Date: 10/23/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.5.0-b25
Testbase : Regression-test
Platform[s] : Windows 2000 Pro
Falling test[s]:
sun/awt/image/BytePackedRaster/DitherTest.java
Regression test sun/awt/image/BytePackedRaster/DitherTest.java fails intermittently
on Windows 2000 with JDK1.5.0 (tested with b24,b25) with the following message:
-------------------------------------------------
STATUS:Passed.
java.lang.NullPointerException: HDC for component
at sun.java2d.loops.DrawGlyphList.DrawGlyphList(Native Method)
at sun.java2d.pipe.SolidTextRenderer.drawGlyphList(SolidTextRenderer.java:36)
at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:53)
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2606)
at DitherCanvas.paint(DitherTest.java:323)
at DitherCanvas.setImage(DitherTest.java:366)
at DitherTest.run(DitherTest.java:234)
at java.lang.Thread.run(Thread.java:549)
-------------------------------------------------
With the following modification in DitherTest.main:
public static void main(String args[]) {
Frame f = new Frame("DitherTest");
DitherTest ditherTest = new DitherTest();
ditherTest.init();
f.add("Center", ditherTest);
f.pack();
f.show();
ditherTest.start();
try{ Thread.sleep(1000); }catch(Throwable e){} // <== MODIFICATION
}
the test always passes.
I cannot reproduce the failure with JDK1.4.2-b28. Nevertheless, since the modification
does not affect (in my opinion) the fix the test verifies, I'm filing the bug against the
test.
Test source location:
=====================
/java/re/jdk/1.5.0/promoted/all/b24/ws/j2se/test/sun/awt/image/BytePackedRaster/DitherTest.java
jtr file location:
==================
/net/jtgb4u4c.sfbay/export/sail15/results.2/tiger/b24/regtest/win32/win2000_linux-2/workDir/test/sun/awt/image/BytePackedRaster/DitherTest.jtr
How to reproduce:
=================
Run the following script (you may need to change its variables)
--- script start ---
#!/bin/sh
RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
#Paths in Java Software:
JT_HOME="z:/jct-tools/3.1.2/archive/fcs/binaries"
JEMMY_JAR="x:/Jemmy/jemmy.jar"
JAVA_HOME="z:/jdk/1.5.0/promoted/all/b24/binaries/windows-i586"
TEST_BASE_PATH="z:/jdk/1.5.0/promoted/all/b24/ws/j2se/test"
#Alternative paths for the NSK site:
#JT_HOME="h:/java/jct"
#JEMMY_JAR="$JT_HOME/jemmy/jemmy.jar"
#JAVA_HOME="h:/java/jdk1.5.0/win32"
#TEST_BASE_PATH="h:/java/regtest.tiger/test"
TESTVMOPTS="-client"
CLASSPATH="$JT_HOME/classes;$JT_HOME/lib/javatest.jar;$JT_HOME/lib/jtreg.jar"
TEST="sun/awt/image/BytePackedRaster/DitherTest.java"
mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
#rm $WORK_DIR/jtData/ResultCache.jtw 2>&1
cd $WORK_DIR/scratch
$JAVA_HOME/bin/java -server -cp $CLASSPATH -DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,windir=$windir,SystemRoot=$SystemRoot,PATH=${SHELL%/*},CPAPPEND=$JEMMY_JAR,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-2" -Dprogram=jtreg com.sun.javatest.regtest.Main -a -v default -batch -params -w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/$TEST"
--- script end ---
Script output:
==============
Test output (jtr part):
=======================
----------System.out:(0/0)----------
----------System.err:(11/613)----------
STATUS:Passed.
java.lang.NullPointerException: HDC for component
at sun.java2d.loops.DrawGlyphList.DrawGlyphList(Native Method)
at sun.java2d.pipe.SolidTextRenderer.drawGlyphList(SolidTextRenderer.java:36)
at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:53)
at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2606)
at DitherCanvas.paint(DitherTest.java:323)
at DitherCanvas.setImage(DitherTest.java:366)
at DitherTest.run(DitherTest.java:234)
at java.lang.Thread.run(Thread.java:549)
STATUS:Failed.`main' threw exception: java.lang.NullPointerException: HDC for component
result: Failed. Execution failed: `main' threw exception: java.lang.NullPointerException: HDC for component
test result: Failed. Execution failed: `main' threw exception: java.lang.NullPointerException: HDC for component
Specific machine info:
======================
Hostname: linux-2
OS: Windows 2000 Pro
======================================================================