Issue 123417 - Crash exporting to pdf with IFAOGrec Unicode font
Summary: Crash exporting to pdf with IFAOGrec Unicode font
Status: REOPENED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.0.0
Hardware: All All
: P3 Major (vote)
Target Milestone: 4.1.0
Assignee: AOO issues mailing list
QA Contact: Clarence GUO
URL:
Keywords: crash, regression
Depends on:
Blocks:
 
Reported: 2013-10-03 10:41 UTC by unaltrafaccia
Modified: 2017-05-20 10:45 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.0.1
Developer Difficulty: ---


Attachments
Debugger stack trace (5.61 KB, text/plain)
2013-10-04 15:08 UTC, Ariel Constenla-Haile
no flags Details
stack from my local debug build (3.32 KB, text/plain)
2014-02-28 10:16 UTC, Oliver-Rainer Wittmann
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description unaltrafaccia 2013-10-03 10:41:56 UTC
AOO 4.0.0 (and 4.0.1 as well) Writer crashes while exporting a large(?) file to pdf. AOO 3.4.1 (and previous versions) works perfectly with the same file. The exporting process starts, then AOO 4.0.x crashes when it seems that the operation is almost at the end.
I'm attaching the .odt file.
Comment 1 unaltrafaccia 2013-10-03 10:46:25 UTC
I can't upload the file at the moment, because it exceeds the size limit (1,400 KB). I will try to post a URL later.
Comment 2 unaltrafaccia 2013-10-03 12:12:07 UTC
here the link to the sample file (an odt file which can't be exported to pdf with AOO 4.0.x. I've hidden the original text by replacing the original letters with a lot of x's):
https://docs.google.com/file/d/0BwKcdJDZLAa7NkoyckxBN2dUaTg/edit?usp=sharing
Comment 3 Edwin Sharp 2013-10-03 18:00:32 UTC
No crash when export as PDF.

AOO401m5(Build:9714)  -  Rev. 1523756
2013-09-16 20:50:21 (Mo, 16 Sep 2013)
Win 7
Comment 4 unaltrafaccia 2013-10-03 20:48:30 UTC
The difference between my computer and other ones is that I have the font IFAOGrec Unicode. The sample file contains a lot of IfaoGrec Unicode letters. It doesn't crash if the IfaoGrec characters are removed from the document or if the font is not installed in the computer. No problem with the previous versions of AOO. Try to install the (free) font in order to reproduce the crash.
Comment 5 Ariel Constenla-Haile 2013-10-03 22:02:14 UTC
(In reply to unaltrafaccia from comment #4)
> Try to install the (free) font in order to
> reproduce the crash.

Is this "Police "IFAO-Grec Unicode" from http://www.ifao.egnet.net/publications/outils/polices/#grec ?
In particular: http://www.ifao.egnet.net/uploads/polices/IFAOGrec_2nd_edition.zip
Comment 6 Ariel Constenla-Haile 2013-10-03 22:37:33 UTC
Confirmed in Windows 7 64 bits, AOO 4.0.1, with the fonts from http://www.ifao.egnet.net/uploads/polices/IFAOGrec_2nd_edition.zip

The settings for exporting to PDF are the default ones, as this was tested with a band new user profile without importing previous version's settings.

Regression: works fine with 3.4.1
Comment 7 hdu@apache.org 2013-10-04 15:05:24 UTC
The problem happens when SFT chokes on the unexpected condition that a glyph claiming to be a truetype compounded glyph has no outline points. IFAOGrec's glyph 98 (which matches to the non-breaking space U+00A0) has this problem.
Comment 8 Ariel Constenla-Haile 2013-10-04 15:08:51 UTC
Created attachment 81702 [details]
Debugger stack trace

The problem is in

static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray, TTGlyphMetrics *metrics, std::vector< sal_uInt32 >& glyphlist)

http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/source/fontsubset/sft.cxx?revision=1413471&view=markup#l809

memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );

myPoints is empty, in this case operator[] seemed to work fine with the stlport implementation, but crashes with the system's implementation, that tries to dereference a null pointer.
Comment 9 Ariel Constenla-Haile 2013-10-04 15:12:42 UTC
(In reply to hdu@apache.org from comment #7)
> The problem happens when SFT chokes on the unexpected condition that a glyph
> claiming to be a truetype compounded glyph has no outline points. IFAOGrec's
> glyph 98 (which matches to the non-breaking space U+00A0) has this problem.

You were faster, I was going to assign it to you.
Side note, it does not crash on Linux with its vector implementation.
Comment 10 SVN Robot 2013-10-04 15:14:23 UTC
"hdu" committed SVN revision 1529178 into trunk:
#i123417# handle subsetting of empty ttf compound glyphs gracefully
Comment 11 hdu@apache.org 2013-10-04 15:16:08 UTC
Fixed with the commit above. Thanks for the stack!
Comment 12 Clarence GUO 2014-02-27 09:21:26 UTC
Verified on AOO Rev 1571942 en-US, still crash, I haven't installed IfaoGrec characters

Test ENV: Win7 professional 64 bit SP1, Chinese version.
Comment 13 Clarence GUO 2014-02-27 09:22:20 UTC
reopen per my previous comment
Comment 14 Andre 2014-02-28 09:53:08 UTC
@Clarence: Can you provide a stack strace?
Comment 15 Oliver-Rainer Wittmann 2014-02-28 10:03:28 UTC
on my local debug build from trunk (rev. 1572577) I got a crash during the page formatting. The page formatting is also triggered when an PDF export is initiated.
-> stack trace will follow
Comment 16 Oliver-Rainer Wittmann 2014-02-28 10:16:43 UTC
Created attachment 82752 [details]
stack from my local debug build
Comment 17 hdu@apache.org 2014-02-28 10:59:21 UTC
Thanks for the stack. It shows a problem that is completely unrelated to the original problem observed with subsetting IFAOGrec Unicode.
That's why i hate 1000+ page bugdocs...
Comment 18 Marcus 2017-05-20 10:45:37 UTC
Reset the assignee to the default "issues@openoffice.apache.org".