ICEpdf
  1. ICEpdf
  2. PDF-171

Document Disposal not possible during page initialization

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.2, 4.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Load a document page that takes a long time to initialize. Close the document immediately after opening. The viewer RI will appear to hang until the page(s) are done loading. Capture a stack trace to see the lock issue.

      Description

      A client has reported a thread lock issue when trying to close a document that contains pages that take a long time to initialize. See attached stack trace. The report is valid.

      When a page is loaded the page initializer thread gets a lock on the Page object. When the awt-event thread gets the command to dispose the document it can't call page.removePaintPagelistener because of the page initializer lock. Moving the add/removePaintPageListeners synchronization to the vector object gets around this issue.

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Patrick Corless made changes -
        Fix Version/s 4.1 [ 10227 ]
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Patrick Corless added a comment -

        Applied patch to the page class. Closing.

        Show
        Patrick Corless added a comment - Applied patch to the page class. Closing.
        Patrick Corless made changes -
        Fix Version/s 4.0.2 [ 10234 ]
        Fix Version/s 4.1 [ 10227 ]
        Hide
        Patrick Corless added a comment -

        Managed to reproduce the error and test the fix, all seem to be good.

        Show
        Patrick Corless added a comment - Managed to reproduce the error and test the fix, all seem to be good.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21610 Wed Jun 02 06:36:04 MDT 2010 patrick.corless PDF-171 reworked painter threading model to avoid lock when closing document that has a long running page initialization.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Page.java
        Patrick Corless made changes -
        Fix Version/s 4.1 [ 10227 ]
        Fix Version/s 4.0.2 [ 10234 ]
        Dirk Maass made changes -
        Tyler Johnson made changes -
        Salesforce Case [5007000000Ar2To]
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Component/s Core [ 10022 ]
        Fix Version/s 4.0.2 [ 10234 ]
        Patrick Corless created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved: