Discussion:
[gs-bugs] [Bug 698679] - Ghostscript - Random errors during large PS File parsing
b***@artifex.com
2017-10-20 20:07:52 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

Bug ID: 698679
Summary: Random errors during large PS File parsing
Product: Ghostscript
Version: unspecified
Hardware: PC
OS: Windows 10
Status: UNCONFIRMED
Severity: blocker
Priority: P4
Component: PS Interpreter
Assignee: ***@artifex.com
Reporter: ***@hotmail.com
QA Contact: gs-***@ghostscript.com
Word Size: ---

Running the following command to one large file

gswin64c.exe -dBATCH -sDEVICE=inkcov -dNOPAUSE -q -o
"C:\Windows\system32\spool\PRINTERS\00006.SPL.txt"
"C:\Windows\system32\spool\PRINTERS\00006.SPL";

I receive in the output file:

-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
-1.00000 -1.00000 -1.00000 -1.00000 CMYK ERROR
;
0.54869 0.52597 0.45137 0.08949 CMYK OK
;

sometimes the problem does not happen

Follow the file used:
https://drive.google.com/open?id=0BzLe3B4ebltWcU4zTHhaSTliSE0

Version GS is 9.22
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-20 20:32:56 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

--- Comment #1 from Ken Sharp <***@artifex.com> ---
Please attach the specimen file here, rather than a URL. URLs often go stale
before anyone can investigate the problem.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-20 20:35:44 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

Ken Sharp <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Severity|blocker |normal
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-23 10:54:00 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

--- Comment #2 from Leonardo <***@hotmail.com> ---
Created attachment 14406
--> http://bugs.ghostscript.com/attachment.cgi?id=14406&action=edit
File PS

File attached
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-23 11:04:14 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

