JDK-6503212 : PIT:Regression test FontAttributeTest.java and two others failed with PIT build 2006-12-04-int.6u1
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-12-11
  • Updated: 2010-04-02
  • Resolved: 2006-12-14
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.
JDK 6 JDK 7
6u1 b01Fixed 7Resolved
Description
Build: /net/jano.sfbay/export/disk29/jcg/NightlyBuilds/update.int/6u1/archived/2006-12-04-int.6u1
Test cases: java/awt/font/TextLayout/TestHitToPoint.java
	java/awt/FontClass/FontAttributeTest/FontAttributeTest.java
	java/awt/font/TextLayout/NumbersAsAttributeValues.java

With the above listed PIT build, the above three test cases failed in all configurations (Solaris, Linux, and Windows),

The exceptions thrown:

#section:main
----------messages:(3/133)----------
command: main FontAttributeTest
reason: Assumed action based on file name: run main FontAttributeTest 
elapsed time (seconds): 3.137
----------System.out:(0/0)----------
----------System.err:(31/1849)----------
java.lang.NullPointerException
	at java.awt.Font.hashCode(Font.java:1464)
	at sun.font.GlyphLayout$SDCache$SDKey.<init>(GlyphLayout.java:266)
	at sun.font.GlyphLayout$SDCache.get(GlyphLayout.java:287)
	at sun.font.GlyphLayout.layout(GlyphLayout.java:330)
	at sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:308)
	at sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:294)
	at sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:208)
	at sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:117)
	at java.awt.font.TextLine.init(TextLine.java:264)
	at java.awt.font.TextLine.<init>(TextLine.java:110)
	at java.awt.font.TextLine.fastCreateTextLine(TextLine.java:952)
	at java.awt.font.TextLayout.fastInit(TextLayout.java:585)
	at java.awt.font.TextLayout.<init>(TextLayout.java:419)
	at FontAttributeTest$DisplayRecord.<init>(FontAttributeTest.java:176)
	at FontAttributeTest$Tests$TestIterator.next(FontAttributeTest.java:357)
	at FontAttributeTest$Tests$TestIterator.next(FontAttributeTest.java:342)
	at FontAttributeTest$Tests.<init>(FontAttributeTest.java:300)
	at FontAttributeTest.<init>(FontAttributeTest.java:54)
	at FontAttributeTest.main(FontAttributeTest.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:83)
	at java.lang.Thread.run(Thread.java:619)

JavaTest Message: Test threw exception: java.lang.NullPointerException

JDK under test: (/net/sqe1/quality2/i18n1/i18n-dtf/knight_ws/exec/i18n_reg_60-i18n_Reg_Sol_10_JDS_ja-en-2006-12-08-16-15-26-0966/jdk)
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b01)
Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)

One set of the jtr files can be found at
http://sqeweb.sfbay/i18n/projects/jdk6UR/PIT-results/i18n_reg_60-i18n_Reg_Sol_10_JDS_ja-en-2006-12-08-16-15-26-0966/java/awt/FontClass/FontAttributeTest/FontAttributeTest.jtr

http://sqeweb/i18n/projects/jdk6UR/PIT-results/i18n_reg_60-i18n_Reg_Sol_10_JDS_ja-en-2006-12-08-16-15-26-0966/java/awt/font/TextLayout/NumbersAsAttributeValues.jtr

http://sqeweb.sfbay/i18n/projects/jdk6UR/PIT-results/i18n_reg_60-i18n_Reg_Sol_10_JDS_ja-en-2006-12-08-16-15-26-0966/java/awt/font/TextLayout/TestHitToPoint.jtr
Same failures are seen for jdk 7, in PIT build
/net/jano.sfbay/export/disk29/jcg/NightlyBuilds/i18n.pit/jdk7/archived/2007-01-24.jdk7.pit

Comments
EVALUATION In fixing 6487386: a problem in Font.equals(), hashCode() was also updated to include the hash code of any transform attribute in the calculation of the font hash. This partially tested to ensure the transform attribute could not be null, but overlooked that WIDTH and SUPERSCRIPT might be set indicating that the font is transformed, and this is reflected in the transform returned from public API but is not reflected in the internal data structure. The fix is to add an additional test for null.
11-12-2006