Bug 68321 - pdftops -eps -level1sep regression 10 Aug 2013, some images are missing
Summary: pdftops -eps -level1sep regression 10 Aug 2013, some images are missing
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-20 09:48 UTC by William Bader
Modified: 2013-08-25 17:35 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
example file to show the problem (570.64 KB, application/pdf)
2013-08-20 09:48 UTC, William Bader
Details
patch to fix the problem (966 bytes, patch)
2013-08-20 16:25 UTC, William Bader
Details | Splinter Review
alternate patch with a goto instead of a loop (607 bytes, patch)
2013-08-20 21:15 UTC, William Bader
Details | Splinter Review

Description William Bader 2013-08-20 09:48:44 UTC
Created attachment 84320 [details]
example file to show the problem

pdftops -eps -level1sep worked on the attached file in version 0.21.0 but in a 20 Aug 2013 git clone, it drops some of the faces at the lower left.
This pdf writes through an image mask.  pdftops had problems with it a few years ago, but it was working last year.
William
Comment 1 William Bader 2013-08-20 09:51:09 UTC
I am still using a 64-bit Intel x86_64 version of Fedora 17.
Comment 2 William Bader 2013-08-20 16:25:51 UTC
Created attachment 84348 [details] [review]
patch to fix the problem

I did a git bisect and traced the problem to the commit below.
It adds the line cSrcNonIso[3] = 255 in the middle of a sequence of case statements where the sequence above falls through to the sequence below.  Adding this line overwrote the value in cSrcNonIso[3] set by the sequence above for SPLASH_CMYK splashModeCMYK8.
I switched the two groups above for SPLASH_CMYK to loops (which I imagine gcc will unroll) that do not need to fall through.
William

commit 8fb243bf11a979af8bfa36427436940706c9f71d
Author: Albert Astals Cid <aacid@kde.org>
Date:   Tue Feb 19 23:59:17 2013 +0100
 Initialize cSrcNonIso[3] in splashModeXBGR8
 Fixes valgrind warning
Comment 3 William Bader 2013-08-20 21:15:54 UTC
Created attachment 84360 [details] [review]
alternate patch with a goto instead of a loop

This is an alternate, simpler patch that uses a goto instead of a loop.
Comment 4 Albert Astals Cid 2013-08-25 17:35:38 UTC
I've commited the first version, the goto one is shorter but it's scarier in my scary metrics level :D

Thanks for the work in bisecting!


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.