--- Comment #3 from Ken Sharp <***@artifex.com> ---
(In reply to Leonardo from comment #2)
Created attachment 14406 [details]
File PS
File attached
1GB ? Seriously ?

The file contains > 500 pages (all, I might add, scanned images apparently),
which page causes your problems ? Can you reproduce this with a smaller file,
have you tried ?

What do you mean when you say 'sometimes the problem does not happen' ? Do you
mean if you run this file multiple times sometimes you don't see a problem ? Or
do you mean that sometimes you produce (monstrous) files which do no produce an
error ?

Do you get any messages in the Ghostscript transcript (not the output file, but
stdout and stderr) ?

Try running it without -q so that you don't suppress warnings. When you are
trying to debug a problem you need all the information you can get.

Have you tried printing the error code in the inkcov device ? Or debugging
Ghostscript to see what the error code is ?

When I run your file here it does not produce an errors.
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-25 11:15:07 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

--- Comment #4 from Leonardo <***@hotmail.com> ---
(In reply to Ken Sharp from comment #3)
Post by b***@artifex.com
(In reply to Leonardo from comment #2)
Created attachment 14406 [details]
File PS
File attached
1GB ? Seriously ?
The file contains > 500 pages (all, I might add, scanned images apparently),
which page causes your problems ? Can you reproduce this with a smaller
file, have you tried ?
What do you mean when you say 'sometimes the problem does not happen' ? Do
you mean if you run this file multiple times sometimes you don't see a
problem ? Or do you mean that sometimes you produce (monstrous) files which
do no produce an error ?
Do you get any messages in the Ghostscript transcript (not the output file,
but stdout and stderr) ?
Try running it without -q so that you don't suppress warnings. When you are
trying to debug a problem you need all the information you can get.
Have you tried printing the error code in the inkcov device ? Or debugging
Ghostscript to see what the error code is ?
When I run your file here it does not produce an errors.
Apparently the error only happens when I use the large files, (> 500mb).
need run the command 4 to 5 times to receive the error.
I do not receive with small files

Using this file, without (-q) I get stdout:

C:\Program Files\gs\gs9.22\bin>gswin64c.exe -sDEVICE=inkcov -o
"C:\Users\Adminis
trator\Desktop\00002.SPL.txt" "C:\Users\Administrator\Desktop\00002.SPL"
GPL Ghostscript 9.22 (2017-10-04)
Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Loading NimbusMonoPS-Regular font from
%rom%Resource/Font/NimbusMonoPS-Regular..
. 4151912 2808527 3445296 2157608 1 done.
Querying operating system for font files...
%%[ ProductName: GPL Ghostscript ]%%
%%[Page: 1]%%
%%[Page: 2]%%
%%[Page: 3]%%
%%[Page: 4]%%
%%[Page: 5]%%
%%[Page: 6]%%
%%[Page: 7]%%
%%[Page: 8]%%
%%[Page: 9]%%
%%[Page: 10]%%
%%[Page: 11]%%
%%[Page: 12]%%
%%[Page: 13]%%
%%[Page: 14]%%
%%[Page: 15]%%
%%[Page: 16]%%
%%[Page: 17]%%
%%[Page: 18]%%
%%[Page: 19]%%
%%[Page: 20]%%
%%[Page: 21]%%
%%[Page: 22]%%
%%[Page: 23]%%
%%[Page: 24]%%
%%[Page: 25]%%
%%[Page: 26]%%
%%[Page: 27]%%
%%[Page: 28]%%
%%[Page: 29]%%
%%[Page: 30]%%
%%[Page: 31]%%
%%[Page: 32]%%
%%[Page: 33]%%
%%[Page: 34]%%
%%[Page: 35]%%
%%[Page: 36]%%
%%[Page: 37]%%
%%[Page: 38]%%
%%[Page: 39]%%
%%[Page: 40]%%
%%[Page: 41]%%
%%[Page: 42]%%
%%[Page: 43]%%
%%[Page: 44]%%
%%[Page: 45]%%
%%[Page: 46]%%
%%[Page: 47]%%
%%[Page: 48]%%
%%[Page: 49]%%
%%[Page: 50]%%
%%[Page: 51]%%
%%[Page: 52]%%
%%[Page: 53]%%
%%[Page: 54]%%
%%[Page: 55]%%
%%[Page: 56]%%
%%[Page: 57]%%
%%[Page: 58]%%
%%[Page: 59]%%
%%[Page: 60]%%
%%[Page: 61]%%
%%[Page: 62]%%
%%[Page: 63]%%
%%[Page: 64]%%
%%[Page: 65]%%
%%[Page: 66]%%
%%[Page: 67]%%
%%[Page: 68]%%
%%[Page: 69]%%
%%[Page: 70]%%
%%[Page: 71]%%
%%[Page: 72]%%
%%[Page: 73]%%
%%[Page: 74]%%
%%[Page: 75]%%
%%[Page: 76]%%
%%[Page: 77]%%
%%[Page: 78]%%
%%[Page: 79]%%
%%[Page: 80]%%
%%[Page: 81]%%
%%[Page: 82]%%
%%[Page: 83]%%
%%[Page: 84]%%
%%[Page: 85]%%
%%[Page: 86]%%
%%[Page: 87]%%
%%[Page: 88]%%
%%[Page: 89]%%
%%[Page: 90]%%
%%[Page: 91]%%
%%[Page: 92]%%
%%[Page: 93]%%
%%[Page: 94]%%
%%[Page: 95]%%
%%[Page: 96]%%
%%[Page: 97]%%
%%[Page: 98]%%
%%[Page: 99]%%
%%[Page: 100]%%
%%[Page: 101]%%
%%[Page: 102]%%
%%[Page: 103]%%
%%[Page: 104]%%
%%[Page: 105]%%
%%[Page: 106]%%
%%[Page: 107]%%
%%[Page: 108]%%
%%[Page: 109]%%
%%[Page: 110]%%
%%[Page: 111]%%
%%[Page: 112]%%
%%[Page: 113]%%
%%[Page: 114]%%
%%[Page: 115]%%
%%[Page: 116]%%
%%[Page: 117]%%
%%[Page: 118]%%
%%[Page: 119]%%
%%[Page: 120]%%
%%[Page: 121]%%
%%[Page: 122]%%
%%[Page: 123]%%
%%[Page: 124]%%
%%[Page: 125]%%
%%[Page: 126]%%
%%[Page: 127]%%
%%[Page: 128]%%
%%[Page: 129]%%
%%[Page: 130]%%
%%[Page: 131]%%
%%[Page: 132]%%
%%[Page: 133]%%
%%[Page: 134]%%
%%[Page: 135]%%
%%[Page: 136]%%
%%[Page: 137]%%
%%[Page: 138]%%
%%[Page: 139]%%
%%[Page: 140]%%
%%[Page: 141]%%
%%[Page: 142]%%
%%[Page: 143]%%
%%[Page: 144]%%
%%[Page: 145]%%
%%[Page: 146]%%
%%[Page: 147]%%
%%[Page: 148]%%
%%[Page: 149]%%
%%[Page: 150]%%
%%[Page: 151]%%
%%[Page: 152]%%
%%[Page: 153]%%
%%[Page: 154]%%
%%[Page: 155]%%
%%[Page: 156]%%
%%[Page: 157]%%
%%[Page: 158]%%
%%[Page: 159]%%
%%[Page: 160]%%
%%[Page: 161]%%
%%[Page: 162]%%
%%[Page: 163]%%
%%[Page: 164]%%
%%[Page: 165]%%
%%[Page: 166]%%
%%[Page: 167]%%
%%[Page: 168]%%
%%[Page: 169]%%
%%[Page: 170]%%
%%[Page: 171]%%
%%[Page: 172]%%
%%[Page: 173]%%
%%[Page: 174]%%
%%[Page: 175]%%
%%[Page: 176]%%
%%[Page: 177]%%
%%[Page: 178]%%
%%[Page: 179]%%
%%[Page: 180]%%
%%[Page: 181]%%
%%[Page: 182]%%
%%[Page: 183]%%
%%[Page: 184]%%
%%[Page: 185]%%
%%[Page: 186]%%
%%[Page: 187]%%
%%[Page: 188]%%
%%[Page: 189]%%
%%[Page: 190]%%
%%[Page: 191]%%
%%[Page: 192]%%
%%[Page: 193]%%
%%[Page: 194]%%
%%[Page: 195]%%
%%[Page: 196]%%
%%[Page: 197]%%
%%[Page: 198]%%
%%[Page: 199]%%
%%[Page: 200]%%
%%[Page: 201]%%
%%[Page: 202]%%
%%[Page: 203]%%
%%[Page: 204]%%
%%[Page: 205]%%
%%[Page: 206]%%
%%[Page: 207]%%
%%[Page: 208]%%
%%[Page: 209]%%
%%[Page: 210]%%
%%[Page: 211]%%
%%[Page: 212]%%
%%[Page: 213]%%
%%[Page: 214]%%
%%[Page: 215]%%
%%[Page: 216]%%
%%[Page: 217]%%
%%[Page: 218]%%
%%[Page: 219]%%
%%[Page: 220]%%
%%[ Error: ioerror; OffendingCommand: image ]%%
GPL Ghostscript 9.22: Unrecoverable error, exit code 1
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-25 11:23:06 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

Leonardo <***@hotmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Version|unspecified |9.22
--
You are receiving this mail because:
You are the QA Contact for the bug.
b***@artifex.com
2017-10-25 12:21:04 UTC
Permalink
http://bugs.ghostscript.com/show_bug.cgi?id=698679

Ken Sharp <***@artifex.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WORKSFORME
Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Ken Sharp <***@artifex.com> ---
(In reply to Leonardo from comment #4)
Post by b***@artifex.com
%%[Page: 220]%%
%%[ Error: ioerror; OffendingCommand: image ]%%
GPL Ghostscript 9.22: Unrecoverable error, exit code 1
So the input file has insufficient data to satisfy the image. This doesn't seem
to tie up with the output from the inkcov device though, because that allegedly
carries on after an error, whereas this instance doesn't.

Anyway, I've run your file in a batch file, and run Ghostscript over the 1GB
file twenty times in succession without experiencing any faults.

Now, given that the file is the same in every case, I see two possible reasons
for your problem:

1) Ghostscript has some kind of indeterminate problem with images. Given the
huge number of users and the vast number of files being run, this seems
unlikely. Not impossible, but unlikely

2) There is some fault with your hardware. To me this seems much more likely. I
would expect large files to trigger a problem with the disk or disk subsystem
much more frequently, simply because they read much more data.

Basically, I cannot reproduce a problem, I suspect this problem is some
intermittent hardware fault on your platform.
--
You are receiving this mail because:
You are the QA Contact for the bug.
Loading...