ICEpdf
  1. ICEpdf
  2. PDF-830

EmptyStackException thrown when rendering PDF

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.1.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      All

      Description

      The following exception is thrown when rendering the provided PDF, which results in a black bar being rendered:

      WARNING: Error parsing content stream.
      java.util.EmptyStackException
      at java.util.Stack.peek(Stack.java:102)
      at java.util.Stack.pop(Stack.java:84)
      at org.icepdf.core.util.content.AbstractContentParser.consume_j(AbstractContentParser.java:711)
      at org.icepdf.core.util.content.NContentParser.parse(Unknown Source)
      at org.icepdf.core.pobjects.Page.init(Page.java:390)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1152)
      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)

        Activity

        Hide
        Patrick Corless added a comment -

        Looks like an issue with parsing a very long inline image.

        Show
        Patrick Corless added a comment - Looks like an issue with parsing a very long inline image.
        Hide
        Patrick Corless added a comment -

        This issue is related to an inline image that is encoded using [/ASCII85Decode /LZWDecode] which isn't great as regular PDF tokens can show up. I've added a check for a white space after we look for an ending know token. This avoid the premature end when parsing large inline image streams.

        Show
        Patrick Corless added a comment - This issue is related to an inline image that is encoded using [/ASCII85Decode /LZWDecode] which isn't great as regular PDF tokens can show up. I've added a check for a white space after we look for an ending know token. This avoid the premature end when parsing large inline image streams.
        Hide
        Patrick Corless added a comment -

        This issue has been fixed and is part of the 5.1.1_P02 patch and the fix is also on the trunk.

        Show
        Patrick Corless added a comment - This issue has been fixed and is part of the 5.1.1_P02 patch and the fix is also on the trunk.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: