United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6195047 hinting engine is not correctly initialized with Bar39, Bar25i and related fonts
JDK-6195047 : hinting engine is not correctly initialized with Bar39, Bar25i and related fonts

Details
Type:
Bug
Submit Date:
2004-11-13
Status:
Resolved
Updated Date:
2010-12-06
Project Name:
JDK
Resolved Date:
2005-06-27
Component:
client-libs
OS:
windows_xp
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2
Fixed Versions:

Related Reports
Backport:
Backport:

Sub Tasks

Description
A crash occurs in the native font code when loading fonts Bar39, Bar25i and similar fonts (the problematic font bundle is attached to this bug report)

A crash is reproducible with the JBuilder application and JDK standalone.
Reproducible with JDK 1.4.2 and 1.5.0

The crash is as follows:

Scanning font Aharoni, scanned 0 out of 113 fonts
Scanning font Akzidenz Grotesk CE Light, scanned 1 out of 113 fonts
Scanning font Akzidenz Grotesk CE Roman, scanned 2 out of 113 fonts
Scanning font Akzidenz Grotesk Light, scanned 3 out of 113 fonts
Scanning font Akzidenz Grotesk Roman, scanned 4 out of 113 fonts
Scanning font AkzidenzGrotesk, scanned 5 out of 113 fonts
Scanning font AkzidenzGroteskCE, scanned 6 out of 113 fonts
Scanning font Andalus, scanned 7 out of 113 fonts
Scanning font Angsana New, scanned 8 out of 113 fonts
Scanning font AngsanaUPC, scanned 9 out of 113 fonts
Scanning font Arabic Transparent, scanned 10 out of 113 fonts
Scanning font Arial, scanned 11 out of 113 fonts
Scanning font Arial Black, scanned 12 out of 113 fonts
Scanning font Arial Narrow, scanned 13 out of 113 fonts
Scanning font Arial Unicode MS, scanned 14 out of 113 fonts
Scanning font Bar Code 39, scanned 15 out of 113 fonts

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at
PC=0x77F83907
Function=[Unknown.]
Library=C:\WINNT\System32\ntdll.dll

NOTE: We are unable to locate the function name symbol for the error
      just occurred. Please refer to release documentation for possible
      reason and solutions.


Current Java thread:
	at sun.awt.font.NativeFontWrapper.canDisplay(Native Method)
	- locked <0x2045f6a0> (a java.lang.Class)
	at java.awt.Font.canDisplay(Font.java:1399)
	at com.borland.primetime.editor.xd.a(Unknown Source)
	at com.borland.primetime.editor.zd.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:534)

