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

        Alex Alishevskikh created issue -
        Alex Alishevskikh made changes -
        Field Original Value New Value
        Attachment Employee Feedback and the Board.pdf [ 16483 ]
        Patrick Corless made changes -
        Fix Version/s 5.0.4 [ 11072 ]
        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.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38250 Fri Sep 20 14:32:11 MDT 2013 patrick.corless PDF-663 fixed a concurrency issue when loading shared page resources that can streams encrypted with crypt filters.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/viewer/src/org/icepdf/ri/common/views/PageViewComponentImpl.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/PColorSpace.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/security/StandardSecurityHandler.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38251 Fri Sep 20 14:32:25 MDT 2013 patrick.corless PDF-663 fixed a concurrency issue when loading shared page resources that can streams encrypted with crypt filters.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/security/StandardSecurityHandler.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/viewer/src/org/icepdf/ri/common/views/PageViewComponentImpl.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/PColorSpace.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38300 Fri Sep 27 15:40:32 MDT 2013 patrick.corless PDF-663 removed sync call on getColorspace.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/PColorSpace.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: