Bug 416321 - ghostscript-8.60 errors out on files accepted by ghostscript-8.15 and breaks printing
ghostscript-8.60 errors out on files accepted by ghostscript-8.15 and breaks ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: ghostscript (Show other bugs)
8
All Linux
low Severity high
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
http://bugs.ghostscript.com/show_bug....
:
Depends On:
Blocks: F8Target
  Show dependency treegraph
 
Reported: 2007-12-07 20:51 EST by Michal Jaegermann
Modified: 2007-12-20 14:52 EST (History)
1 user (show)

See Also:
Fixed In Version: 8.61-5.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-20 14:52:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Postscript file which spooks ghotscript-8.60 (330.76 KB, text/plain)
2007-12-07 20:51 EST, Michal Jaegermann
no flags Details
errors from an attempt to view this PS with evince on F8 (959 bytes, text/plain)
2007-12-07 20:55 EST, Michal Jaegermann
no flags Details
Patch for fixing pipe problem (644 bytes, patch)
2007-12-09 11:32 EST, Sammy
no flags Details | Diff

  None (edit)
Description Michal Jaegermann 2007-12-07 20:51:17 EST
Description of problem:

An attached sample Postscript file is produced by acroread.
On F7 with ghostscript-8.15 it produces a page with such text:

"Warning: This form is not supported with the current version
of Acrobat or Adobe Reader. Upgrade to the latest version for
full support."

An attempt to view this file with evince on F8 ends up with:

Error: /undefined in eartomark
Operand stack:
   --nostringval--
Execution stack:
..... 
(Full error ouput, the same for x86_64 and i386 attached too).

With gv one gets just a blank window.

Unfortunately there are various PDF files which are not handled
by open source tools and acroread is sometimes required.
An upshot of the above is that if one tries to print from
acroread window then, with a default printer policy to abort
jobs on errors, results are that attempts to print silently
vanish.

Version-Release number of selected component (if applicable):
ghostscript-8.60-5.fc8

How reproducible:
always
Comment 1 Michal Jaegermann 2007-12-07 20:51:17 EST
Created attachment 281821 [details]
Postscript file which spooks ghotscript-8.60
Comment 2 Michal Jaegermann 2007-12-07 20:55:10 EST
Created attachment 281831 [details]
errors from an attempt to view this PS with evince on F8
Comment 3 Michal Jaegermann 2007-12-08 13:18:26 EST
A check with rawhide ghostscript-8.61-5.fc9 and feeding a sample file to
'gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=lj4dith -sOutputFile=- -'
command, like printing could do, brings the same kind of errors.

Interestingly enough 'ps2ascii' nearly works.  "Nearly" in that sense that
it does produce a text from the attached PS file but it also has some
additions; like "Wa rnig: ThsfomtupedwcvAbaR." and "Reader. Ul".

The current workaround is to back off ghostscript to a version from F7
repositories and then viewing and printing does work.  No recompilation
required.  Although "ps2ascii additions" are present too.
Comment 4 Sammy 2007-12-08 14:08:45 EST
In my testing ghostscript 8.61 (I have few more patches than Fedora)
works fine so does the new gsview 4.9. Failing programs are: evince,
kghostview, gv (just shows a blank page).

My impression is that these programs make a mistake in invoking gs 8.61
in this particular case otherwise gsview 4.9 would not work either and
version 4.9 was just announced to support gs 8.61. There must be something
different.
Comment 5 Michal Jaegermann 2007-12-08 14:32:02 EST
> I have few more patches than Fedora
Quite possibly they make this difference.  When I am trying,
with ghostscript-8.61-5.fc9, a command from comment #3 there is
a long pause and after that "Error: /undefined in eartomark" and
all that followup jazz.

ghostscript-8.15.4-3.fc7 produced 19213 bytes of output in
real    0m0.546s
user    0m0.490s
sys     0m0.042s
Comment 6 Sammy 2007-12-08 16:33:35 EST
Does gs itself show the file correctly?

I do get the same error if I run comment #3 but not with gs alone and
not with gv (EXCEPT turn DSC off under gv options) and gsview.

Also, if I run:
 
gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=lj4dith -sOutputFile=- file.ps

seems to work! Clearly the error is coming from the way each application is
feeding the file to gs. This is why some are working and some not. There may
have been a change in gs or it is a bug. Investigation continues.....
Comment 7 Sammy 2007-12-08 16:42:48 EST
OK. I found this under ghostscript bugzilla:

      http://bugs.ghostscript.com/show_bug.cgi?id=689577

