Bug 700023 - Ghostscript command line: /usr/bin/gs :Unrecoverable error: undefined in .putdeviceprops
Summary: Ghostscript command line: /usr/bin/gs :Unrecoverable error: undefined in .put...
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: CUPS driver (show other bugs)
Version: 9.25
Hardware: PC Linux
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-23 09:57 UTC by YangGuangJing
Modified: 2018-11-16 18:08 UTC (History)
4 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Research file of ghostscript command test in 9.25. (13.96 KB, application/pdf)
2018-10-23 09:57 UTC, YangGuangJing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description YangGuangJing 2018-10-23 09:57:26 UTC
Created attachment 15946 [details]
Research file of ghostscript command test in 9.25.

PDF file data fail to rendering to raster data.

We were reported a bug from our printer users:
I print file use papersize A5 (Ubuntu 16.04.1(x64),Ghostscript 9.18) is Okay.

But, after I update (apt-get upgrade) to Ubuntu 16.04.5(x64),Ghostscript 9.25, I print the same file with the same driver there is an error reports:
"Filter Error"

I figure out that all the papersize with define "LeadingEdge" can't print success after update.
(with "LeadingEdge":A5, Statement, A4(without "LeadingEdge") is print Okay).


I view the "CUPS Error Log",there is an error reports when print job fails:
"Ghostscript command line: /usr/bin/gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups -sstdout=%stderr -sOutputFile=%stdout -sMediaType=Plain -sOutputType=Pass=1,Direction=1 -r600x600 -dLeadingEdge=1 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=420 -dDEVICEHEIGHTPOINTS=595 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -scupsPageSizeName=A5 -I/usr/share/cups/fonts -c \'<</.HWMargins[14.400000 14.400000 14.399994 14.400024] /Margins[0 0]>>setpagedevice\' -f -_

Unrecoverable error: undefined in .putdeviceprops"

I think that this is a bug of ghostscript 9.25.

Below information are the research of I do:

(I am using Ubuntu 16.04.5(x64),Ghostscript 9.25)
I am running gs command below (with "-dLeadingEdge=1"):
gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups  -sMediaType=Plain -sOutputType=Pass=1,Direction=1 -r600x600 -dLeadingEdge=1 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=420 -dDEVICEHEIGHTPOINTS=595 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -scupsPageSizeName=A5 -o ~/Desktop/out_A5.prn ~/Desktop/d00017-001.pdf

Reports an error:
Unrecoverable error: undefined in .putdeviceprops


I am running gs command below (without "-dLeadingEdge=1"):
gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -sDEVICE=cups  -sMediaType=Plain -sOutputType=Pass=1,Direction=1 -r600x600 -dMediaPosition=7 -dDEVICEWIDTHPOINTS=420 -dDEVICEHEIGHTPOINTS=595 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=1 -scupsPageSizeName=A5 -o ~/Desktop/out_A5.prn ~/Desktop/d00017-001.pdf

Reports no error.

Above all, we think this is a bug of ghostscript that ghostscript can't deal with the flag "-dLeadingEdge" on version 9.25 (version 9.18 is Okay.). 

My questions are:
1. Do you have any plan to fix it?
2. Is there any workaround?
Comment 1 Chris Liddell (chrisl) 2018-10-23 11:21:15 UTC
Regression caused by:

http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=478a0a862d25
Comment 2 Chris Liddell (chrisl) 2018-10-23 12:48:00 UTC
This fixes the problem, and I think behaves correctly:

http://git.ghostscript.com/?p=user/chrisl/ghostpdl.git;a=commitdiff;h=3b91a3aaeb3b


