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

        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: