JDK-6471418 : StackOverflowError due to recursion at sun.font.TrueTypeFont.getTableBuffer
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0u10
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86
  • Submitted: 2006-09-15
  • Updated: 2011-03-24
  • Resolved: 2007-02-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 JDK 6 JDK 7
5.0u11 b01Fixed 6u4Fixed 7Resolved
Description
This bug is intended for java sustaining team for radiance case 64990026
(attention Vaibhav Kulkarni)

This issue is first observed with Starwood's lightspeed application
with FVB delievered on (7/17) and FVB (7/26)
Here's backgroud regarding the FVBs:

* 7/17 FVB contains fixes to :

- crashes (esc 1-17031590/CR 6259348)
- deadlock (esc 1-18423733/CR 6190373)

>Please find the build with the fix for CR 6190373 at: >http://gaurav.india.sun.com/STARWOODS/17-July-06

* 7/26 FVB:
There is no new bugid for this FVB, just a rework of the previous fix.
>http://gaurav.india.sun.com/STARWOODS/26-July-06/

* 9/13 FVB:
A new FVB was sent to Starwood that address the StackOverflow issue,
but apparently has triggered a new type of crash in IE.

data is in /net/cores.central/cores/dir31/64990026/0725

javaconsole.stackoverflow.txt:

java.lang.ThreadDeath
    at java.lang.Thread.stop(Unknown Source)
    at java.lang.ThreadGroup.stopOrSuspend(Unknown Source)
    at java.lang.ThreadGroup.stop(Unknown Source)
    at sun.awt.AppContext.dispose(Unknown Source)
    at sun.applet.AppletClassLoader.release(Unknown Source)
    at sun.plugin.security.PluginClassLoader.release(Unknown Source)
    at sun.applet.AppletPanel.release(Unknown Source)
    at sun.applet.AppletPanel.sendEvent(Unknown Source)
    at sun.plugin.AppletViewer.onPrivateClose(Unknown Source)
    at sun.plugin.AppletViewer$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
java.lang.StackOverflowError
    at java.lang.Exception.<init>(Unknown Source)
    at java.io.IOException.<init>(Unknown Source)
    at java.nio.channels.ClosedChannelException.<init>(Unknown
Source)
    at sun.nio.ch.FileChannelImpl.ensureOpen(Unknown Source)
    at sun.nio.ch.FileChannelImpl.position(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)

    <many more similiar lines deleted>

vmlog.OOM.txt:

&quot;thread applet-com.lightspeed.web.sorttable.SortTableApplet.class&quot; prio=4 tid=0x0e8947d0 nid=0xbf4 runnable [0x10e03000..0x10e5fae8]
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.&lt;init&gt;(Unknown Source)
    at java.lang.Exception.&lt;init&gt;(Unknown Source)
    at java.io.IOException.&lt;init&gt;(Unknown Source)
    at java.nio.channels.ClosedChannelException.&lt;init&gt;(Unknown Source)
    at sun.nio.ch.FileChannelImpl.ensureOpen(Unknown Source)
    at sun.nio.ch.FileChannelImpl.position(Unknown Source)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    - locked &lt;0x2134c5b0&gt; (a sun.font.TrueTypeFont)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    - locked &lt;0x2134c5b0&gt; (a sun.font.TrueTypeFont)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    - locked &lt;0x2134c5b0&gt; (a sun.font.TrueTypeFont)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    - locked &lt;0x2134c5b0&gt; (a sun.font.TrueTypeFont)
    at sun.font.TrueTypeFont.getTableBuffer(Unknown Source)
    - locked &lt;0x2134c5b0&gt; (a sun.font.TrueTypeFont)

    <many more similiar lines deleted>

Comments
EVALUATION StackOverFlowError is caused because of the recursive calls made by the getTableBuffer method in TrueTypeFont.java. These recursive calls happen when the application encounters ClosedChannelException. Prior to making the recursive call, the I/O channel is not closed.
11-10-2006