But I'd like Ray to review the commit before I push it.
Comment 3 Chris Liddell (chrisl) 2018-10-23 16:17:56 UTC
Fixed in:

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=73f7c6eb9259
Comment 4 YangGuangJing 2018-10-24 01:28:10 UTC
(In reply to Chris Liddell (chrisl) from comment #3)
> Fixed in:
> 
> http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=73f7c6eb9259

Dear Chris,
   Thanks for your correspondence so quickly.

Now we knew that this a bug of ghostscript(9.25) and you have a solution for it, will you fit it in the next version(9.26) release?

And can you offer the accurate time that you release the version that fix this bug?

And is there any workaround for our printer driver customers to do the print job normally by using paper size like A5(with "LeadingEdge")?
Comment 5 Ken Sharp 2018-10-24 07:15:11 UTC
(In reply to YangGuangJing from comment #4)
 
> Now we knew that this a bug of ghostscript(9.25)

Incorrect, I'm afraid, this was introduced in 9.22, a year ago.


> and you have a solution for
> it, will you fit it in the next version(9.26) release?

Naturally.

 
> And can you offer the accurate time that you release the version that fix
> this bug?

No.

 
> And is there any workaround for our printer driver customers to do the print
> job normally by using paper size like A5(with "LeadingEdge")?

No. You simply can't use LeadingEdge with the CUPS device.
Comment 6 Chris Liddell (chrisl) 2018-10-24 07:22:59 UTC
I would add:

I'm assuming that as the problem arose via the cups print workflow that the "customers" you refer to are users of Ricoh printers that use Linux - i.e. they use Ghostscript as packaged by their distribution.

That being the case, in situations like this, package maintainers often pick up patches like this before the feature in an official release of ours.

I'd suggest if that doesn't happen for any of you customers, they contact the Ghostscript package maintainer for their distribution, and prompt them to look at this bug, and pull the patch into their package.
Comment 7 YangGuangJing 2018-10-25 11:12:33 UTC
Dear Chris,

   We were reported this error from a lot of users, and almost all of our raster printer drivers were affected by this bug. 

   Since more and more our printer driver users were affected by this bug, can you speed up the process of release the next version (Version 9.26) of ghostscript.

And most importantly, our printer driver users can't do their normal print jobs. So, we are eagerly hopping that you can offer us a patch to fix this bug before your official release (Version 9.26).

>That being the case, in situations like this, package maintainers often pick up >patches like this before the feature in an official release of ours.
>I'd suggest if that doesn't happen for any of you customers, they contact the >Ghostscript package maintainer for their distribution, and prompt them to look at >this bug, and pull the patch into their package.

Our printer drivers are only supported on Linux Ubuntu OS, so can you contact the Ubuntu package maintainer to pick up this patch to their distribution?


Best Regards.
Comment 8 Chris Liddell (chrisl) 2018-10-25 11:50:27 UTC
(In reply to YangGuangJing from comment #7)
> Dear Chris,
> 
>    We were reported this error from a lot of users, and almost all of our
> raster printer drivers were affected by this bug. 
> 
>    Since more and more our printer driver users were affected by this bug,
> can you speed up the process of release the next version (Version 9.26) of
> ghostscript.
> 
> And most importantly, our printer driver users can't do their normal print
> jobs. So, we are eagerly hopping that you can offer us a patch to fix this
> bug before your official release (Version 9.26).

We're planning a release within the next 6 weeks, and we really can't do it any quicker (that is already ~4 months earlier than our normal schedule).

> >That being the case, in situations like this, package maintainers often pick up >patches like this before the feature in an official release of ours.
> >I'd suggest if that doesn't happen for any of you customers, they contact the >Ghostscript package maintainer for their distribution, and prompt them to look at >this bug, and pull the patch into their package.
> 
> Our printer drivers are only supported on Linux Ubuntu OS, so can you
> contact the Ubuntu package maintainer to pick up this patch to their
> distribution?

The maintainer in question (AFAIK) is Till, who you may have noted was the original assignee for this bug, and also added himself to the CC list for this bug - so he is aware.
Comment 9 YangGuangJing 2018-10-25 12:04:45 UTC
>We're planning a release within the next 6 weeks
>and also added himself to the CC list for this bug - so he is aware.
Thanks very much for your correspondence so quickly.
Comment 10 Till Kamppeter 2018-10-25 15:23:48 UTC
YangGuangJing, please report a bug on

https://bugs.launchpad.net/ubuntu/

for the package "ghostscript". Tell also which Ubuntu versions suffer this bug.

Thanks.
Comment 11 YangGuangJing 2018-10-26 02:04:37 UTC
(In reply to Till Kamppeter from comment #10)
> YangGuangJing, please report a bug on
> 
> https://bugs.launchpad.net/ubuntu/
> 
> for the package "ghostscript". Tell also which Ubuntu versions suffer this
> bug.
> 
> Thanks.

Dear Till,
  We had report this bug on ubuntu:
https://bugs.launchpad.net/ubuntu/+source/linphone/+bug/1800062

New, we are eagerly hopping that you can offer us a patch of Ubuntu 16.04 to fix this bug(and the accurate time that we can pick up the patch).

After that(16.04),we hope that Ubuntu 18.04 patch can also be offered.
Comment 12 Ray Johnston 2018-11-16 18:08:22 UTC
Hint: Read the documenation. Look for .htm files that contain "halftone".
Ghostscript supports PostScript Level 3 halftones and includes some
tools to do special dithering/halftoning.