The workaround is somewhat involved. Someone needs to look into this.
Comment 8 Sammy 2007-12-08 17:01:26 EST
I filed bugs with cups and foomatic for the needed changes there. In the
mean time the line:

gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=lj4dith -sOutputFile=- -_

works fine (note the underscore after -).

Since you are an evince user could you file a bug with them and direct them
to this bug.
Thanks
Comment 9 Michal Jaegermann 2007-12-08 21:17:04 EST
Yes, commands from comment #6 and comment #8 do work; at least for
ghostscript-8.61-5.fc9. gs and gsx (that what I able to find; I guess
that gsx is a gsview equivalent) show, on rawhide, my sample file.
Thanks for bugs.ghostscript.com reference.  I guess that it explains
what is happening here.

Contrary to some suggestions on ghostscript bugzilla turning off DSC
in gv does not seem to have any effects; always a blank page.

> Since you are an evince user ...
Actually you can hardly accuse me of that. :-)  I just found that
evince provided a convenient way to demonstrate the problem.  This
is really not an evince bug but one in ghostscript.

Comment 10 Sammy 2007-12-09 11:30:00 EST
The fix for this was committed to ghostscript trunk. I am attaching the patch.
However, this may come back at some point in the future. The fixes that add
an ""_" after "-" are still good and may prevent a future problem but this is
up to each packager to decide.
Comment 11 Sammy 2007-12-09 11:32:25 EST
Created attachment 282271 [details]
Patch for fixing pipe problem
Comment 12 Michal Jaegermann 2007-12-09 13:27:27 EST
I do not know much about ghotscript internals but that fix smells
awfully like a hack.  Something else will drop into a file another
eexec block instead of "the following eleven lines" from Adobe and
the "magic constant" will not work in such case.  Don't you think
that this is a distinct possibility?

OTOH a comment 17 from a discussion on ghostscript bugzilla does
suggest that foomatic should use '-_' instead of '-' for stdin
anyway (and the same applies for other non-interactive uses).
Comment 13 Sammy 2007-12-10 16:28:39 EST
I agree and urge foomatic to modify foomatic-gswrapper script as suggested
as well as cups to modify pstoraster. Ghostscript has already modified
their pstoraster and pstopxl scripts to use "-_" for keeps!

Could we get some response for this bug?
Thanks
Comment 14 Tim Waugh 2007-12-11 12:32:15 EST
New package built, should be in updates-testing soon.
Comment 15 Fedora Update System 2007-12-12 14:52:32 EST
ghostscript-8.61-4.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'
Comment 16 Michal Jaegermann 2007-12-12 19:04:13 EST
I am afraid that with ghostscript-8.61-4.fc8 I still see on my test file
while trying
gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDEVICE=lj4dith -sOutputFile=- -
the same errors as before.  It does work if I will use '-_' for input but
that we knew.

Also evince spills familiar errors and both evince and gv show a blank
page.  OTOH 'gs test_file.ps' does produce an image of a page with
an expected text displayed.  So this did change.  Not much yet ...
Comment 17 Sammy 2007-12-12 19:42:03 EST
I think he meant ghostscript-8.61-5.fc8
Comment 18 Michal Jaegermann 2007-12-12 20:00:47 EST
> I think he meant ghostscript-8.61-5.fc8

Well, comment #15 says ghostscript-8.61-4.fc8 and that is what I found
in updates-testing.  Granted, looking closer that package is a bit old
but this is also what is listed in "Fedora updates-testing report" from
today.  Sigh!
Comment 19 Tim Waugh 2007-12-13 05:26:24 EST
Indeed, my mistake.  I've pushed ghostscript-8.61-5.fc8 to the updates system
now, and it should get into the next batch of updates.  Sorry!
Comment 20 Fedora Update System 2007-12-15 12:49:17 EST
ghostscript-8.61-5.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update ghostscript'
Comment 21 Michal Jaegermann 2007-12-15 15:09:20 EST
> ghostscript-8.61-5.fc8 has been pushed ....
WORKSFORME on various tests with samples which gave me troubles
before.  Although "testing" repos seem to lag quite a bit behind,
despite of annoucements, so this was on a copy from koji. Thanks!
Comment 22 Fedora Update System 2007-12-20 14:52:54 EST
ghostscript-8.61-5.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.