JDK-6477508 : reg. test java/awt/font/StyledMetrics/StyledMetrics.java fails on Vista
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0u10
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2006-10-03
  • Updated: 2010-04-02
  • Resolved: 2006-10-03
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.0u10Resolved
Related Reports
Duplicate :  
Description
JDK:  /net/jano.sfbay/export/disk29/jcg/NightlyBuilds/update.int/5.0u10/archived/2006-09-26-int.5.0u10
platform: Windows Vista 5734, 64bit
test:     java/awt/font/StyledMetrics/StyledMetrics.java fails

The following exceptions are thrown:

----------System.out:(1/95)*----------
java.awt.Font[family=\uff2d\uff33 \u30b4\u30b7\u30c3\u30af,name=MS Gothic,style=bold,size=12]
----------System.err:(14/1209)*----------
java.lang.Exception: Differing advances for java.awt.Font[family=\uff2d\uff33 \u30b4\u30b7\u30c3\u30af,name=MS Gothic,style=bold,size=12] this ch=12353 read ch=12353 this adv=0.65625 read adv=12.65625
	at StyledMetrics.testFont(StyledMetrics.java:159)
	at StyledMetrics.main(StyledMetrics.java:22)
	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:585)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
	at java.lang.Thread.run(Thread.java:595)

JavaTest Message: Test threw exception: java.lang.Exception: Differing advances for java.awt.Font[family=\uff2d\uff33 \u30b4\u30b7\u30c3\u30af,name=MS Gothic,style=bold,size=12] this ch=12353 read ch=12353 this adv=0.65625 read adv=12.65625
JavaTest Message: shutting down test

The same test also failed with 5.0u10 and 5.0u9 promotion builds, for Vista only, the test passed in WindowsXP, with same builds.
A similar bug 6418004 was reported and fixed for JDK 6.

Comments
EVALUATION This is as suspected a duplicate of 6418004: java/awt/font/StyledMetrics/StyledMetrics.java fails on Vista The test itself is buggy and was fixed in the JDK 6 workspace. The bug remains in the JDK 5 workspace. Running the JDK 6 version of the test on 1.5 update 10, the test passes. One minor modification to the test needs to be made so that it compiles on 1.5. The modification is to avoid using a 1.6 API : sccs diffs StyledMetrics.java ------- StyledMetrics.java ------- 194c194 < g2d.getFontMetrics().getFontRenderContext(); --- > g2d.getFontRenderContext();
03-10-2006