Error about Ghostscript

chris zqy2000zqy at gmail.com
Thu Oct 18 06:19:39 PDT 2007


> chris wrote:
>
> >> And if you want to be even more sophisticated in your debugging, you'd
> >> create a separate file for the output of each filter, and a separate
> >> *.err error log (and you probably can simplify your $args to the dummy
> >> "1 2 3 4 5" too, and test the full swag later):
> >>
> >>
> >> PPD=/etc/cups/ppd/isc2428ps.ppd \
> >>     /usr/lib/cups/filter/texttops 1 2 3 4 5 /etc/cups/mime.types \
> >>     2> texttops.err \
> >>     | tee output-from-texttops.prn \
> >>     | PPD=/etc/cups/ppd/isc2428ps.ppd \
> >>     /usr/lib/cups/filter/pstops  1 2 3 4 5 \
> >>     2> pstops.err \
> >>     | tee output-from-pstops.prn
> >>
> >> PPD=/etc/cups/ppd/isc2428ps.ppd \
> >>     /usr/lib/cups/filter/foomatic-rip 1 2 3 4 5 output-from-pstops.prn \
> >>     2> foomatic-rip.err \
> >>     | tee resulting-printfile.prn
> >>
> >>
> >> --
> >> Kurt Pfeifle
> >> System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
> >> Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
> >> A RICOH Company  ...........................  D-70327 Stuttgart/Germany
> >
> >
> >
> >
> > Thanks , I follow your example and I can get the file should be fed to
> > the gs command line.
>
> No, you got it wrong.
>
> The file you get from
>
>   PPD=/etc/cups/ppd/isc2428ps.ppd /usr/lib/cups/filter/texttops [....]
>
> is "output-from-pstops.prn". And it is meant to be fed to "foomatic-rip",
> not gs. If you feed it to foomatic-rip like the next command above shows:
>
>   PPD=/etc/cups/ppd/isc2428ps.ppd /usr/lib/cups/filter/foomatic-rip 1 2 3 4 5 output-from-pstops.prn
>
> then foomatic-rip will run gs on behalf of you. However, it is important
> that you run these commands as the same user the backends do run as when
> started by CUPS. So you may need to do a "su - lp" (from being root, and
> make sure that the su command will really let you change user...)
>
> Only then you can assume to have tested the chain manually within an en-
> vironment that resembles the real CUPS processes. The *.err messages may
> give you more hints about what is wrong.
>
> BTW, here is another thought:
>
>   CUPS usually uses a "temp" dir in /var/spool/cups/temp to temporarily
>   store temp files
>
> Grep for "TMPDIR" in your debug level log file to see where your CUPS does
> look for it.
>
> You should make sure it exists and your user "lp" has write and read access
> to it. You may want to cd to that dir to run the manual commands.
>
> You also may want to set additional env vars (as can be seen in error_log
> when grepping for "envp["
>
> > If I manully run gs and lp the printer works
> > fine.   If they run in cups automately, I has this error.
>
> Don't run gs manually, run foomatic-rip manually. And do it as user
> lp. And make it output its files to $TMPDIR.
>
>
> --
> Kurt Pfeifle
> System & Network Printing Consultant ---- Linux/Unix/Windows/Samba/CUPS
> Infotec Deutschland GmbH  .....................  Hedelfinger Strasse 58
> A RICOH Company  ...........................  D-70327 Stuttgart/Germany




I first run
  PPD=/etc/cups/ppd/isc2428ps.ppd /usr/lib/cups/filter/texttops [....]
and got the  "output-from-pstops.prn".

next I run
  PPD=/etc/cups/ppd/isc2428ps.ppd /usr/lib/cups/filter/foomatic-rip 1 2 3 4 5 output-from-pstops.prn

Then the error :
 <job data>
D [16/Oct/2007:20:36:21 +0000] [Job 1]
D [16/Oct/2007:20:36:21 +0000] [Job 1] renderer PID kid4=1850
D [16/Oct/2007:20:36:21 +0000] [Job 1] renderer command: gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs -sIjsServer=hpijs -sDeviceManufacturer="HEWLETT-PACKARD" -sDeviceModel="deskjet 3600" -dDEVICEWIDTHPOINTS=612 -dDEVICEHEIGHTPOINTS=792 -r300 -sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=1 -dIjsUseOutputFD -sOutputFile=- -
D [16/Oct/2007:20:36:23 +0000] [Job 1] foomatic-gswrapper: gs '-sstdout=%stderr' '-dBATCH' '-dPARANOIDSAFER' '-dQUIET' '-dNOPAUSE' '-sDEVICE=ijs' '-sIjsServer=hpijs' '-sDeviceManufacturer=HEWLETT-PACKARD' '-sDeviceModel=deskjet 3600' '-dDEVICEWIDTHPOINTS=612' '-dDEVICEHEIGHTPOINTS=792' '-r300' '-sIjsParams=Quality:Quality=0,Quality:ColorMode=2,Quality:MediaType=0,Quality:PenSet=1' '-dIjsUseOutputFD' '-sOutputFile=%stdout' '-'
D [16/Oct/2007:20:36:24 +0000] [Job 1]
D [16/Oct/2007:20:36:24 +0000] [Job 1] Closing renderer
D [16/Oct/2007:20:36:24 +0000] [Job 1] unable to create Job object err=3
D [16/Oct/2007:20:36:24 +0000] [Job 1] Segmentation fault
D [16/Oct/2007:20:36:26 +0000] [Job 1] Error: /ioerror in --.outputpage--
D [16/Oct/2007:20:36:26 +0000] [Job 1] Operand stack:


and I find the "unable to create Job object err=3" is printed by hpijs...  and the return value indicate when alloc mem failed..
But I have very enough mem , and if run gs derectly instead of foomatic-rip , there will be no error...
I'm so confused...

BTW: my system doesn't has usr lp.




More information about the cups mailing list