United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6367148 java.lang.NullPointerException in sun.font.GlyphLayout$EngineRecord.init
JDK-6367148 : java.lang.NullPointerException in sun.font.GlyphLayout$EngineRecord.init

Details
Type:
Bug
Submit Date:
2005-12-23
Status:
Closed
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2006-03-10
Component:
client-libs
OS:
windows_2003
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Cannot Reproduce
Affected Versions:
5.0
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
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.

                                    

Comments
EVALUATION

We have been unable to reproduce this here nor determine by inspection
how this might arise. The submitter was asked for more info but was unable
to provide it. Closing as not reproducible but definitely can be re-opened
if we learn more.
                                     
2006-03-10



Hardware and Software, Engineered to Work Together