|
Quick Lists
|
|
Bug ID:
|
6630501
|
|
Votes
|
0
|
|
Synopsis
|
CRASH: JCK test eats much memory and jvm crashes
|
|
Category
|
java:classes_2d
|
|
Reported Against
|
b17
|
|
Release Fixed
|
6-open(b03)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
|
|
Submit Date
|
15-NOV-2007
|
|
Description
|
JCK test api/javax_swing/SwingUtilities/descriptions.html#other produce error, and jvm becomes unusable at least on solaris. Here is the code that makes a crash:
Font[] fonts = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
FontMetrics fm;
for(int i = 0; i< fonts.length; i++){
fm = Toolkit.getDefaultToolkit().getFontMetrics(fonts[i]);
fm.getWidths();
}
Posted Date : 2007-11-15 19:50:50.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Note this is occuring on a "product" build which uses T2k and is reproducible
in jdk 7 too since b17 which has the freetype pluggable layer (fix 6570735).
It seems to be related to type1 fonts since it slows down significantly when
it encounters those fonts and running with -Dsun.java2d.noType1Font=true
cures the problem.
Posted Date : 2007-11-16 17:14:00.0
This problem is caused by silly bug in Type1Font implementation (introduced as part of refactoring to support pluggable rasterizers), it never saves font scaler in the field variable. i.e. we are creating scaler for every single glyph. This imply we allocate buffer to keep whole type1 font in memory, etc.
Note that these scalers are not disposed because we use Java2D disposer and Font objects are used as markers.
Until font objects are collected we will not dispose native scalers.
Fix is simple - make sure we actually create 1 scaler per font.
Posted Date : 2007-11-19 20:25:52.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |