Bug 689579 - Ghostscript generates a very, very large temporary file
Summary: Ghostscript generates a very, very large temporary file
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: Graphics Library (show other bugs)
Version: master
Hardware: PC Linux
: P2 normal
Assignee: leonardo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-27 22:25 UTC by Marcos H. Woehrmann
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer: 190
Word Size: ---


Attachments
patch.txt (12.22 KB, patch)
2008-04-30 09:57 UTC, leonardo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos H. Woehrmann 2007-11-27 22:25:03 UTC
The customer reports and I've verified that the attached PDF file causes
Ghostscript to generate a very, very large temporary file (i.e. 3 gigs).  This
happens with gs8.61, gshead (r8410), and earlier versions of Ghostscript.

The command line I used:

  bin/gs -sDEVICE=tiff32nc -sOutputFile=test.tif -r1440 ./map_p10.pdf
Comment 1 Marcos H. Woehrmann 2007-11-27 22:25:29 UTC
Created attachment 3584 [details]
map_p10.pdf
Comment 2 leonardo 2008-01-23 06:11:50 UTC
Reproduced with rev 8497 : the sum temp file sizes is 2.36 gig.
Comment 3 leonardo 2008-01-23 06:40:37 UTC
The reason is pattern1 color can't write to clist, so it converts into multiple 
rectangles.
Comment 4 leonardo 2008-01-23 06:44:21 UTC
The reason is pattern1 color can't write to clist, so it converts into multiple 
rectangles. Need to implement gx_dc_pattern_write and other related stuff.
Comment 5 leonardo 2008-04-28 09:17:25 UTC
Please don't expect a rocket progress for the specified test case. Its page 
size is 0x000000017ede1000 bytes, i.e. it exceeds 32 bits. So it fails at 
gdevtsep.c ln 194 limitation with max_long. I'm working on the clist file size 
but not the raster page size limitation for tiff23nc.
Comment 6 leonardo 2008-04-30 09:57:09 UTC
Created attachment 3973 [details]
patch.txt

The attached patch fixes the problem, but it causes a massive minor raster
differences with a dependance of pattern phase on bands. The patch may be used
as a fix, but we want to avoid the raster difference before commitment to HEAD.
Comment 7 leonardo 2008-05-14 06:48:28 UTC
Patch to HEAD for closing this bug :
http://ghostscript.com/pipermail/gs-cvs/2008-May/008293.html