JDK-4949162 : PIT: App crash for some fonts in Linux RH 8/9
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: client-libs
  • Sub-Component: 2d
  • Priority: P4
  • Affected Version: 5.0
  • OS: linux
  • CPU: generic
  • Submit Date: 2003-11-05
  • Updated Date: 2004-01-26
  • Resolved Date: 2004-01-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 Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2_09Resolved
Description
In Linux RH 8, application crashes while trying to render glyphcode 317 for font "Nimbus Mono L".

java: ../../../src/share/native/sun/font/t2k/t2ksc.c:611:
Make3rdDegreeBezierEdgeList: Assertion `ptA <= lastPoint' failed.
Aborted

In Linux RH9, application crashes while trying to render glyphcode 125 for "Aharoni" font.

java: ../../../src/share/native/sun/font/t2k/glyph.c:946: Add_GlyphClass: Assert
ion `t->ep[t->contourCount-1] == t->pointCount-1' failed.
Killed

I tried in latest PIT build as well. Earlier this used for fail for more number of fonts, which is fixed as bug 4940946.

Attached here with is the test FontCrashTest.java
Compile and run commenting/uncommenting appropriate fonts in Linux RH8/9
If the program crashes for above mentioned fonts/glyphs, bug is reproduced

Font "Nimbus Mono L" regular attached - n0220031.pfb

Can reproduce the crash when "Nimbus Mono L" font is used in all platforms. Copy the attached font to jre/lib/fonts. Run Font2DTest, select the specified font. Select "All Glyphs", it crashes on all platforms.

In WinXP
========

C:\j2sdk1.5.0\demo\jfc\Font2DTest>java -jar Font2DTest.jar
Assertion failed: ptA <= lastPoint, file ../../../src/share/native/sun/font/t2k/
t2ksc.c, line 611

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

In Solaris
==========
Assertion failed: ptA <= lastPoint, file ../../../src/share/native/sun/font/t2k/t2ksc.c, line 611
Abort (core dumped)

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger-beta2 FIXED IN: tiger-beta2 INTEGRATED IN: tiger-b36 tiger-beta2
2004-08-24

EVALUATION Name: inR10103 Date: 11/19/2003 Reported crashes are different manifestation of same issue - some fonts may have compound glyphs containing subglyphs with zero points (and sometimes consisting only of such subglyphs - e.g. n022003l.pfb). When we have compound glyph all we do is we process each subglyph and then add all its points/countours to base glyph. At later stages we treat compound glyph almost exactly as non-compound one (the differences are whether to enable hinting, etc.). The problem is in this step - at the moment we store number of countours as last index in array (i.e. assuming it is #contours-1). For empty glyph we return zero as we do for 1 contour glyph. This is inconsistent and cause assertions to fail. Proposed solution is: 1) Ignore all subglyphs with zero points except the case when we have no other subglyphs. In later case save one of them as base of compound glyph. 2) When closing contour with zero points set end point to -1 to distinguish with case when contour has exactly 1 point. ======================================================================
2004-08-24