Bug 687079 - 289-01.ps fails
Summary: 289-01.ps fails
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: PC All
: P2 normal
Assignee: Ray Johnston
URL:
Keywords:
: 687091 (view as bug list)
Depends on:
Blocks: 687095
  Show dependency tree
 
Reported: 2003-10-14 07:47 UTC by Igor Melichev
Modified: 2008-12-19 08:31 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Melichev 2003-10-14 07:47:27 UTC
289-01.ps fails.
with -dNOOUTERSAVE it prints an error message to the raster.
Without -dNOOUTERSAVE it fails with /typecheck in --put--.
Comment 1 Igor Melichev 2003-10-14 08:22:35 UTC
Here is a clarification :

1. GS is invoked how the regression tool does :

gswin32c.exe -r72 -dNOPAUSE  -dBATCH  -dNOOUTERSAVE -sDEVICE=ppmraw -
sOutputFile=%dir%\cur.ppm -c false 0 startjob pop -f - <%1 1>>cur-1.log 2>>cur-
2.log

2. Actually it prints errors to stdout and doesn't generate a raster.
Comment 2 Alex Cherepanov 2003-10-18 20:35:37 UTC
*** Bug 687091 has been marked as a duplicate of this bug. ***
Comment 3 Ray Johnston 2003-10-20 22:16:25 UTC
The 289-01.ps Genoa Test expects to run under a job server. In particular,
even though the files are run with -dNOOUTERSAVE -c "false 0 startjob pop"
and start under a job server, part of the testing sequence executes the
'true 0 startjob' that exits the server state.

As a result, the test 293-01 section eexecutes 'quit' when it has not
been mapped to 'stop' by 'false 0 startjob'. On an Adobe printer, a
bare 'quit' is used to perform a 'printer reset'. On Ghostscript, the
bare 'quit' causes the Ghostscript to exit without furhter interpretation,
so no page is produced.

The correct solution to this is to make the ^D cause the interpreter
action that would happen in an environment under a job server.

Regression testing will be performed prior to any patches proposed for
this.
Comment 4 Jack Moffitt 2004-06-18 10:15:46 UTC
This is still failing in the regression test.
Comment 5 Ray Johnston 2004-09-08 09:36:58 UTC
This has now been fixed. The src/scantab.c entry for ^D is changed to
be ctype_other which allows it to be a self delimiting token which
is needed in case a ^D is not followed by any whitespace.

The action in gs_init.ps when ^D is found is effectively to end the
curent job, and begin a new encapsulated job.

This new definition, and the initial job encapsulation are both
invoked when -dJOBSERVER is specified on the command line. The
-dNOOUTERSAVE is ignored if -dJOBSERVER is given, and everything
still works fine if job encapsulation is performed explicitly
using:   -c false 0 startjob pop

To avoid 'invalidrestore', input *must* be from stdin. Thus the
normal usage is:

   gs ... -dJOBSERVER - < inputfile.ps

or
   cat inputfile1.ps inputfile2.ps ... | gs ... -dJOBSERVER - 

This now works with the Genoa test suite, as long as jobs are run
individually.

Thie does *NOT* allow all Genoa jobs to be concatenated and sent
as a single stream due to tests which perform direct actions on
stdin such as 'closefile' or 'flushfile' and expect the ^D to
delimit the flushing of stdin. Now it just eats all jobs that
follow. Example of this is 124-01.ps.

Without the 124-01.ps file, the remaining Genoa tests *CAN*
be concatenated and run (several orders tried) to completion!!!

ASCII PostScript such as the Genoa tests can partially be
emulated including ^D causing EOF by invoking the TBCP filter
in a loop, but the problem here is that files that reference
(%stdin) file rather than currentfile will interfere with the
TBCP filter input.