ICEpdf
  1. ICEpdf
  2. PDF-727

NullPointerException thrown from levigo library

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.5
    • Fix Version/s: 5.0.6
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Levigo JBIG2 library

      Description

      When loading the PDF provided from the customer, the following error stack trace is thrown. When removing the levigo jar from the class path the PDF renders fine without any errors.

      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:743)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:373)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:306)
      at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.java:95)
      at org.icepdf.core.pobjects.graphics.SmoothScaledImageReference.call(SmoothScaledImageReference.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.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.RuntimeException: Can't instantiate segment class
      at com.levigo.jbig2.SegmentHeader.getSegmentData(SegmentHeader.java:405)
      at com.levigo.jbig2.segments.TextRegion.initSymbols(TextRegion.java:818)
      at com.levigo.jbig2.segments.TextRegion.getSymbols(TextRegion.java:249)
      at com.levigo.jbig2.segments.TextRegion.parseHeader(TextRegion.java:151)
      at com.levigo.jbig2.segments.TextRegion.init(TextRegion.java:901)
      at com.levigo.jbig2.SegmentHeader.getSegmentData(SegmentHeader.java:400)
      ... 20 more
      Caused by: java.lang.NullPointerException
      at com.levigo.jbig2.segments.SymbolDictionary.retrieveImportSymbols(SymbolDictionary.java:816)
      at com.levigo.jbig2.segments.SymbolDictionary.setInSyms(SymbolDictionary.java:242)
      at com.levigo.jbig2.segments.SymbolDictionary.parseHeader(SymbolDictionary.java:131)
      at com.levigo.jbig2.segments.SymbolDictionary.init(SymbolDictionary.java:844)
      at com.levigo.jbig2.SegmentHeader.getSegmentData(SegmentHeader.java:400)
      ... 25 more

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #40841 Thu Apr 17 15:07:05 MDT 2014 patrick.corless PDF-727 fixed null pointer issue when getting text bounds lazily.
          Files Changed
          Commit graph MODIFY /icepdf/tags/icepdf-5.0.6/icepdf/core/src/org/icepdf/core/pobjects/graphics/text/WordPositionComparator.java
          Commit graph MODIFY /icepdf/tags/icepdf-5.0.6/icepdf/core/src/org/icepdf/core/pobjects/graphics/text/LinePositionComparator.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #40840 Thu Apr 17 15:02:16 MDT 2014 patrick.corless PDF-727 fixed null pointer issue when getting text bounds lazily.
          Files Changed
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/text/LinePositionComparator.java
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/text/WordPositionComparator.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #40802 Mon Apr 14 14:41:41 MDT 2014 patrick.corless PDF-727 fixed issue with levigo reflection class loading.
          Files Changed
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/ImageUtility.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #40801 Mon Apr 14 13:59:34 MDT 2014 patrick.corless PDF-727 updated jbig2 code to fall back to the core implementation if there was a failure trying to load the image using the levigo implementation.
          Files Changed
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/ImageStream.java
          Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/ImageUtility.java

            People

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

              Dates

              • Created:
                Updated:
                Resolved: