-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b112
-
windows_8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8172600 | openjdk7u | Philip Race | P3 | Resolved | Fixed | master |
FULL PRODUCT VERSION :
build 1.7.0_25-b16
A DESCRIPTION OF THE PROBLEM :
JVM unexpectedly closes when generating an outline from a TextLayout object. The problem does appear with some fonts only. For example, with this font:
http://www.theleagueofmoveabletype.com/league-gothic/
Assert fails inside CloseTTFontFileFunc method in freetypeScaler.c file.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Font font = Font.createFont(Font.TRUETYPE_FONT, new File( " Regular.otf " ));
AffineTransform tx = new AffineTransform();
TextLayout layout = new TextLayout(font.getName(), font,
new FontRenderContext(tx, true, false));
Shape outline = layout.getOutline(tx);
System.out.println(outline.getBounds());
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text line bounds in console
ACTUAL -
JVM closes
ERROR MESSAGES/STACK TRACES THAT OCCUR :
RELEASE BUILD:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6aac1431, pid=4084, tid=856
#
# JRE version: 7.0_25-b16
# Java VM: Java HotSpot(TM) Client VM (23.25-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [fontmanager.dll+0x11431] Java_sun_font_SunLayoutEngine_nativeLayout+0x152
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
FASTDEBUG OPENJDK BUILD:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (C:\jdkbuild\sources\hotspot\src\share\vm\prims\jni.cpp:248), pid=4364, tid=3812
# guarantee(klass_hash_ok(k, id)) failed: Bug in native code: jfieldID class must match object
#
# JRE version: 7.0-b24
# Java VM: OpenJDK Client VM (21.0-b17-fastdebug mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x17db7c00): JavaThread " Java2D Disposer " daemon [_thread_in_vm, id=3812, stack(0x18030000,0x18080000)]
Stack: [0x18030000,0x18080000], sp=0x1807f37c, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x248911] VMError::report_and_die+0x581
V [jvm.dll+0x2411c5] report_vm_error+0x45
V [jvm.dll+0x111e43] jfieldIDWorkaround::verify_instance_jfieldID+0x83
V [jvm.dll+0x13224d] jni_GetObjectField+0x1fd
C [fontmanager.dll+0x359b] CloseTTFontFileFunc+0x6b
C [fontmanager.dll+0x1ff94] FT_Stream_Close+0x14
C [fontmanager.dll+0x20e35] FT_Stream_Free+0x15
C [fontmanager.dll+0x228bf] FT_Load_Char+0x11f
C [fontmanager.dll+0x230e7] FT_Done_Face+0x67
C [fontmanager.dll+0x39c7] freeNativeResources+0x27
C [fontmanager.dll+0x483a] Java_sun_font_FreetypeFontScaler_disposeNativeScaler+0x3a
j sun.font.FreetypeFontScaler.disposeNativeScaler(J)V+0
j sun.font.FreetypeFontScaler.dispose()V+14
j sun.java2d.Disposer.clearDeferredRecords()V+40
j sun.java2d.Disposer.run()V+35
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x1e7463] JavaCalls::call_helper+0x393
V [jvm.dll+0x2ccfd2] os::os_exception_wrapper+0xa2
V [jvm.dll+0x1e7811] JavaCalls::call_virtual+0x111
V [jvm.dll+0x1e787e] JavaCalls::call_virtual+0x5e
V [jvm.dll+0x15cac8] thread_entry+0xc8
V [jvm.dll+0x21c749] JavaThread::thread_main_inner+0xb9
V [jvm.dll+0x25b8a4] java_start+0xc4
C [msvcr100.dll+0x5c6de] endthreadex+0x3a
C [msvcr100.dll+0x5c788] endthreadex+0xe4
C [KERNEL32.DLL+0x173e] BaseThreadInitThunk+0x12
C [ntdll.dll+0x56911] LdrInitializeThunk+0x1f0
C [ntdll.dll+0x568bd] LdrInitializeThunk+0x19c
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package com.company;
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.io.File;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException, FontFormatException {
Font font = Font.createFont(Font.TRUETYPE_FONT, new File( " Regular.otf " ));
AffineTransform tx = new AffineTransform();
TextLayout layout = new TextLayout(font.getName(), font,
new FontRenderContext(tx, true, false));
Shape outline = layout.getOutline(tx);
System.out.println(outline.getBounds());
}
}
---------- END SOURCE ----------
build 1.7.0_25-b16
A DESCRIPTION OF THE PROBLEM :
JVM unexpectedly closes when generating an outline from a TextLayout object. The problem does appear with some fonts only. For example, with this font:
http://www.theleagueofmoveabletype.com/league-gothic/
Assert fails inside CloseTTFontFileFunc method in freetypeScaler.c file.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Font font = Font.createFont(Font.TRUETYPE_FONT, new File( " Regular.otf " ));
AffineTransform tx = new AffineTransform();
TextLayout layout = new TextLayout(font.getName(), font,
new FontRenderContext(tx, true, false));
Shape outline = layout.getOutline(tx);
System.out.println(outline.getBounds());
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text line bounds in console
ACTUAL -
JVM closes
ERROR MESSAGES/STACK TRACES THAT OCCUR :
RELEASE BUILD:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6aac1431, pid=4084, tid=856
#
# JRE version: 7.0_25-b16
# Java VM: Java HotSpot(TM) Client VM (23.25-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [fontmanager.dll+0x11431] Java_sun_font_SunLayoutEngine_nativeLayout+0x152
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
FASTDEBUG OPENJDK BUILD:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (C:\jdkbuild\sources\hotspot\src\share\vm\prims\jni.cpp:248), pid=4364, tid=3812
# guarantee(klass_hash_ok(k, id)) failed: Bug in native code: jfieldID class must match object
#
# JRE version: 7.0-b24
# Java VM: OpenJDK Client VM (21.0-b17-fastdebug mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
#
--------------- T H R E A D ---------------
Current thread (0x17db7c00): JavaThread " Java2D Disposer " daemon [_thread_in_vm, id=3812, stack(0x18030000,0x18080000)]
Stack: [0x18030000,0x18080000], sp=0x1807f37c, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x248911] VMError::report_and_die+0x581
V [jvm.dll+0x2411c5] report_vm_error+0x45
V [jvm.dll+0x111e43] jfieldIDWorkaround::verify_instance_jfieldID+0x83
V [jvm.dll+0x13224d] jni_GetObjectField+0x1fd
C [fontmanager.dll+0x359b] CloseTTFontFileFunc+0x6b
C [fontmanager.dll+0x1ff94] FT_Stream_Close+0x14
C [fontmanager.dll+0x20e35] FT_Stream_Free+0x15
C [fontmanager.dll+0x228bf] FT_Load_Char+0x11f
C [fontmanager.dll+0x230e7] FT_Done_Face+0x67
C [fontmanager.dll+0x39c7] freeNativeResources+0x27
C [fontmanager.dll+0x483a] Java_sun_font_FreetypeFontScaler_disposeNativeScaler+0x3a
j sun.font.FreetypeFontScaler.disposeNativeScaler(J)V+0
j sun.font.FreetypeFontScaler.dispose()V+14
j sun.java2d.Disposer.clearDeferredRecords()V+40
j sun.java2d.Disposer.run()V+35
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
V [jvm.dll+0x1e7463] JavaCalls::call_helper+0x393
V [jvm.dll+0x2ccfd2] os::os_exception_wrapper+0xa2
V [jvm.dll+0x1e7811] JavaCalls::call_virtual+0x111
V [jvm.dll+0x1e787e] JavaCalls::call_virtual+0x5e
V [jvm.dll+0x15cac8] thread_entry+0xc8
V [jvm.dll+0x21c749] JavaThread::thread_main_inner+0xb9
V [jvm.dll+0x25b8a4] java_start+0xc4
C [msvcr100.dll+0x5c6de] endthreadex+0x3a
C [msvcr100.dll+0x5c788] endthreadex+0xe4
C [KERNEL32.DLL+0x173e] BaseThreadInitThunk+0x12
C [ntdll.dll+0x56911] LdrInitializeThunk+0x1f0
C [ntdll.dll+0x568bd] LdrInitializeThunk+0x19c
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package com.company;
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.io.File;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException, FontFormatException {
Font font = Font.createFont(Font.TRUETYPE_FONT, new File( " Regular.otf " ));
AffineTransform tx = new AffineTransform();
TextLayout layout = new TextLayout(font.getName(), font,
new FontRenderContext(tx, true, false));
Shape outline = layout.getOutline(tx);
System.out.println(outline.getBounds());
}
}
---------- END SOURCE ----------
- backported by
-
JDK-8172600 Fatal: Bug in native code: jfieldID class must match object
- Resolved