Bug 702133 - Ghostscript does not correctly create CMY CUPS Raster and often crashes
Summary: Ghostscript does not correctly create CMY CUPS Raster and often crashes
Status: RESOLVED DUPLICATE of bug 701625
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: CUPS driver (show other bugs)
Version: 9.50
Hardware: PC Linux
: P4 normal
Assignee: Till Kamppeter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-17 17:40 UTC by Till Kamppeter
Modified: 2020-02-17 19:01 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
out.pdf (263.69 KB, application/pdf)
2020-02-17 17:42 UTC, Till Kamppeter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Till Kamppeter 2020-02-17 17:40:57 UTC
This command line gives a segfault:

cat out.pdf | RIP_MAX_CACHE=128m gs -dNOPAUSE -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=4 -_ > out.raster

If I set 300 dpi resolution

cat out.pdf | RIP_MAX_CACHE=128m gs -dNOPAUSE -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r300x300 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=4 -_ > out.raster

I do not get a segfault but the output is scrambled (use Mike Sweet's rasterview to display).

If CUPS calls ghostscript it sets the RIP_MAX_CACHE=128m environment variable. If I do not set this variable, I get Ghostscript also not crashing with 600 dpi but the output is still scrambled:

cat out.pdf | gs -dNOPAUSE -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -r600x600 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=4 -_ > out.raster

Selecting other cupsColorSpace values there is no problem (like 1 for RGB, 3, for Gray, 18, 19, 20 for SGRay, SRGB, and AdobeRGB).

So there are two bugs: CMY output is scrambled, and the segfault with the first command line.

Sample input file, out.pdf is attached.
Comment 1 Till Kamppeter 2020-02-17 17:42:11 UTC
Created attachment 18870 [details]
out.pdf
Comment 2 Till Kamppeter 2020-02-17 18:05:53 UTC
Sorry, CMY problem was already treated and fixed in bug 702133. I am rebuilding now and re-testing the segfault problem.
Comment 3 Till Kamppeter 2020-02-17 19:01:55 UTC
The fix of bug 701625 also fixes the segfault. So all working now after applying the patch. Closing.

*** This bug has been marked as a duplicate of bug 701625 ***