JDK-6205321 : Java2D: opening Truetype font with empty table hangs (JCK on RHAS3.9)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0u2,6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2004-12-07
  • Updated: 2012-03-23
  • Resolved: 2005-01-24
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 JDK 6
5.0u2Fixed 6 betaFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
JDK            : mustang b14
JCK            : jck1.5
Platform[s]    : Fail: RH AS 3.9 (Nahant)  
                 Pass with RHAS3.0
switch/Mode    : Default
JCK test owner : http://javaweb.eng/jck/usr/owners.jto
Failing Test   : api/javax_swing/SwingUtilities/descriptions.html#other

This is the first time we run jck tests on RHAS3.9 (RHEL4 Beta2).

Test source location:
=====================
/net/koori.sfbay/onestop/jck/1.5/latest/binaries/JCK-runtime-15/tests/api/javax_swing/SwingUtilities/descriptions.html#other

jtr file location:
==================
file:/net/cady/export/dtf/unified/results/mustang/b14/jck/jck-jck-RH4_c1-2004-12-03-17-05-28-0890/workDir/api/javax_swing/SwingUtilities/descriptions_other.jtr
Note: jtr might get removed after 2 weeks.

How to reproduce:
====================

--------Script START---------------------
#!/bin/ksh
#
# README: Modify these threev variables to fit your need:
#
#    - ${executeClass}
#    - ${excludeCmd}
#    - ${executeClassArgs}
#    - ${executeContextArgs}
#    - ${executeTestURL}
#
#################################

SWITCH=${1+$@}
executeClass="javasoft.sqe.tests.api.javax.swing.SwingUtilities.otherTests"
excludeCmd=""
executeClassArgs=""
executeteTestURL=""

#executeContextArgs is used for vm testing.
executeContextArgs=

#This is where you want the JDK to be use.
#Example:  JDK=/net/jdk/export/disk8/local.java/jdk1.3.1
#/usr/local/java/jdk1.4.0_beta_refresh

#This is where you want the JCK to be use.
#Example:  TESTBASE=/net/jdk/export/disk8/local.java/jck1.3a

case `uname -s` in
  SunOS|Linux)
   DRIVE=/net/cady/export
   ;;
 *)
   # Map your drive y: to \\cady\export
   DRIVE="y:"
   ;; 
esac  

TESTBASE=$DRIVE/net/koori/onestop/jck/1.5/latest/binaries
JCK=${TESTBASE}/JCK-runtime-15
TESTBASE2=$DRIVE/net/jtgb4u4c/export/sail1/testarea/jck1.5
JCK2=${TESTBASE2}/JCK-runtime-15

JDK=$DRIVE/jdk1.6.0/promoted/all/b14/binaries/

#JDK=$DRIVE/jdk1.5.0_02/promoted/all/b03/binaries/
#JDK=$DRIVE/jdk1.5.0_01/latest/binaries/
#JDK=$DRIVE/jdk1.5.0/latest/binaries/
#JDK=$DRIVE/jdk1.5.0/latest/binaries/


case `uname -s` in
  SunOS)
   ARCH=`uname -p`
   case $ARCH in
    sparc)
      sharedJDK=$JDK/solaris-sparcv9
      LIB_OS=SunOS.sparc
      ;;
    i386)
      sharedJDK=$JDK/solaris-i586
      LIB_OS=SunOS.x86
      ;;
   esac
   ;;
  Linux)
   sharedJDK=$JDK/linux-i586
   LIB_OS=linux.i386
   ;;
  *)
   sharedJDK=$JDK/windows-i586
   ARCH=wintel
   LIB_OS=win32
   ;;
esac

case `uname -s` in
 SunOS | Linux)

  CLASSPATH=${JCK}/classes:${JCK}/javatest.jar
  PATH=$sharedJDK/bin:$JDK/bin:$PATH
  ;;
 *)
  CLASSPATH="${JCK}/classes;${JCK}/javatest.jar"
  PATH="$sharedJDK/bin;$JDK/bin;$CLASSPATH;$PATH"
  ;;

esac


#DISPLAY=${DISPLAY-$HOST:0.0}

if `echo $SWITCH|grep "\-d64" >/dev/null`; then
  LD_LIBRARY_PATH=${JCK2}/lib/sparcv9
else
  LD_LIBRARY_PATH=${JCK2}/lib/$LIB_OS:$JCK2/lib/$LIB_OS/jmx
fi

export PATH CLASSPATH  DISPLAY LD_LIBRARY_PATH

echo $LD_LIBRARY_PATH

echo $sharedJDK
echo $CLASSPATH

echo $SWITCH
#JDK=/export/jdk/b14/linux-i586/jdk1.6.0/bin
$sharedJDK/bin/java ${SWITCH} -showversion -Xfuture -cp $CLASSPATH  -Djava.security.policy=${JCK}/lib/jck.policy  -Djava.security.auth.policy=${JCK}/lib/java.auth.policy  -Djava.security.auth.login.config=${JCK}/lib/java.login.config ${executeClass}  ${excludeCmd} ${executeClassArgs} ${executeContextArgs} ${executeteTestURL}

--------Script END----------------------

Test output:
=============
Test sometime hangs.

Sometimes, the following error message show:
java: ../../../src/share/native/sun/font/t2k/t2ksc.c:611: Make3rdDegreeBezierEdgeList: Assertion `ptA <= lastPoint' failed.
Abort
134

Specific Machine Info:
=====================
hostname: circuslv
OS: Red Hat Enterprise Linux AS release 3.90 (Nahant)
Linux circuslv 2.6.9-1.648_EL #1 Tue Oct 26 12:39:58 EDT 2004 i686 i686 i386 GNU/Linux




###@###.### 2004-12-07 20:29:48 GMT

Problem is reproducible with Font2DTest. 

For crash - try to view Caladins CLM font.

To reproduce hang - view Lohit Bengali.
(in this case it seems to be hanging while trying to destoy VM).

###@###.### 2004-12-07 22:03:35 GMT

==============


###@###.### 2004-12-07 23:55:33 GMT

Comments
WORK AROUND Remove the offending font files. ###@###.### 2004-12-07 23:55:33 GMT
07-12-2004

EVALUATION Test sometime hangs. This seems to be caused by a TrueType font "Lohit Bengali" in file /usr/share/fonts/bn/lohit_bn.ttf It hangs creating the scaler. The reason for this one is that the font appears to have some bad information. the prep table has a length of zero and zero instructions. This isn't detected and T2K asks to read "zero" bytes. The file reading code doesn't detect this case either and reads zero bytes, which is unfortunately considered to mean that the read fails, so it retries, ad infinitum. The simplest fix is for the reading code to return immediately if <=0 bytes are requested to be read. >Sometimes, the following error message show: >java: ../../../src/share/native/sun/font/t2k/t2ksc.c:611: >Make3rdDegreeBezierEdgeList: Assertion `ptA <= lastPoint' failed. >Abort This seems to be caused by a Type1 font "Caladings CLM" in file /usr/share/fonts/hebrew/CaladingsCLM.pfa These appear to be unrelated bugs, so I am filing a new bug on this one : 6205414 and making this bug about the TrueType font problem. ###@###.### 2004-12-07 23:55:34 GMT
07-12-2004