ICEpdf
  1. ICEpdf
  2. PDF-675

Problem loading JBIG2 image - InvocationTargetException

    Details

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

      Description

      This is a similar error to what was reported in PDF-622. There are two different error stack traces depending on what JBig2 library is used:

      JPedal:
      WARNING: Levigo JBIG2 image library could not be found
      Oct 31, 2013 12:51:16 PM org.icepdf.core.pobjects.ImageStream jbig2Decode
      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:601)
      at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:780)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:70)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      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)
      Caused by: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1728
      at java.util.BitSet.get(BitSet.java:615)
      at org.jpedal.jbig2.image.JBIG2Bitmap.getPixel(JBIG2Bitmap.java:1030)
      at org.jpedal.jbig2.image.JBIG2Bitmap.duplicateRow(JBIG2Bitmap.java:887)
      at org.jpedal.jbig2.image.JBIG2Bitmap.readBitmap(JBIG2Bitmap.java:290)
      at org.jpedal.jbig2.segment.region.generic.GenericRegionSegment.readSegment(GenericRegionSegment.java:157)
      at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegments(JBIG2StreamDecoder.java:432)
      at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.decodeJBIG2(JBIG2StreamDecoder.java:174)
      at org.jpedal.jbig2.JBIG2Decoder.decodeJBIG2(JBIG2Decoder.java:148)
      ... 14 more

      Levigo:
      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:601)
      at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:737)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:70)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      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)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: -216
      at com.levigo.jbig2.Bitmap.getByte(Bitmap.java:122)
      at com.levigo.jbig2.segments.GenericRegion.copyLineAbove(GenericRegion.java:292)
      at com.levigo.jbig2.segments.GenericRegion.getRegionBitmap(GenericRegion.java:208)
      at com.levigo.jbig2.JBIG2Page.createNormalPage(JBIG2Page.java:184)
      at com.levigo.jbig2.JBIG2Page.createPage(JBIG2Page.java:154)
      at com.levigo.jbig2.JBIG2Page.composePageBitmap(JBIG2Page.java:145)
      at com.levigo.jbig2.JBIG2Page.getBitmap(JBIG2Page.java:125)
      at com.levigo.jbig2.JBIG2ImageReader.read(JBIG2ImageReader.java:223)
      at javax.imageio.ImageReader.read(ImageReader.java:940)
      ... 14 more

      With the provided PDF file the error occurs when viewing the 3rd page.

        Activity

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000XPlI2AAL
        Arran Mccullough made changes -
        Description This is a similar error to what was reported in PDF-622. There are two different error stack traces depending on what JBig2 library is used:

        JPedal:
        WARNING: Levigo JBIG2 image library could not be found
        Oct 31, 2013 12:51:16 PM org.icepdf.core.pobjects.ImageStream jbig2Decode
        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:601)
        at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:780)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:70)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        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)
        Caused by: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1728
        at java.util.BitSet.get(BitSet.java:615)
        at org.jpedal.jbig2.image.JBIG2Bitmap.getPixel(JBIG2Bitmap.java:1030)
        at org.jpedal.jbig2.image.JBIG2Bitmap.duplicateRow(JBIG2Bitmap.java:887)
        at org.jpedal.jbig2.image.JBIG2Bitmap.readBitmap(JBIG2Bitmap.java:290)
        at org.jpedal.jbig2.segment.region.generic.GenericRegionSegment.readSegment(GenericRegionSegment.java:157)
        at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegments(JBIG2StreamDecoder.java:432)
        at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.decodeJBIG2(JBIG2StreamDecoder.java:174)
        at org.jpedal.jbig2.JBIG2Decoder.decodeJBIG2(JBIG2Decoder.java:148)
        ... 14 more

        Levigo:
        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:601)
        at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:737)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:70)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        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)
        Caused by: java.lang.ArrayIndexOutOfBoundsException: -216
        at com.levigo.jbig2.Bitmap.getByte(Bitmap.java:122)
        at com.levigo.jbig2.segments.GenericRegion.copyLineAbove(GenericRegion.java:292)
        at com.levigo.jbig2.segments.GenericRegion.getRegionBitmap(GenericRegion.java:208)
        at com.levigo.jbig2.JBIG2Page.createNormalPage(JBIG2Page.java:184)
        at com.levigo.jbig2.JBIG2Page.createPage(JBIG2Page.java:154)
        at com.levigo.jbig2.JBIG2Page.composePageBitmap(JBIG2Page.java:145)
        at com.levigo.jbig2.JBIG2Page.getBitmap(JBIG2Page.java:125)
        at com.levigo.jbig2.JBIG2ImageReader.read(JBIG2ImageReader.java:223)
        at javax.imageio.ImageReader.read(ImageReader.java:940)
        ... 14 more
        This is a similar error to what was reported in PDF-622. There are two different error stack traces depending on what JBig2 library is used:

        JPedal:
        WARNING: Levigo JBIG2 image library could not be found
        Oct 31, 2013 12:51:16 PM org.icepdf.core.pobjects.ImageStream jbig2Decode
        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:601)
        at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:780)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:70)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        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)
        Caused by: java.lang.IndexOutOfBoundsException: bitIndex < 0: -1728
        at java.util.BitSet.get(BitSet.java:615)
        at org.jpedal.jbig2.image.JBIG2Bitmap.getPixel(JBIG2Bitmap.java:1030)
        at org.jpedal.jbig2.image.JBIG2Bitmap.duplicateRow(JBIG2Bitmap.java:887)
        at org.jpedal.jbig2.image.JBIG2Bitmap.readBitmap(JBIG2Bitmap.java:290)
        at org.jpedal.jbig2.segment.region.generic.GenericRegionSegment.readSegment(GenericRegionSegment.java:157)
        at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.readSegments(JBIG2StreamDecoder.java:432)
        at org.jpedal.jbig2.decoders.JBIG2StreamDecoder.decodeJBIG2(JBIG2StreamDecoder.java:174)
        at org.jpedal.jbig2.JBIG2Decoder.decodeJBIG2(JBIG2Decoder.java:148)
        ... 14 more

        Levigo:
        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:601)
        at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:737)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:362)
        at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:295)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:70)
        at org.icepdf.core.pobjects.graphics.ImageStreamReference.call(ImageStreamReference.java:39)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        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)
        Caused by: java.lang.ArrayIndexOutOfBoundsException: -216
        at com.levigo.jbig2.Bitmap.getByte(Bitmap.java:122)
        at com.levigo.jbig2.segments.GenericRegion.copyLineAbove(GenericRegion.java:292)
        at com.levigo.jbig2.segments.GenericRegion.getRegionBitmap(GenericRegion.java:208)
        at com.levigo.jbig2.JBIG2Page.createNormalPage(JBIG2Page.java:184)
        at com.levigo.jbig2.JBIG2Page.createPage(JBIG2Page.java:154)
        at com.levigo.jbig2.JBIG2Page.composePageBitmap(JBIG2Page.java:145)
        at com.levigo.jbig2.JBIG2Page.getBitmap(JBIG2Page.java:125)
        at com.levigo.jbig2.JBIG2ImageReader.read(JBIG2ImageReader.java:223)
        at javax.imageio.ImageReader.read(ImageReader.java:940)
        ... 14 more

        With the provided PDF file the error occurs when viewing the 3rd page.
        Patrick Corless made changes -
        Fix Version/s 5.0.5 [ 11373 ]
        Arran Mccullough made changes -
        Salesforce Case Reference 5007000000XPlI2AAL 5007000000Y1J1dAAF,5007000000XPlI2AAL
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: