Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      ICEpdf 2.7.1
    • Assignee Priority:
      P1

      Description

      EXCEPTION: java.lang.RuntimeException: LZWDecode failure
      java.lang.RuntimeException: LZWDecode failure
              at ice.pdf.v.a(Unknown Source)
              at ice.pdf.s.c(Unknown Source)
              at ice.pdf.s.read(Unknown Source)
              at ice.pdf.s.read(Unknown Source)
              at ice.pdf.i.b(Unknown Source)
              at ice.pdf.i.b(Unknown Source)
              at ice.pdf.i.a(Unknown Source)
              at ice.pdf.i.a(Unknown Source)
              at ice.pdf.q.a(Unknown Source)
              at ice.pdf.am.a(Unknown Source)
              at ice.pdf.am.a(Unknown Source)
              at com.icesoft.pdf.pobjects.Page.init(Unknown Source)
              at ice.pdf.ak.run(Unknown Source)
              at ice.pdf.cs.run(Unknown Source)
              at java.lang.Thread.run(Thread.java:619)
      1. ATLIS.pdf
        63 kB
        Tyler Johnson

        Activity

        Hide
        Patrick Corless added a comment -

        Took a very quick look at the attached file. The header image is throwing the exception when reading the core images stream. I'll have to look closer but I suspect it is malformed or there is a stream start offset issue.

        the error is also coming right out of core java, so it should be an interesting problem.

        Show
        Patrick Corless added a comment - Took a very quick look at the attached file. The header image is throwing the exception when reading the core images stream. I'll have to look closer but I suspect it is malformed or there is a stream start offset issue. the error is also coming right out of core java, so it should be an interesting problem.
        Hide
        Mark Collette added a comment -

        Added support for LZWDecode's earlyChange decode parameter. Apparently there's an off-by-one difference in how two different typical LZW algorithms work. PDF works around this by including the earlyChange decode parameter, so that LZWDecode implementations can know which of the two algorithms to employ. The attached PDF exhibits the non-default value for this parameter, requiring support for the second algorithm, which we had not previously supported. Now we do.

        Subversion 19195
        core\src\org\icepdf\core\pobjects\filters\LZWDecode.java
        core\src\org\icepdf\core\pobjects\Stream.java

        Show
        Mark Collette added a comment - Added support for LZWDecode's earlyChange decode parameter. Apparently there's an off-by-one difference in how two different typical LZW algorithms work. PDF works around this by including the earlyChange decode parameter, so that LZWDecode implementations can know which of the two algorithms to employ. The attached PDF exhibits the non-default value for this parameter, requiring support for the second algorithm, which we had not previously supported. Now we do. Subversion 19195 core\src\org\icepdf\core\pobjects\filters\LZWDecode.java core\src\org\icepdf\core\pobjects\Stream.java
        Hide
        Mark Collette added a comment -

        It took a bit of effort to track down what earlyChange meant to the PDF specification, and how it generally affects the algorithm, and then apply that change to our implementation of the algorithm. I had to look at several LZW algorithms (at higher and lower levels) to understand what was going on, how things worked, and what needed to be done.

        Show
        Mark Collette added a comment - It took a bit of effort to track down what earlyChange meant to the PDF specification, and how it generally affects the algorithm, and then apply that change to our implementation of the algorithm. I had to look at several LZW algorithms (at higher and lower levels) to understand what was going on, how things worked, and what needed to be done.
        Hide
        Patrick Corless added a comment -

        ICEpdf 3.1.0 has been released, closing issues.

        Show
        Patrick Corless added a comment - ICEpdf 3.1.0 has been released, closing issues.

          People

          • Assignee:
            Mark Collette
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: