United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4949162 : PIT: App crash for some fonts in Linux RH 8/9

Details
Type:
Bug
Submit Date:
2003-11-05
Status:
Resolved
Updated Date:
2004-01-26
Project Name:
JDK
Resolved Date:
2004-01-26
Component:
client-libs
OS:
linux
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (b36)

Related Reports
Backport:

Sub Tasks

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
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
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger-beta2

FIXED IN:
tiger-beta2

INTEGRATED IN:
tiger-b36
tiger-beta2


                                     
2004-08-24



Hardware and Software, Engineered to Work Together