#997038 evince: Print preview of PS file get blank page and en error "fatal internal error -100"

Package:
evince
Source:
evince
Description:
Document (PostScript, PDF) viewer
Submitter:
Davide Prina
Date:
2021-10-22 19:39:03 UTC
Severity:
normal
#997038#5
Date:
2021-10-22 19:36:54 UTC
From:
To:
Dear Mainteiner,

when I try to do a print preview I have a blank page, the same if I try to print it.
PS file is obtained with pdftops program (I used it to print faster PDF files on ps printers) and some time ago (probably about 2 year ago, befoure covid) I used it a lot.

I can reproduce the bug with any ps generated file, for example:

$ pdftops /usr/share/debian-reference/debian-reference.en.pdf ref.ps

$ evince ref.ps

and when I try to see the print preview I get blank page.

I see that there are same bug reports on similar issues, but I see that they are old (so not my case) and I see that there was a bug #977754 on evince now closed and I think that the problem is the same solved with PDF file.

When I try to print or print preview a ps file obtained by pdftops i get:

$ evince a.ps
GPL Ghostscript 9.54.0: Unrecoverable error, exit code 1
(libspectre) ghostscript reports: fatal internal error -100

I have try to use valgrind, but I get only "blocks definitely/indirectly/possibly lost"

Looking at libspectre1 package I can see that:

I found that this error is generate calling in the spectre_gs_run function the instruction:
gsapi_init_with_args (gs->ghostscript_instance, n_args, args);

the three values are:

gs->ghostscript_instance: 0x5583febe7ed0 (so it is not null)
n_args: 10
 arg[0]=libspectre
 arg[1]=-dMaxBitmap=10000000
 arg[2]=-dBATCH
 arg[3]=-dNOPAUSE
 arg[4]=-dSAFER
 arg[5]=-P-
 arg[6]=-sDEVICE=pdfwrite
 arg[7]=-sOutputFile=/tmp/user/1000/evince_print.pdf.AVDQB1
 arg[8]=-c
 arg[9]=.setpdfwrite

Ciao
Davide