Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.2
-
Component/s: Font Engine
-
Labels:None
-
Environment:Pro font engine
-
Salesforce Case Reference:
Description
This issue came in though a customer who is using ICEpdf in a Servlet environment. As a request is processed a new document instance is created and the requested image is captured. After closer look the problem looks to be related to the class RandomAccessMultiplex. The class keeps cache of eight recently used font URI's.
When a font needs to access the URL the getRA() is called and the releaseRA() method is called when the IO work is done. An audit showed that we where not unreleasing an RA when reading TrueType fonts hich was easy to correct.
The second issue is related the the size of the RA list which is 8 by default. Having a test case with 8 record cash and 8 thread all operating on the same document and all is ok. Increase the thread count and getRA() method will block.
When a font needs to access the URL the getRA() is called and the releaseRA() method is called when the IO work is done. An audit showed that we where not unreleasing an RA when reading TrueType fonts hich was easy to correct.
The second issue is related the the size of the RA list which is 8 by default. Having a test case with 8 record cash and 8 thread all operating on the same document and all is ok. Increase the thread count and getRA() method will block.
Issue Links
- is duplicated by
-
PDF-1045 No Exception thrown if font is missing
- Closed
Activity
Patrick Corless
created issue -
Arran Mccullough
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case Reference | 5007000000TuYtdAAF |
Patrick Corless
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 5.0.6_P01 [ 11471 ] | |
Resolution | Fixed [ 1 ] |
Patrick Corless
made changes -
Fix Version/s | 5.0.7 [ 11470 ] |
Patrick Corless
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Patrick Corless
made changes -
I've updated the getRA and releaseRA methods to use the wait()/notify() pattern fix the blocking calls when more then one thread is being used. The rec cache has been kept at 8 for the time being.