You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/08/08 17:00:22 UTC
[jira] [Commented] (PDFBOX-2265) ArrayIndexOutOfBoundsException in
PDICCBased.loadICCProfile
[ https://issues.apache.org/jira/browse/PDFBOX-2265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14090838#comment-14090838 ]
ASF subversion and git services commented on PDFBOX-2265:
---------------------------------------------------------
Commit 1616790 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1616790 ]
PDFBOX-2265: fix probable typo in IDE to avoid ArrayIndexOutOfBoundsException
> 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)