Bug 698354 - Crash when running gswin32.exe with the attached command line
Summary: Crash when running gswin32.exe with the attached command line
Status: RESOLVED WORKSFORME
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: 9.18
Hardware: PC Windows 7
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-14 06:44 UTC by Herwig Bauernfeind
Modified: 2017-08-18 02:47 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments
One of the many PS files that shows the crash. (100.89 KB, application/octet-stream)
2017-08-16 01:02 UTC, Herwig Bauernfeind
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Herwig Bauernfeind 2017-08-14 06:44:46 UTC
c:\gs\gs9.18\bin\gswin32.exe -q -dNOPAUSE -dBATCH -dNOOUTERSAVE -dUseCIEColor -dNOSAVER -dPDFSETTINGS=/default -dProcessColorModel=/DeviceRGB -dColorImageResolution=72 -dGrayImageResolution=72 -dMonoImageResolution=300 -r72 -dDownsampleColorImages=false -dDownsampleGrayImages=false -dDownsampleMonoImages=false -dColorImageDownsampleType=/Subsample -dGrayImageDownsampleType=/Subsample -dMonoImageDownsampleType=/Subsample -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -dMonoImageFilter=/FlateEncode -dCompatibilityLevel=1.2 -dAutoRotatePages=/PageByPage -dPreserveOverprintSettings=false -dEmbedAllFonts=true -dSubsetFonts=false -dNOPLATFONTS -dUCRandBGInfo=/Remove -dCompressPages=false -sDEVICE#pdfwrite -sOutputFile#K:\Klienten\VERSUC-2016-Mappendeckblatt.pdf D:\POSTSCRIPT.958

This happens with any PostScript file we tried and we see the same crash on our OS/2 port of GhostScript. While -dUseCIEColor is deprecated, the same happens if -dFastWebView is added to the list of parameters.
Comment 1 Ken Sharp 2017-08-14 07:16:52 UTC
(In reply to Herwig Bauernfeind from comment #0)
> c:\gs\gs9.18\bin\gswin32.exe -q -dNOPAUSE -dBATCH -dNOOUTERSAVE
> -dUseCIEColor -dNOSAVER -dPDFSETTINGS=/default
> -dProcessColorModel=/DeviceRGB -dColorImageResolution=72
> -dGrayImageResolution=72 -dMonoImageResolution=300 -r72
> -dDownsampleColorImages=false -dDownsampleGrayImages=false
> -dDownsampleMonoImages=false -dColorImageDownsampleType=/Subsample
> -dGrayImageDownsampleType=/Subsample -dMonoImageDownsampleType=/Subsample
> -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode
> -dMonoImageFilter=/FlateEncode -dCompatibilityLevel=1.2
> -dAutoRotatePages=/PageByPage -dPreserveOverprintSettings=false
> -dEmbedAllFonts=true -dSubsetFonts=false -dNOPLATFONTS
> -dUCRandBGInfo=/Remove -dCompressPages=false -sDEVICE#pdfwrite
> -sOutputFile#K:\Klienten\VERSUC-2016-Mappendeckblatt.pdf D:\POSTSCRIPT.958
> 
> This happens with any PostScript file we tried and we see the same crash on
> our OS/2 port of GhostScript. While -dUseCIEColor is deprecated, the same
> happens if -dFastWebView is added to the list of parameters.

Firstly, you appear to be using an old version of Ghostscript, you should try again with the current version, 9.21. You must also supply an example file which reproduces the problem, there may be something specific about the PostScript files you are using which will not be present in a PostScript program which I create.

You could also reduce the scope of this problem quite markedly yourselves, by eliminating options from the command line until you discover which one is causing the problem for you.

Its also worth noting that many of the switches you have set are redundant; for example there is no point in setting ColorImageResolution or ColorImageFilter if you set DownsampleColorImages to false, since these are only used when downsampling images. The same is true of the other colour space switches.

-dNOSAVER will have no effect since its not a recognised switch I don't know if you mean -dNOOUTERSAVE there, if you do, don't use it, as that will simply reduce performance. That applies to the -dNOOUTERSAVE you have set earlier on the command line as well. If its intended to be -dNOSAFER then you don't need that either.

There's no point in setting -dPDFSETTINGS=/default, because that is, after  all, the default.

As current versions of the code will tell you, you should not use -dUseCIEColor with pdfwrite, unless you are working in a tightly controlled workflow and completely understand the implications regarding colour management. The  -dFastWebView switch has absolutely *nothing* to do with colour. -dUseFastColor does, but it has no effect with pdfwrite which ignores it.

Why are you setting the compatibility level to 1.2 ? That version of the specification was superseded in the year 2000. Do you really need to be compatible with a 17 year old version of PDF ?

Interesting mixture of '#' and '=' symbols, I'd recommend you choose one and stick to it.

Why are you disabling compression of the output ? Did you particularly need bigger output files ? Similarly why are you disabling font subsetting ? If you think this enables you to edit the PDF files afterwards then you are mistaken.
Comment 2 Ken Sharp 2017-08-14 07:32:07 UTC
The supplied command line, with the golfer.eps file supplied with Ghostscript in ghostpdl/examples, using the 9.18 32-bit release on Windows, does not crash, does not give an error, and produces a perfectly reasonable PDF file.

So either there's something you aren't telling me, or there's something 'special' about the PostScript files you are using.
Comment 3 Herwig Bauernfeind 2017-08-16 01:02:18 UTC
Created attachment 14072 [details]
One of the many PS files that shows the crash.
Comment 4 Herwig Bauernfeind 2017-08-16 01:03:31 UTC
Ok, first of all, I took the commandline from what http://www.subsys.de/ePDF/ provides to GhostScript in order to create the PDF. And that is beyond my control, however obviously not problemfree. I will repeat the tests on 9.21. w32
Comment 5 Ken Sharp 2017-08-16 01:11:35 UTC
(In reply to Herwig Bauernfeind from comment #4)
> Ok, first of all, I took the commandline from what
> http://www.subsys.de/ePDF/ provides to GhostScript in order to create the
> PDF. And that is beyond my control, however obviously not problemfree. I
> will repeat the tests on 9.21. w32

This does crash with 9.18 and the (overly complicated) command line given, however it works perfectly well with 9.21 and the current development code. I would suggest you should use something more recent.
Comment 6 Herwig Bauernfeind 2017-08-18 02:40:56 UTC
I can confirm. Looks like we will have to update the OS/2 port of GhostScript. Thx for your help
Comment 7 Ken Sharp 2017-08-18 02:47:44 UTC
(In reply to Herwig Bauernfeind from comment #6)
> I can confirm. Looks like we will have to update the OS/2 port of
> GhostScript. Thx for your help

Thanks for confirming it.