ICEpdf
  1. ICEpdf
  2. PDF-914

Problem loading JBIG2 image - ArrayIndexOutOfBoundsException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.1.2
    • Fix Version/s: 6.0.1
    • Component/s: Core/Rendering
    • Labels:
      None
    • Environment:
      JPedal JBIG2

      Description

      With the provided PDF file the following exception is thrown and the image is rendered incorrectly:

      WARNING: Problem loading JBIG2 image:
      java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.icepdf.core.pobjects.ImageUtility.jbig2Decode(ImageUtility.java:727)
      at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:635)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:348)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:291)
      at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:98)
      at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:39)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      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:745)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
      at org.jpedal.jbig2.io.StreamReader.readByte(StreamReader.java:93)
      at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.handleSegmentNumber(JBIG2StreamDecoder.java:506)
      at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegmentHeader(JBIG2StreamDecoder.java:472)
      at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegments(JBIG2StreamDecoder.java:225)
      at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.decodeJBIG2(JBIG2StreamDecoder.java:134)
      at org.jpedal.jbig2.JBIG2Decoder.decodeJBIG2(JBIG2Decoder.java:148)
      ... 14 more

      Using the Levigo library on the classpath doesn't have this issue.

        Activity

        Hide
        Patrick Corless added a comment -

        PRO version loads this file correctly.

        Show
        Patrick Corless added a comment - PRO version loads this file correctly.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: