JVM crashes on Solaris 12 when running the following testcase:
------- Source Code -------
import java.awt.Font;
import java.awt.GraphicsEnvironment;
public class Family {
public static void main(String[] args) throws Exception {
Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
for (int i = 0; i < fonts.length; i++) {
System.out.println(fonts[i].getFontName());
System.out.println(fonts[i].getFamily());
System.out.println(fonts[i].getName());
}
}
}
------- End Source Code -------
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xb6a502bc, pid=1701, tid=2
#
# JRE version: 6.0_31-b04
# Java VM: Java HotSpot(TM) Server VM (20.6-b01 mixed mode solaris-sparc )
# Problematic frame:
# C [libmawt.so+0x202bc] getFontConfigLocations+0x1b8
#
# An error report file with more information is saved as:
# hs_err_pid1701.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
The above JVM coredump issue in NOT seen on another server with OS Solaris 12. After comparison, an suspicious package (x11/library/libfontenc) is found missing. With the package installed, the above issue is NOT reproducible.