ICEpdf
  1. ICEpdf
  2. PDF-987

InvocationTargetException thrown when loading JBIG2 image using Levigo

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.1, 6.1, 6.1.1
    • Fix Version/s: 6.3
    • Component/s: Core/Rendering
    • Labels:
      None
    • Environment:
      Levigo

      Description

      A similar issue is reported in PDF-727. With the same PDF file the following error stack trace is thrown:

      WARNING: Problem loading JBIG2 image using Levigo:
      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.proJbig2Decode(ImageUtility.java:870)
      at org.icepdf.core.pobjects.ImageStream.jbig2Decode(ImageStream.java:724)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:351)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:293)
      at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:99)
      at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:40)
      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.RuntimeException: Can't instantiate segment class
      at com.levigo.jbig2.SegmentHeader.getSegmentData(SegmentHeader.java:405)
      at com.levigo.jbig2.JBIG2Page.createNormalPage(JBIG2Page.java:182)
      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
      Caused by: java.lang.IllegalStateException: already have a ValueNode for 0/1/0/3
      at com.levigo.jbig2.decoder.huffman.InternalNode.append(InternalNode.java:81)
      at com.levigo.jbig2.decoder.huffman.HuffmanTable.initTree(HuffmanTable.java:68)
      at com.levigo.jbig2.decoder.huffman.FixedSizeTable.<init>(FixedSizeTable.java:30)
      at com.levigo.jbig2.segments.TextRegion.symbolIDCodeLengths(TextRegion.java:892)
      at com.levigo.jbig2.segments.TextRegion.computeSymbolCodeLength(TextRegion.java:255)
      at com.levigo.jbig2.segments.TextRegion.parseHeader(TextRegion.java:153)
      at com.levigo.jbig2.segments.TextRegion.init(TextRegion.java:901)
      at com.levigo.jbig2.SegmentHeader.getSegmentData(SegmentHeader.java:400)
      ... 20 more

      The PDF content seems to be rendering fine though.

        Activity

        Hide
        Patrick Corless added a comment -

        Marking as fixed. Changes to our imaging pipeline and inclusion of updated jbig2 libraries have addressed this issue.

        Show
        Patrick Corless added a comment - Marking as fixed. Changes to our imaging pipeline and inclusion of updated jbig2 libraries have addressed this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: