Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any

      Description

      The pdf posted on the forum exhibits a new or at least unreported memory leak with the ImageCache. The community members testing seems to indicate the issue has been around since at least 4.0.1. I took a little time yesterday to profile the application during the file load it looks like the ImageCache object isn't release it's buffered image reference or from another point of view the object isn't disposed off with the rest of the form object.

      My guess is that we aren't cleaning up correctly wen a pages xObject is disposed during a page dispose. It would explain why we aren't hearing a lot of noise about this issue from our supported customers.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Priority Major [ 3 ] Critical [ 2 ]
        Patrick Corless made changes -
        Salesforce Case []
        Fix Version/s 4.2 [ 10243 ]
        Patrick Corless made changes -
        Salesforce Case []
        Assignee Priority P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23971 Wed Feb 16 14:37:01 MST 2011 patrick.corless PDF-236 update the content parser so that it cleans up an Xobject stream and resources objects which addressess a nastly little memory leak.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/ContentParser.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Resources.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Form.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/Shapes.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/ImageCache.java
        Hide
        Patrick Corless added a comment -

        It turns out that when an Xobject image or form is called from another Xobject the resulting base stream is never disposed off. So PDF like the provided samples will blead memory that we can never clean up.

        I've updated the ContentParser so that it calls a special dispose method on for form Xobjects which clean up any orphaned resources. The image Xobjects had to have the clean up on the Resource.getImage call.

        I've done a quite a bit of testing here and the leak seams to be resolved. It has become apparent that the ImageCache class is no longer needed needed as most of it's functionality has been disabled, something to touch up in the major release.

        Show
        Patrick Corless added a comment - It turns out that when an Xobject image or form is called from another Xobject the resulting base stream is never disposed off. So PDF like the provided samples will blead memory that we can never clean up. I've updated the ContentParser so that it calls a special dispose method on for form Xobjects which clean up any orphaned resources. The image Xobjects had to have the clean up on the Resource.getImage call. I've done a quite a bit of testing here and the leak seams to be resolved. It has become apparent that the ImageCache class is no longer needed needed as most of it's functionality has been disabled, something to touch up in the major release.
        Hide
        Patrick Corless added a comment -

        Resolving issue. Awaiting QA results and any horrible regressions.

        Show
        Patrick Corless added a comment - Resolving issue. Awaiting QA results and any horrible regressions.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: