Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.0.4
-
Fix Version/s: 5.0.5
-
Component/s: Font Engine
-
Labels:None
-
Environment:any
Description
A support request with two support files came in which exhibited many console exceptions when loading the sample files with two threads.
Issue Links
- is duplicated by
-
PDF-1045 No Exception thrown if font is missing
- Closed
Activity
Patrick Corless
created issue -
Patrick Corless
made changes -
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Patrick Corless
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Patrick Corless
made changes -
The files in question contain fonts that are shared as resources across multiple files. The underlying data structure for the font is not thread safe having a byte[] indexer that could be manipulated by another thread. So as the glyphs are parsed lazily it's possible for the the byte[] pointer to move incorrectly for a concurrent parse.
For the time being I've made the byte[] pointer thread local which seems to fix the issue. Further testing is needed to verify the fix as well as track down any further issues.