Dynamic libraries:
0x00400000 - 0x0041B000
C:\Local\Borland\JBuilderXEnt_10.0\bin\JBuilder.exe
0x77F50000 - 0x77FF7000 	C:\WINNT\System32\ntdll.dll
0x77E60000 - 0x77F46000 	C:\WINNT\system32\kernel32.dll
0x77DD0000 - 0x77E5D000 	C:\WINNT\system32\ADVAPI32.DLL
0x78000000 - 0x78087000 	C:\WINNT\system32\RPCRT4.dll
0x71AD0000 - 0x71AD8000 	C:\WINNT\System32\WSOCK32.DLL
0x71AB0000 - 0x71AC5000 	C:\WINNT\System32\WS2_32.dll
0x77C10000 - 0x77C63000 	C:\WINNT\system32\msvcrt.dll
0x71AA0000 - 0x71AA8000 	C:\WINNT\System32\WS2HELP.dll
0x77D40000 - 0x77DC6000 	C:\WINNT\system32\USER32.DLL
0x7E090000 - 0x7E0D1000 	C:\WINNT\system32\GDI32.dll
0x76390000 - 0x763AC000 	C:\WINNT\System32\IMM32.DLL
0x629C0000 - 0x629C8000 	C:\WINNT\System32\LPK.DLL
0x72FA0000 - 0x72FFA000 	C:\WINNT\System32\USP10.dll
0x08000000 - 0x08136000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\client\jvm.dll
0x76B40000 - 0x76B6C000 	C:\WINNT\System32\WINMM.dll
0x10000000 - 0x10007000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\hpi.dll
0x003C0000 - 0x003CE000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\verify.dll
0x003D0000 - 0x003E8000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\java.dll
0x003F0000 - 0x003FD000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\zip.dll
0x03D70000 - 0x03E7F000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\awt.dll
0x73000000 - 0x73023000 	C:\WINNT\System32\WINSPOOL.DRV
0x771B0000 - 0x772D4000 	C:\WINNT\system32\ole32.dll
0x03E90000 - 0x03EE0000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\fontmanager.dll
0x73760000 - 0x737A4000 	C:\WINNT\System32\ddraw.dll
0x73BC0000 - 0x73BC6000 	C:\WINNT\System32\DCIMAN32.dll
0x73940000 - 0x73A07000 	C:\WINNT\System32\D3DIM700.DLL
0x07110000 - 0x0713B000 	C:\WINNT\System32\msctfime.ime
0x07B40000 - 0x07B4F000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\net.dll
0x71A50000 - 0x71A8B000 	C:\WINNT\System32\mswsock.dll
0x76F20000 - 0x76F45000 	C:\WINNT\System32\DNSAPI.dll
0x76FB0000 - 0x76FB7000 	C:\WINNT\System32\winrnr.dll
0x76F60000 - 0x76F8C000 	C:\WINNT\system32\WLDAP32.dll
0x76FC0000 - 0x76FC5000 	C:\WINNT\System32\rasadhlp.dll
0x71A90000 - 0x71A98000 	C:\WINNT\System32\wshtcpip.dll
0x746F0000 - 0x74716000 	C:\WINNT\System32\Msimtf.dll
0x74720000 - 0x74764000 	C:\WINNT\System32\MSCTF.dll
0x75F40000 - 0x75F5F000 	C:\WINNT\system32\Apphelp.dll
0x0A240000 - 0x0A262000
C:\Local\Borland\JBuilderXEnt_10.0\jdk1.4\jre\bin\dcpr.dll
0x76C90000 - 0x76CB2000 	C:\WINNT\system32\imagehlp.dll
0x76BF0000 - 0x76BFB000 	C:\WINNT\System32\PSAPI.DLL

Heap at VM Abort:
Heap
 def new generation   total 2304K, used 544K [0x10010000, 0x10290000,
0x113c0000)
  eden space 2048K,  14% used [0x10010000, 0x100580a0, 0x10210000)
  from space 256K, 100% used [0x10250000, 0x10290000, 0x10290000)
  to   space 256K,   0% used [0x10210000, 0x10210000, 0x10250000)
 tenured generation   total 30272K, used 21106K [0x113c0000, 0x13150000,
0x20010000)
   the space 30272K,  69% used [0x113c0000, 0x1285ca00, 0x1285ca00,
0x13150000)
 compacting perm gen  total 28672K, used 28509K [0x20010000, 0x21c10000,
0x24010000)
   the space 28672K,  99% used [0x20010000, 0x21be7730, 0x21be7800,
0x21c10000)

Local Time = Wed Sep 22 15:14:41 2004
Elapsed Time = 19
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_01-b06 mixed mode)
#
# An error report file has been saved as
C:\DOCUME~1\pwheeler\LOCALS~1\Temp\hs_err_pid660.log.
# Please refer to the file for further information.
#
###@###.### 2004-11-13 00:20:09 GMT

                                    

Comments
EVALUATION

There are several problems causing crashes. 

For Bar39 we crash because heuristics fail to initialize xWeight and 
yWeight in computeGlobalHints() (Bar39 has very atypical set defined glyphs).

However, this does not help for case of Bar25i. 
Finding reason is not easy because i am able to reproduce 
crash with Bar25 only on release builds. Need more investigation.
###@###.### 2004-11-13 11:22:03 GMT

Due to specifics of barcode fonts there are several problems in t2k:
  - autogriding code may fail to find any horisontal or vertical stems
     for some glyphs. This leads to xWeight or yWeight being not initialized.
  - sometimes it might find too many links (candidates for being stem)
    This may lead to getting out of bounds of links array.
     (For example this happens for some glyphs in bar25 family of fonts)

The solution is to add checks for corner cases and initialize xWeight/yWeight with default values, to add bound checks for links array and to fix auxilary sort function to work with arrays of zero size.

###@###.### 2005-05-24 15:05:24 GMT
                                     
2004-11-13



Hardware and Software, Engineered to Work Together