Bug 74741 - Page displayed twice replacing the normal successor page.
Summary: Page displayed twice replacing the normal successor page.
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-09 10:22 UTC by m.nemo
Modified: 2014-02-10 19:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
The file for posterity (51.10 KB, text/plain)
2014-02-09 14:57 UTC, Albert Astals Cid
Details
0001-Make-sure-number-of-least-objects-in-hints-table-is-.patch (892 bytes, patch)
2014-02-09 22:02 UTC, Hib Eris
Details | Splinter Review

Description m.nemo 2014-02-09 10:22:47 UTC
Original report was at https://bugs.kde.org/show_bug.cgi?id=330914
poppler version is: 0.24.3-3.fc20 (Fedora 20)


== Orig == (also reproducible with evince)
When viewing this document:

http://www.judobund.de/media/ordnungenPassordnung_2013_Nov.pdf

Instead of Page 3, Page 2 is shown again. 

Reproducible: Always 

Steps to Reproduce: 
1. okular http://www.judobund.de/media/ordnungen/Passordnung_2013_Nov.pdf
2.
3.
Actual Results: 
Page 1 
Page 2 
Page 2 < 
Page 4

Expected Results: 
Page 1
Page 2
Page 3 <
Page 4

viewing the document with xpdf works. converting the document to PS via pdf2ps and viewing the PS in okular works, too.
Comment 1 Albert Astals Cid 2014-02-09 14:57:01 UTC
Created attachment 93711 [details]
The file for posterity
Comment 2 Albert Astals Cid 2014-02-09 15:09:56 UTC
Hib, can you have a look, bisect says that got broken by 

commit 5934c320aa136c1a6e97fb9bf54bdfdccfcab521
Author: Hib Eris <hib@hiberis.nl>
Date:   Wed Nov 10 22:50:36 2010 +0000

    Linearization improvements
Comment 3 Hib Eris 2014-02-09 17:08:38 UTC
I will take a look.
Comment 4 Hib Eris 2014-02-09 22:01:41 UTC
It seems the document in question does not have a correct value in the hints table for the least number of object in a page. From inspecting the pdf file, it seems the actual least number of objects in any page is 4, but reading it from the hints table gives a value of 0. Now 0 is clearly an invalid value, because this number should include the page object itself, therefor always resulting in a value >= 1.

Adding a check for the value to be >=1 seems to fix this case by falling back to not using the hints table.
Comment 5 Hib Eris 2014-02-09 22:02:37 UTC
Created attachment 93725 [details] [review]
0001-Make-sure-number-of-least-objects-in-hints-table-is-.patch
Comment 6 Albert Astals Cid 2014-02-10 19:17:31 UTC
Awesome. Patch is in.


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.