ICEpdf
  1. ICEpdf
  2. PDF-649

ArrayIndexOutOfBoundsException: 0

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.3
    • Fix Version/s: 5.0.4
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      All
    • Salesforce Case Reference:

      Description

      The following error stack trace is thrown when rendering the provided customer PDF (this doesn't seem to be preventing the content from rendering):

      WARNING: Error parsing content stream.
      java.lang.ArrayIndexOutOfBoundsException: 0
      at org.icepdf.core.util.content.a.b(Unknown Source)
      at org.icepdf.core.util.content.a.a(Unknown Source)
      at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
      at org.icepdf.core.pobjects.Page.init(Page.java:368)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1039)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:722)
      1. Deutsch.1.pdf
        52 kB
        Yury Shulhat
      1. Deutsch.1.png
        114 kB

        Issue Links

          Activity

          Hide
          Patrick Corless added a comment -

          The PDF in question contains a content stream that is zero bytes long. The content parser seems to have an issue with the empty content stream and is reporting the index out of bounds error. But as Arran pointed out the error is not causing any rendering issues.

          Show
          Patrick Corless added a comment - The PDF in question contains a content stream that is zero bytes long. The content parser seems to have an issue with the empty content stream and is reporting the index out of bounds error. But as Arran pointed out the error is not causing any rendering issues.
          Hide
          Patrick Corless added a comment -

          Check in fix for both trunk and 5.0.1 branch.

          Show
          Patrick Corless added a comment - Check in fix for both trunk and 5.0.1 branch.
          Hide
          Yury Shulhat added a comment - - edited

          Hi guys, I still have the same issue in 5.1.0 Pro version. I see stacktrace similar to one from description and some images are not rendered on pages. But it works fine in 5.1.0 OS version, all images are rendered and log is clean. It seems like fix was applied for OS version only.

          Show
          Yury Shulhat added a comment - - edited Hi guys, I still have the same issue in 5.1.0 Pro version. I see stacktrace similar to one from description and some images are not rendered on pages. But it works fine in 5.1.0 OS version, all images are rendered and log is clean. It seems like fix was applied for OS version only.
          Hide
          Patrick Corless added a comment -

          No seeing an issue loading this PDF in 5.1.0 PRO. Could you post the stack trace and give a little more information on any system properties you are using and some information on the environment?

          Show
          Patrick Corless added a comment - No seeing an issue loading this PDF in 5.1.0 PRO. Could you post the stack trace and give a little more information on any system properties you are using and some information on the environment?
          Hide
          Yury Shulhat added a comment - - edited

          Please see attached Deutsch.1.pdf and Deutsch.1.png.
          We don't use any IcePDF-related system properties.
          Environment: Windows 7 x64, Java 7u21.
          Here is stacktrace:
          Oct 03, 2014 5:33:00 PM org.icepdf.core.pobjects.ImageStream <clinit>
          INFO: Levigo JBIG2 image library was not found on classpath
          Oct 03, 2014 5:33:00 PM org.icepdf.core.util.content.NContentParser parse
          WARNING: Error parsing content stream.
          java.lang.ArrayIndexOutOfBoundsException: 3039
          at org.icepdf.core.util.content.a.a(Unknown Source)
          at org.icepdf.core.util.content.a.a(Unknown Source)
          at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
          at org.icepdf.core.pobjects.Page.init(Page.java:386)
          at org.icepdf.core.pobjects.Document.getPageImage(Document.java:1105)
          at epam.Stager.saveImages(Stager.java:122)
          at epam.Stager.main(Stager.java:88)

          Show
          Yury Shulhat added a comment - - edited Please see attached Deutsch.1.pdf and Deutsch.1.png. We don't use any IcePDF-related system properties. Environment: Windows 7 x64, Java 7u21. Here is stacktrace: Oct 03, 2014 5:33:00 PM org.icepdf.core.pobjects.ImageStream <clinit> INFO: Levigo JBIG2 image library was not found on classpath Oct 03, 2014 5:33:00 PM org.icepdf.core.util.content.NContentParser parse WARNING: Error parsing content stream. java.lang.ArrayIndexOutOfBoundsException: 3039 at org.icepdf.core.util.content.a.a(Unknown Source) at org.icepdf.core.util.content.a.a(Unknown Source) at org.icepdf.core.util.content.NContentParser.parse(Unknown Source) at org.icepdf.core.pobjects.Page.init(Page.java:386) at org.icepdf.core.pobjects.Document.getPageImage(Document.java:1105) at epam.Stager.saveImages(Stager.java:122) at epam.Stager.main(Stager.java:88)
          Hide
          Patrick Corless added a comment -

          Thanks for posting the file. I've created a new issue of this, http://jira.icesoft.org/browse/PDF-823 . I fix for it will be in our next patch release.

          Show
          Patrick Corless added a comment - Thanks for posting the file. I've created a new issue of this, http://jira.icesoft.org/browse/PDF-823 . I fix for it will be in our next patch release.

            People

            • Assignee:
              Patrick Corless
              Reporter:
              Arran Mccullough
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: