JDK-8112586 : Java crash due to invalid memory location using libjavafx-font.jnilib plugin
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2011-04-20
  • Updated: 2015-06-16
  • Resolved: 2011-08-08
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.
Other
fx2.0Fixed
Related Reports
Duplicate :  
Relates :  
Description
- Please see the attached test case . This seems more of Text/Font issue.
- Run the file and start typing Left arrow key . After 11 count the Java crashes due to 
         Invalid memory access of location 0x28 rip=0x11ba0c3b7
  So it must have something to do with rendering the 11 font type in the list of fonts fetched.
- See the attached Screenshot for more details

Comments
Fixed (actually worked around) for b40 by skipping these Mac fonts.
08-08-2011

We need to exclude these problem fonts : family=Hiragino Kaku Gothic Pro W3, name=HiraKakuPro-W3 family=Hiragino Kaku Gothic Pro W6, name=HiraKakuPro-W6 family=Hiragino Kaku Gothic ProN W3, name=HiraKakuProN-W3 family=Hiragino Kaku Gothic ProN W6, name=HiraKakuProN-W6 family=Hiragino Kaku Gothic Std W8, name=HiraKakuStd-W8 family=Hiragino Kaku Gothic StdN W8, name=HiraKakuStdN-W8 family=Hiragino Maru Gothic Pro W4, name=HiraMaruPro-W4 family=Hiragino Maru Gothic ProN W4, name=HiraMaruProN-W4 family=Hiragino Mincho Pro W3, name=HiraMinPro-W3 family=Hiragino Mincho Pro W6, name=HiraMinPro-W6 family=Hiragino Mincho ProN W3, name=HiraMinProN-W3 family=Hiragino Mincho ProN W6, name=HiraMinProN-W6 family=Hiragino Sans GB W3, name=Hiragino Sans GB W3 family=Hiragino Sans GB W6, name=Hiragino Sans GB W6
08-08-2011

T2K native font code has a problem stroking and sometime getting glyphs for certain ���Hiragino��� fonts, which as installed on MacOS by default. Problems are identical on windows for these fonts. Corruption my be glyphs rendered in incorrect locations, and look wrong or a system crash. Crash is triggered when stroking particular fonts ie. ���Hiragino Maru Gothic Pro W4��� Partial Stack trace: causing "Invalid memory access of location 0x28 rip=0x11c03c29c" j com.sun.t2k.T2KFontFile.getGlyphOutline(JJI)Lcom/sun/javafx/geom/Path2D;+0 j com.sun.t2k.T2KFontFile.getGlyphOutline(JI)Lcom/sun/javafx/geom/Path2D;+7 j com.sun.t2k.T2KFontStrike.getGlyphOutline(I)Lcom/sun/javafx/geom/Path2D;+9 j com.sun.t2k.T2KFontStrike.getGlyphOutline(Lcom/sun/t2k/T2KGlyph;)Lcom/sun/javafx/geom/Path2D;+5 See attached image for corruption for font ���Hiragino Kaku Gothic Std W8��� Mac provides these fonts in two verities, those that follow ���Japanese based on JIX X 0213��� standard and those that do not. The full name distinguishes these fonts with ���...ProN...��� or ���...StdN��� See chart below. The ���Japanese based on JIX X 0213��� fonts do not cause the crash or corruption. English font name Version Standard Hiragino Kaku Gothic Pro W3 7.11 Japanese Hiragino Kaku Gothic Pro W6 7.11 Japanese Hiragino Kaku Gothic ProN W3 8 Japanese based on JIX X 0213 Hiragino Kaku Gothic ProN W6 8 Japanese based on JIX X 0213 Hiragino Kaku Gothic Std W8 7.1 Japanese Hiragino Kaku Gothic StdN W8 8 Japanese based on JIX X 0213 Hiragino Maru Gothic Pro W4 7.11 Japanese Hiragino Maru Gothic ProN W4 8 Japanese based on JIX X 0213 Hiragino Mincho Pro W3 7.11 Japanese Hiragino Mincho Pro W6 7.11 Japanese Hiragino Mincho ProN W3 8 Japanese based on JIX X 0213 Hiragino Mincho ProN W6 8 Japanese based on JIX X 0213
19-07-2011

Phil is more suited to fix problem in T2K native code affecting JDK and JavaFX. Offending code probably triggered in GeneralPath.cpp (getGlyphOutline)
19-07-2011

Code snip to generate corrupt image, note must render "Hiragino" font to crash system. private Text problemFont() { Text text = new Text("Hiragino Kaku Gothic Std W8"); text.setLayoutX(20.0); text.setLayoutY(30.0); text.setFont(new Font("Hiragino Kaku Gothic Std W8", 32)); text.setStroke(Color.GOLD); return text; }
19-07-2011

Affected tests: JavaFXCompatibilityTestSuite/graphics/api/text/NameTest/Name
20-04-2011