You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2022/05/05 16:23:00 UTC

[jira] [Comment Edited] (PDFBOX-5143) Refactor/Simplify CFF parsing

    [ https://issues.apache.org/jira/browse/PDFBOX-5143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17532396#comment-17532396 ] 

Tilman Hausherr edited comment on PDFBOX-5143 at 5/5/22 4:22 PM:
-----------------------------------------------------------------

{noformat}
java.util.ConcurrentModificationException
	at java.util.ArrayList.forEach(ArrayList.java:1262)
	at org.apache.fontbox.cff.Type1CharString.handleSequence(Type1CharString.java:168)
	at org.apache.fontbox.cff.Type1CharString.render(Type1CharString.java:157)
	at org.apache.fontbox.cff.Type1CharString.getPath(Type1CharString.java:134)
	at org.apache.fontbox.cff.CFFType1Font.getPath(CFFType1Font.java:65)
	at org.apache.pdfbox.pdmodel.font.PDType1CFont.getPath(PDType1CFont.java:178)
{noformat}
this happens if the {{type1Sequence}} list is modified within {{foreach}}. Which can happen in {{Type2CharString.addCommand()}}. But I wonder why this never made problems in the deleted {{CharStringHandler.handleSequence()}} ?!


was (Author: tilman):
{noformat}
java.util.ConcurrentModificationException
	at java.util.ArrayList.forEach(ArrayList.java:1262)
	at org.apache.fontbox.cff.Type1CharString.handleSequence(Type1CharString.java:168)
	at org.apache.fontbox.cff.Type1CharString.render(Type1CharString.java:157)
	at org.apache.fontbox.cff.Type1CharString.getPath(Type1CharString.java:134)
	at org.apache.fontbox.cff.CFFType1Font.getPath(CFFType1Font.java:65)
	at org.apache.pdfbox.pdmodel.font.PDType1CFont.getPath(PDType1CFont.java:178)
{noformat}
this happens if the {{type1Sequence}} list is modified within {{foreach}}. Which can happen in Type2CharString.addCommand(). But I wonder why this never made problems in the deleted {{CharStringHandler.handleSequence()}} ?!

> Refactor/Simplify CFF parsing
> -----------------------------
>
>                 Key: PDFBOX-5143
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5143
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: FontBox
>    Affects Versions: 3.0.0 PDFBox
>            Reporter: Andreas Lehmkühler
>            Assignee: Andreas Lehmkühler
>            Priority: Major
>             Fix For: 3.0.0 PDFBox
>
>         Attachments: evince-bug431088.pdf
>
>
> The classes used for the parsing of CFF-based fonts have some room for improvements w.r.t. the memory footprint, the complexity of the code and the test coverage.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org