JDK-6289811 : VM crashed while starting Font2DTest demo application
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2005-06-23
  • Updated: 2011-02-16
  • Resolved: 2005-07-25
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 b45Fixed
Description
FULL PRODUCT VERSION :
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b39)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b39, mixed mode, sharing)


A DESCRIPTION OF THE PROBLEM :
Directly after starting:

java -jar Font2DTest.jar

I get the standard error message indicating something went wrong in the hotspot VM (see below). The application has not even opened any window yet.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xb7eb3ac8, pid=15021, tid=16384
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-ea-b39 mixed mode, sharing)
# Problematic frame:
# C  [libc.so.6+0x72ac8]  strcmp+0x8
#
# An error report file with more information is saved as /tmp/hs_err_pid15021.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted




APPLET URL OR APPLICATION NAME:
Font2DTest
###@###.### 2005-06-23 09:38:40 GMT

Reporter have provided 4 type1 fonts causing problems as well as 
-Dsun.java2d.debugfonts=true log. Files are attached.

He confirmed that removal of these fonts solves the problem for him.

###@###.### 2005-06-25 11:30:32 GMT

Comments
EVALUATION I have no reason to believe this is a regression or anything like that. I think this is a case of there being a bad Type 1 font on that system. We need to get the submitter to locate the font so we can examine it and workaround it - or fix the JDK if it is a legitimate font we don't handle properly. Stack: [0xbfe00000,0xc0000000), sp=0xbfffb18c, free space=2028k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libc.so.6+0x72ac8] strcmp+0x8 C [libfontmanager.so+0x122ca] C [libfontmanager.so+0x13a1b] C [libfontmanager.so+0x13b6c] C [libfontmanager.so+0x22021] C [libfontmanager.so+0x396eb] Java_sun_font_Type1Font_createScaler+0x13b j sun.font.Type1Font.createScaler(I)J+0 j sun.font.Type1Font.getScaler()J+15 j sun.font.Type1GlyphMapper.initMapper()V+16 j sun.font.Type1GlyphMapper.<init>(Lsun/font/Type1Font;)V+10 j sun.font.Type1Font.getMapper()Lsun/font/CharToGlyphMapper;+13 J java.awt.Font.canDisplay(I)Z J Font2DTest.canDisplayRange(Ljava/awt/Font;II)Z j Font2DTest.setupFontList(II)V+109 j Font2DTest.fireRangeChanged()V+40 j Font2DTest.<init>(Ljavax/swing/JFrame;Z)V+356 j Font2DTest.main([Ljava/lang/String;)V+66 v ~StubRoutines::call_stub V [libjvm.so+0x1764d2] V [libjvm.so+0x25d5a8] V [libjvm.so+0x17630f] V [libjvm.so+0x1999e9] V [libjvm.so+0x18de67] C [java+0x186e] C [libc.so.6+0x15c3c] __libc_start_main+0xcc ###@###.### 2005-06-24 16:29:49 GMT ###@###.### 2005-06-25 11:30:32 GMT Crash here was trigered by fonts with "anonymous" glyphs. I mean glyph whose definition in CharString dictionary looks like / 107 RD .... instead of something like /asciitilde 107 RD ... From T1 spec it is hard to say whether fonts with such glyphs are valid. I could not find anything proving they are malformed. After all, we should not crash anyway. Crash happened in translation of postscript char name to unicode. PSName is "" (empty string) in first case but we do not expect is could start from something ather then latin letter. This cause array out of bound access and segmentation fault. ###@###.### 2005-06-27 13:54:48 GMT
24-06-2005