[
https://issues.apache.org/jira/browse/PDFBOX-6085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18032039#comment-18032039
]
Constantine Dokolas commented on PDFBOX-6085:
---------------------------------------------
All this is excellent news. Thanks for resolving this.
As a side-note concerning this piece of code, we also came across this error at
about the same time:
{noformat}
Caused by: java.lang.IndexOutOfBoundsException: Range [0, 0 + 1335) out of
bounds for length 92
at
java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
~[?:?]
at
java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromIndexSize(Preconditions.java:82)
~[?:?]
at
java.base/jdk.internal.util.Preconditions.checkFromIndexSize(Preconditions.java:361)
~[?:?]
at java.base/java.util.Objects.checkFromIndexSize(Objects.java:413)
~[?:?]
at
java.base/java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:129)
~[?:?]
at
org.apache.fontbox.ttf.TTFSubsetter.buildGlyfTable(TTFSubsetter.java:705)
~[fontbox-3.0.5.jar:3.0.5]
at
org.apache.fontbox.ttf.TTFSubsetter.writeToStream(TTFSubsetter.java:1030)
~[fontbox-3.0.5.jar:3.0.5]
at
org.apache.pdfbox.pdmodel.font.TrueTypeEmbedder.subset(TrueTypeEmbedder.java:346)
~[pdfbox-3.0.5.jar:3.0.5]
at
org.apache.pdfbox.pdmodel.font.PDType0Font.subset(PDType0Font.java:304)
~[pdfbox-3.0.5.jar:3.0.5]
at
org.apache.pdfbox.pdmodel.PDDocument.subsetDesignatedFonts(PDDocument.java:1064)
~[pdfbox-3.0.5.jar:3.0.5]
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:1052)
~[pdfbox-3.0.5.jar:3.0.5]
at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:974)
~[pdfbox-3.0.5.jar:3.0.5]{noformat}
This has come up only once and we were unable to try to reproduce this because
of technical reasons. Additionally, the next time the workload was executed
everything worked fine.
There is, unfortunately, no more information to offer. I'm just mentioning this
because you just looked at this code and you may be in a position to locate and
fix an additional bug (if it exists at all). Or maybe this is fixed as well now.
Thanks for everything and keep-up the good work,
Constantine
> TTFSubsetter.buildGlyfTable() modifies glyphIds while iterating over its
> entries possibly causing ConcurrentModificationException to be thrown
> ----------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: PDFBOX-6085
> URL: https://issues.apache.org/jira/browse/PDFBOX-6085
> Project: PDFBox
> Issue Type: Bug
> Affects Versions: 2.0.35, 3.0.6 PDFBox
> Reporter: Constantine Dokolas
> Priority: Major
>
> Modifying a {{TreeSet}} while iterating over its members is prohibited as it
> may throw a {{ConcurrentModificationException}} if the set is actually
> modified.
> This can be observed during subsetting some fonts, e.g. Devanagari
> (NotoSansDevanagari).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]