Bug 691473 - PDF 1.7 FTS: /limitcheck in --run--
Summary: PDF 1.7 FTS: /limitcheck in --run--
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Interpreter (show other bugs)
Version: master
Hardware: PC Linux
: P1 normal
Assignee: Alex Cherepanov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-18 16:02 UTC by Alex Cherepanov
Modified: 2011-09-18 21:46 UTC (History)
1 user (show)

See Also:
Customer: 532
Word Size: ---


Attachments
patch (4.01 KB, patch)
2010-07-23 19:00 UTC, Alex Cherepanov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Cherepanov 2010-07-18 16:02:17 UTC
File fts_23_2306_a4.pdf fails with 
  Error: /limitcheck in --run--
and a number 312494 on top of the operand stack.
Probably, it's another clash between PDF and PS architectural limits.
Comment 1 Ray Johnston 2010-07-18 18:29:58 UTC
Update to reflect customer status and ID.
Comment 2 Alex Cherepanov 2010-07-18 20:33:22 UTC
The error happens somewhere in /.dividesfnts .
Do we still need this procedure with FreeType?
When it's disabled, the sample file runs to completion, and
regression testing shows no differences.
Comment 3 Chris Liddell (chrisl) 2010-07-22 16:05:29 UTC
I found what's causing the error in .dividesfnts: it will only split the strings when the split offset is even, and we get a *long* run of cases where the split offsets are odd. When we finally reach an even offset again, we've "buffered up" *way* too much data to fit in a string, then we try to make a string for it to fit in - rangecheck!

To resolve this would be a lot of work: it would mean removing the requirement of only splitting on even offsets by padding strings as necessary and recalculating the loca table to reflect the new offsets.

But, like Alex, I am baffled as to the (present) need for .dividesfnts. The job in question contains a very large Type 11 font, and both the Freetype code and the GS internal code handle it fine with the contents of .dividesfnts removed. Both the Freetype build, and the non-FT build run correctly on the cluster without .dividesfnts.

As for other "consumers", pdfwrite will "recreate" a Truetype font, ps2write includes procedures to create a well formed Type 42 from a TrueType, and pswrite doesn't write fonts, as I understand it.

I think the requirement for .dividesfnts disappeared with the introduction and use of string_array_access_proc() way back in revision 176, and is now serves no useful purpose - in fact, given that it's doing a pretty complex thing, it probably slows us down!


My vote is we remove .dividesfnts.
Comment 4 Ray Johnston 2010-07-23 15:12:50 UTC
I am in favor of getting rid of .dividesfnts as well.
Comment 5 Alex Cherepanov 2010-07-23 19:00:24 UTC
Created attachment 6535 [details]
patch

Remove .dividesfnts procedure.
Comment 6 Alex Cherepanov 2010-07-23 19:02:47 UTC
The patch has been committed as a rev. 11539.
Comment 7 Marcos H. Woehrmann 2011-09-18 21:46:36 UTC
Changing customer bugs that have been resolved more than a year ago to closed.