Bug 41117 - ArrayIndexOutOfBoundsException if embed-url refers to XML file
Summary: ArrayIndexOutOfBoundsException if embed-url refers to XML file
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: fonts (show other bugs)
Version: trunk
Hardware: Other other
: P2 minor
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-06 09:33 UTC by Chris Bowditch
Modified: 2012-04-01 06:40 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bowditch 2006-12-06 09:33:37 UTC
I accidentally created a font entry in my configuration file which had the 
embed-url referencing the metrics file. Very silly mistake I know, but it took 
me ages to find it because FOP just throws up a stack trace. A minor problem, 
but one worth noting I think. Anyway, heres the Stack trace:

java.lang.ArrayIndexOutOfBoundsException: 2381
        at org.apache.fop.fonts.truetype.FontFileReader.read
(FontFileReader.java
:141)
        at org.apache.fop.fonts.truetype.FontFileReader.readTTFByte
(FontFileRead
er.java:152)
        at org.apache.fop.fonts.truetype.TTFDirTabEntry.read
(TTFDirTabEntry.java
:41)
        at org.apache.fop.fonts.truetype.TTFFile.readDirTabs(TTFFile.java:736)
        at org.apache.fop.fonts.truetype.TTFSubSetFile.readFont
(TTFSubSetFile.ja
va:624)
        at org.apache.fop.pdf.PDFFactory.makeFontFile(PDFFactory.java:1228)
        at org.apache.fop.pdf.PDFFactory.makeFontDescriptor
(PDFFactory.java:1130
)
        at org.apache.fop.pdf.PDFFactory.makeFont(PDFFactory.java:1012)
        at org.apache.fop.pdf.PDFResources.addFonts(PDFResources.java:109)
        at org.apache.fop.render.pdf.PDFRenderer.stopRenderer
(PDFRenderer.java:4
82)
        at org.apache.fop.area.RenderPagesModel.endDocument
(RenderPagesModel.jav
a:241)
        at org.apache.fop.area.AreaTreeHandler.endDocument
(AreaTreeHandler.java:
426)
        at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:171)
        at org.apache.xalan.transformer.TransformerIdentityImpl.endDocument
(Tran
sformerIdentityImpl.java:910)
        at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown 
Sourc
e)
        at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown 
Sourc
e)
        at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
        at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
        at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.
dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
(Un
known Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xalan.transformer.TransformerIdentityImpl.transform
(Transf
ormerIdentityImpl.java:432)
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:165)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:115)
        at org.apache.fop.cli.Main.startFOP(Main.java:160)
        at org.apache.fop.cli.Main.main(Main.java:191)
Comment 1 Simon Pepping 2006-12-21 11:49:43 UTC
Fixed in revision 489448. Thanks for reporting the problem.
Comment 2 Glenn Adams 2012-04-01 06:40:28 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed