JDK-6418004 : java/awt/font/StyledMetrics/StyledMetrics.java fails on Vista
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0u10,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2006-04-26
  • Updated: 2014-09-25
  • Resolved: 2006-05-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.
JDK 6
6 b86Fixed
Related Reports
Duplicate :  
Description
JDK		    : Fails:  Mustang b80
Platform[s]         : Fails On: Windows Vista (32-bit) build 5342
Failing Test [s]    : java/awt/font/StyledMetrics/StyledMetrics.java

    Test source location:
    =====================
/net/cady/export/jdk1.6.0/promoted/all/b80/ws/j2se/test/java/awt/font/StyledMetrics/StyledMetrics.java

    jtr file location:
    ==================
/net/cady/export6/results/mustang/b80/reg/regression-reg-winVista-32-2006-03-22-14-04-21-0472/workDir/java/awt/font/StyledMetrics/StyledMetrics.jtr

    How to reproduce:
    ====================
    - Set JAVA_HOME to Mustang b80 windows-i586
    - cd /net/cady/export/jdk1.6.0/promoted/all/b80/ws/j2se/test/java/awt/font/StyledMetrics
    - /net/koori.sfbay/onestop/jct-tools/2.1.6/archive/fcs/binaries/win32/bin/jtreg -r:/tmp -w:/tmp ./StyledMetrics.java

    Test output:
    ============
----------System.out:(1/14)----------
Extra char:0
----------System.err:(15/1362)----------
java.lang.Exception: Differing advances for java.awt.Font[family=MS Gothic,name=MS Gothic,style=bold,size=7] this ch=9 read ch=9 this adv=0.3828125 read adv=7.3828125 AA=Nonantialiased text mode FM=Integer text metrics mode
        at StyledMetrics.doTestFont(StyledMetrics.java:217)
        at StyledMetrics.testFont(StyledMetrics.java:151)
        at StyledMetrics.main(StyledMetrics.java:24)
        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:589)
        at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
        at java.lang.Thread.run(Thread.java:618)

Comments
EVALUATION This is in fact a bug in the test. It is not updating the ch[1] to set the char to the char for which we want to measure the advance, so it actually measures the advance of char==0 which doesn't esist so maps to the missing glyph, and so that's what's measured. On Vista MS Gothic adds some new code points and specifically maps char==0 so the test fails.
02-05-2006