FULL PRODUCT VERSION :
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 5.2.3790]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Hyper-threaded Quad (Intel Xeon MP CPU 2.0 Ghz)
4.75 GB of RAM
Windows 2003
A DESCRIPTION OF THE PROBLEM :
When processing text objects in our reports, under load (10+ threads), we have observed occasional NPEs in sun.font.GlyphLayout$EngineRecord.init, line 565.
I took a look at the source for GlyphLayout.java and looks like the NPE may be due to a null _lef.
Here is the source:
void init(int start, int limit, Font2D font, int script, int lang, int gmask) {
this.start = start;
this.limit = limit;
this.gmask = gmask;
this.key.init(font, script, lang);
this.engine = _lef.getEngine(key);
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
You may need a multiprocessor machine to reproduce the NPE. We were running a hyper-threaded quad on Windows 2003 with 4.75 GB of RAM. The test ran 10 threads over 5 iterations.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No NPEs.
ACTUAL -
Intermittent NPEs in sun.font.GlyphLayout$EngineRecord.init.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Here is the stack trace that was generated:
java.lang.NullPointerException
at sun.font.GlyphLayout$EngineRecord.init(GlyphLayout.java:565)
at sun.font.GlyphLayout.nextEngineRecord(GlyphLayout.java:439)
at sun.font.GlyphLayout.layout(GlyphLayout.java:371)
at sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:267)
at sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:252)
at sun.font.ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:522)
at sun.font.ExtendedTextSourceLabel.getCharinfo(ExtendedTextSourceLabel.java:451)
at sun.font.ExtendedTextSourceLabel.getLineBreakIndex(ExtendedTextSourceLabel.java:397)
at java.awt.font.TextMeasurer.calcLineBreak(TextMeasurer.java:313)
at java.awt.font.TextMeasurer.getLineBreakIndex(TextMeasurer.java:548)
at java.awt.font.LineBreakMeasurer.nextOffset(LineBreakMeasurer.java:340)
at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
REPRODUCIBILITY :
This bug can be reproduced occasionally.