Bug 14303 - Trouble reading a PDF file
Summary: Trouble reading a PDF file
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL: http://www.smile.co.uk/images/pdf/Cur...
Whiteboard:
Keywords:
: 14399 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-01-30 06:04 UTC by Jonathan Leighton
Modified: 2012-09-10 17:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Try to find another rootNum if actual rootNum doesn't point to a dict (2.42 KB, patch)
2012-09-09 10:39 UTC, Thomas Freitag
Details | Splinter Review

Description Jonathan Leighton 2008-01-30 06:04:19 UTC
Poppler fails to render this file: http://www.smile.co.uk/images/pdf/CurrentAccountT&Cs.pdf

Adobe Reader renders it fine.
Comment 1 Brad Hards 2008-01-30 20:06:36 UTC
Urgh, looks like we are crashing.

Error: PDF file is damaged - attempting to reconstruct xref table...
Error: Catalog object is wrong type (array)
Error: Couldn't read page catalog
==9733== Conditional jump or move depends on uninitialised value(s)
==9733==    at 0x408E4EB: Catalog::~Catalog() (Catalog.cc:217)
==9733==    by 0x40ECDC2: PDFDoc::~PDFDoc() (PDFDoc.cc:233)
Comment 2 Brad Hards 2008-01-30 21:14:34 UTC
Not crashing in poppler, just in my test tool.
Comment 3 Brad Hards 2008-01-30 21:28:47 UTC
Looks like some kind of weirdness in the startxref search.
Comment 4 Albert Astals Cid 2008-02-02 11:27:10 UTC
Yeah it has several xref and there is one that points to 120 object as catalog but 120 is not a catalog but something else, the other xref says 114 is the catalog and it is, but we pick the 120 xref because it's the last and i think that's correct behaviour.
Comment 5 Albert Astals Cid 2008-02-06 10:47:30 UTC
*** Bug 14399 has been marked as a duplicate of this bug. ***
Comment 6 Albert Astals Cid 2011-06-19 15:05:34 UTC
Works fine now.
Comment 7 Albert Astals Cid 2012-08-30 22:17:25 UTC
Somehow it stopped working :-/
Comment 8 Thomas Freitag 2012-09-03 12:29:05 UTC
I don't know why it stopped working, but I found a solution for it: If the XRef catalog is not a dictionary, I try to reconstruct XRef and find another root reference first before returning. This works for this PDF, but I have to regtest the patch first. I'll probably do that next weekend and I'll come back then.
Comment 9 Thomas Freitag 2012-09-09 10:39:03 UTC
Created attachment 66877 [details] [review]
Try to find another rootNum if actual rootNum doesn't point to a dict

This patch solves the issue and is regtested successfully
Comment 10 Albert Astals Cid 2012-09-10 17:49:42 UTC
Commited


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.