[
https://issues.apache.org/jira/browse/PDFBOX-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tilman Hausherr updated PDFBOX-2265:
------------------------------------
Attachment: igalia-header-proof.pdf
> ArrayIndexOutOfBoundsException in PDICCBased.loadICCProfile
> -----------------------------------------------------------
>
> Key: PDFBOX-2265
> URL: https://issues.apache.org/jira/browse/PDFBOX-2265
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing
> Affects Versions: 2.0.0
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Fix For: 2.0.0
>
> Attachments: igalia-header-proof.pdf
>
>
> I get this exception with the attached file:
> {code}
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.loadICCProfile(PDICCBased.java:116)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.<init>(PDICCBased.java:84)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:135)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:55)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceN.<init>(PDDeviceN.java:87)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:123)
> at
> org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.create(PDColorSpace.java:55)
> at
> org.apache.pdfbox.pdmodel.graphics.shading.PDShading.getColorSpace(PDShading.java:212)
> {code}
> The cause is this line:
> {code}
> float[] initial = new float[getColorSpaceType()];
> {code}
> replacing it with this line that makes more sense
> {code}
> float[] initial = new float[getNumberOfComponents()];
> {code}
> gets rid of the exception. I assume that this is a typo, i.e. wrong line was
> hit in the IDE in the popup.
> The file now renders without exception. There's a different exception in 1.8,
> I'll recheck the file after all the shading changes (including several
> bugfixes) have been implemented there.
--
This message was sent by Atlassian JIRA
(v6.2#6252)