Bug 689579

Summary: Ghostscript generates a very, very large temporary file
Product: Ghostscript Reporter: Marcos H. Woehrmann <marcos.woehrmann>
Component: Graphics LibraryAssignee: leonardo <leonardo>
Status: NOTIFIED FIXED    
Severity: normal    
Priority: P2    
Version: master   
Hardware: PC   
OS: Linux   
Customer: 190 Word Size: ---
Attachments: patch.txt

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