ICEpdf
  1. ICEpdf
  2. PDF-663

ClassCastException in PColorSpace

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.3
    • Fix Version/s: 5.0.4
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      JRE 1.7.0_15, Windows 7

      Description

      The attached PDF file is shown as blank in the viewer and throws an exception:

      java.lang.ClassCastException: org.icepdf.core.pobjects.Reference cannot be cast to java.util.HashMap
        at org.icepdf.core.pobjects.graphics.PColorSpace.getColorSpace(PColorSpace.java:97)
        at org.icepdf.core.pobjects.Resources.getColorSpace(Resources.java:92)
        at org.icepdf.core.util.content.AbstractContentParser.consume_cs(AbstractContentParser.java:241)
        at org.icepdf.core.util.content.OContentParser.parseText(OContentParser.java:921)
        at org.icepdf.core.util.content.OContentParser.parse(OContentParser.java:179)
        at org.icepdf.core.pobjects.Page.init(Page.java:368)
      at org.icepdf.ri.common.views.PageViewComponentImpl$PageInitializer.run(PageViewComponentImpl.java:1039)
        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)

        Activity

        Hide
        Patrick Corless added a comment -

        I wasn't able to duplicate the class cast exception but this document has some shared object that are used on each pages and uses crypt filters. Definitely looking at some concurrency issue.

        Show
        Patrick Corless added a comment - I wasn't able to duplicate the class cast exception but this document has some shared object that are used on each pages and uses crypt filters. Definitely looking at some concurrency issue.
        Hide
        Patrick Corless added a comment -

        Tightened up some locking on the StandardSecurityHandler as well the PcolorSpace class. This seems to have significantly reduced the occurrence of any empty byte[] after a stream has been decrypted and decoded. Applied patch to trunk and 5.0.1 branch.

        Show
        Patrick Corless added a comment - Tightened up some locking on the StandardSecurityHandler as well the PcolorSpace class. This seems to have significantly reduced the occurrence of any empty byte[] after a stream has been decrypted and decoded. Applied patch to trunk and 5.0.1 branch.
        Hide
        Patrick Corless added a comment -

        Marking resolved.

        Show
        Patrick Corless added a comment - Marking resolved.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: