ICEpdf
  1. ICEpdf
  2. PDF-321

Unexpected end of zlib input stream

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 5.0.0 alpha1, 5.0
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      A ICEpdf users reported an error opening the PDF file attached to the form (2_pdfsam_52313.pdf). I've taken a quick look at the problem but didn't find any immediate cause. The stream being loaded is a child of a Object Stream which might mean an offset error. Further analysis is needed.

        Issue Links

          Activity

          Patrick Corless created issue -
          Hide
          Patrick Corless added a comment -

          Pushing out.

          Show
          Patrick Corless added a comment - Pushing out.
          Patrick Corless made changes -
          Field Original Value New Value
          Salesforce Case []
          Fix Version/s 5.0 [ 10314 ]
          Fix Version/s 4.3 [ 10266 ]
          Patrick Corless made changes -
          Link This issue depends on PDF-397 [ PDF-397 ]
          Hide
          Patrick Corless added a comment -

          Another sample came in that has a similar problem. So I dug a little deeper and tried out a few other zip libraries that are out there. Unfortunately they all failed when decoding the streams in question. However they do give more information as to where the error is coming from. jzlib-1.1.1 seemed to point to a missing footer table which will be helpful when reading about how zip streams are encoded.

          We can't sub in a new zip engine on a minor release but with a little luck can fix this with an open source library and or figure out at way to add a footer to the stream. Doing some performance analysis would also be good to see which library if any is more efficient.

          Show
          Patrick Corless added a comment - Another sample came in that has a similar problem. So I dug a little deeper and tried out a few other zip libraries that are out there. Unfortunately they all failed when decoding the streams in question. However they do give more information as to where the error is coming from. jzlib-1.1.1 seemed to point to a missing footer table which will be helpful when reading about how zip streams are encoded. We can't sub in a new zip engine on a minor release but with a little luck can fix this with an open source library and or figure out at way to add a footer to the stream. Doing some performance analysis would also be good to see which library if any is more efficient.
          Patrick Corless made changes -
          Salesforce Case []
          Fix Version/s 4.5 [ 10342 ]
          Fix Version/s 5.0 [ 10314 ]
          Arran Mccullough made changes -
          Salesforce Case [5007000000NJFLU]
          Hide
          Patrick Corless added a comment -

          Added second test case to the support drive.

          Show
          Patrick Corless added a comment - Added second test case to the support drive.
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30889 Mon Sep 17 15:30:58 MDT 2012 patrick.corless PDF-321 added a catch for an IO error that occurs on a very small percentage of flatedecode encode streams. Basically the error can be eaten and the decoded stream returned.
          Files Changed
          Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/filters/ChunkingInputStream.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #30890 Mon Sep 17 15:31:08 MDT 2012 patrick.corless PDF-321 added a catch for an IO error that occurs on a very small percentage of flatedecode encode streams. Basically the error can be eaten and the decoded stream returned.
          Files Changed
          Commit graph MODIFY /icepdf/branches/icepdf-4.3.3/icepdf/core/src/org/icepdf/core/pobjects/filters/ChunkingInputStream.java
          Hide
          Patrick Corless added a comment - - edited

          Fix Version/s: 4.3.4
          (was: 4.5)
          Resolution: Fixed
          It looks like there is a long running bug with the InflaterInputStream were it will thought he EOF error under very special circumstances. The good news is that this exception can be caught and the result of the decoded stream can be kept.

          Show
          Patrick Corless added a comment - - edited Fix Version/s: 4.3.4 (was: 4.5) Resolution: Fixed It looks like there is a long running bug with the InflaterInputStream were it will thought he EOF error under very special circumstances. The good news is that this exception can be caught and the result of the decoded stream can be kept.
          Migration made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Patrick Corless made changes -
          Fix Version/s 5.0 [ 10314 ]
          Fix Version/s 4.5 [ 10342 ]
          Patrick Corless made changes -
          Fix Version/s 5.0.0 alpha1 [ 10676 ]
          Patrick Corless made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: