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

          Arran Mccullough created issue -
          Arran Mccullough made changes -
          Field Original Value New Value
          Link This issue is duplicated by PDF-728 [ PDF-728 ]
          Arran Mccullough made changes -
          Patrick Corless made changes -
          Fix Version/s 5.0.6 [ 11381 ]
          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:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: