Bug 691349 - pdf_loadobjstm: don't overwrite object reference in xref with older version
pdf_loadobjstm: don't overwrite object reference in xref with older version
Status: RESOLVED FIXED
Product: MuPDF
Classification: Unclassified
Component: mupdf
unspecified
PC Windows 7
: P4 normal
Assigned To: Tor Andersson
Bug traffic
http://code.google.com/p/sumatrapdf/i...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-29 21:35 UTC by zeniko
Modified: 2010-05-31 21:17 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zeniko 2010-05-29 21:35:15 UTC
Steps to reproduce:
* Load http://mobile.carrefour.fr/pdf/guide-achat.pdf at page 1 and navigate to page 4.
* Load the same document directly at page 4 and navigate to page 6.

Actual results:
In the first case, many letters are missing from page 4 due to an incomplete (older revision) of a partial font being loaded.
In the second case, page 4 renders just fine but the same issue applies to page 6.

See http://code.google.com/p/sumatrapdf/source/detail?r=1922 for a patch.
Comment 1 zeniko 2010-05-29 22:28:29 UTC
Well, http://code.google.com/p/sumatrapdf/source/detail?r=1923 would be the version which actually works...
Comment 2 zeniko 2010-05-29 23:05:04 UTC
A variation of the same issue can be found at http://drop.io/mdj12345 (from http://code.google.com/p/sumatrapdf/issues/detail?id=936 ): in this document, the object numbers of old xrefs are re-used, but due to the fact that pdf_readnewxref works backwards, the table entries are overwritten nonetheless.

See http://code.google.com/p/sumatrapdf/source/detail?r=1924 for a patch for this second issue.
Comment 3 Tor Andersson 2010-05-31 20:49:41 UTC
I've pushed patches that fix the xref table clobbering in both of these cases.
Comment 4 zeniko 2010-05-31 21:17:43 UTC
FYI: Your first fix introduced a memory leak due to unused objects not being dropped.