Bug 55573 - pdftops crashes in FT_Outline_Decompose
Summary: pdftops crashes in FT_Outline_Decompose
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:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-03 11:33 UTC by Thomas Freitag
Modified: 2014-02-18 23:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
testcase.pdf (87.43 KB, text/plain)
2012-10-03 11:33 UTC, Thomas Freitag
Details
sanity check (475 bytes, patch)
2012-10-03 11:45 UTC, Thomas Freitag
Details | Splinter Review
workaround (345 bytes, patch)
2012-10-03 12:02 UTC, Thomas Freitag
Details | Splinter Review

Description Thomas Freitag 2012-10-03 11:33:34 UTC
Created attachment 68034 [details]
testcase.pdf

The attached PDF crashes in FT_Outline_Decompose if rendered with 144 dpi:

pdftops -eps -level3 -r 144 /media/Data/Testdaten/kunden/lns/180219/testcase.pdf testcase.eps
Comment 1 Thomas Freitag 2012-10-03 11:45:47 UTC
Created attachment 68035 [details] [review]
sanity check

With this patch pdftops doesn't crash anymore.
BTW, it solves also the problem with 168.pdf.SIGSEGV.598.462 of bug 54090
Comment 2 Thomas Freitag 2012-10-03 12:02:14 UTC
Created attachment 68038 [details] [review]
workaround

The sanity check just heals the crash, but the PDF is not rendered correctly: In the output the letter "D" is missing.
I digged a little bit deeper into it, and it was really funny: pdftops doesn't render the "D" with 144 dpi, but it does it with 72 dpi, 150 dpi or 300 dpi.
When I render it with pdftoppm with 144 dpi, it works, too. So I looked into the differences between pdftoppm and pdftops and encountered, that the only difference is that in pdftoppm the font is loaded with FT_LOAD_NO_BITMAP because "aa" is true, but in pdftops the font is loaded without this option.
So if we set antialias printing to true, it works also with pdftops. This seems to be only a workaround, but I'm not a freetype expert. Perhaps anybody else with a deeper knowledge can find a better way to solve the problem. In the meantime this patch could help...
Comment 3 Albert Astals Cid 2012-10-03 18:17:35 UTC
No your patch does not help, it changes the output of all our postcript rendering, that's not helping ;-)
Comment 4 Albert Astals Cid 2012-10-03 18:26:20 UTC
I'm going to regtest and most probably commit Thomas Patch. If freetype is returning valid outlines for 150dpi but not for 144dpi that's most probably a freetype bug and i'm sure they'd appreciate someone telling them.

If noone does I'll tell them when i have some free time.
Comment 5 Albert Astals Cid 2012-10-03 22:52:32 UTC
Thomas patch commited, i'm leaving the bug open as a reminder someone has to talk to the freetype people about this
Comment 6 Albert Astals Cid 2014-02-18 23:39:04 UTC
We failed to talk to the freetype people. Close bug


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.