xmlgraphics-fop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Steiner (Jira)" <j...@apache.org>
Subject [jira] [Updated] (FOP-2977) [PATCH] Array index out of bounds with glyph position adjustments and surrogate pairs
Date Fri, 06 Nov 2020 16:26:00 GMT

     [ https://issues.apache.org/jira/browse/FOP-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Simon Steiner updated FOP-2977:
-------------------------------
    Summary: [PATCH] Array index out of bounds with glyph position adjustments and surrogate
pairs  (was: Array index out of bounds with glyph position adjustments and surrogate pairs)

> [PATCH] Array index out of bounds with glyph position adjustments and surrogate pairs
> -------------------------------------------------------------------------------------
>
>                 Key: FOP-2977
>                 URL: https://issues.apache.org/jira/browse/FOP-2977
>             Project: FOP
>          Issue Type: Bug
>          Components: renderer/pdf
>    Affects Versions: trunk
>         Environment: Windows 10
>            Reporter: Kelly H Wilkerson
>            Priority: Minor
>         Attachments: arrayindex.patch, drawTextWithDX.patch, input.fo
>
>
> Out of bounds happens in org.apache.fop.fonts.GlyphMapping.processWordMapping when:
> # There are glyph position adjustments for the font being used
> # There are surrogate pairs in the text that has adjustments
> The font I've used to reproduce the issue so far is Segoe UI Emoji, which should be installed
on Windows 10 by default.
> input.fo attached to cause the crash.
> I believe I've fixed the crash in the attached patch.
> There's a separate issue demonstrated in the input.fo that the glyphs don't render in
some cases, even though the font is the same throughout everything. But I'd like to make sure
my fix for the crash is correct before I dig into the rendering issue.
> {code:java}
> org.apache.fop.apps.FOPException: java.lang.ArrayIndexOutOfBoundsException: 3
> javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: 3
> 	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:296)
> 	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:116)
> 	at org.apache.fop.cli.Main.startFOP(Main.java:183)
> 	at org.apache.fop.cli.Main.main(Main.java:214)
> Caused by: javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException:
3
> 	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:737)
> 	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:343)
> 	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:293)
> 	... 3 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
> 	at org.apache.fop.fonts.GlyphMapping.processWordMapping(GlyphMapping.java:177)
> 	at org.apache.fop.fonts.GlyphMapping.doGlyphMapping(GlyphMapping.java:92)
> 	at org.apache.fop.layoutmgr.inline.TextLayoutManager.processWord(TextLayoutManager.java:963)
> 	at org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:881)
> 	at org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:698)
> 	at org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:627)
> 	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
> 	at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:292)
> 	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
> 	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
> 	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextChildElements(BlockLayoutManager.java:141)
> 	at org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:292)
> 	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
> 	at org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:105)
> 	at org.apache.fop.layoutmgr.FlowLayoutManager.getNextChildElements(FlowLayoutManager.java:223)
> 	at org.apache.fop.layoutmgr.FlowLayoutManager.addChildElements(FlowLayoutManager.java:148)
> 	at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:116)
> 	at org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:69)
> 	at org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:252)
> 	at org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:675)
> 	at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:179)
> 	at org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:159)
> 	at org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:385)
> 	at org.apache.fop.layoutmgr.PageBreaker.doLayout(PageBreaker.java:113)
> 	at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:143)
> 	at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
> 	at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:139)
> 	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:362)
> 	at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
> 	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:265)
> 	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
> 	at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:659)
> 	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:728)
> 	... 5 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message