Details
-
Type: Bug
-
Status: Closed
-
Priority: Critical
-
Resolution: Fixed
-
Affects Version/s: 4.0.1
-
Fix Version/s: 4.2
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:any
-
Assignee Priority:P1
-
ICEsoft Forum Reference:
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.
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 | |
Files Changed | ||||
MODIFY
/icepdf/trunk/icepdf/core/src/org/icepdf/core/util/ContentParser.java
MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Resources.java MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/Form.java MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/Shapes.java MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/ImageCache.java |
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
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.