Your message dated Tue, 02 Jan 2024 11:03:53 -0600
with message-id <9282685.CDJkKcVGEf@riemann>
and subject line Re: Re: “Error: /invalidfileaccess in --file--” when
converting PBM file to PDF
has caused the Debian Bug report #1016424,
regarding “Error: /invalidfileaccess in --file--” when converting PBM file to
PDF
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1016424: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1016424
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: ghostscript
Version: 9.53.3~dfsg-7+deb11u2
Severity: normal
X-Debbugs-Cc: [email protected]
Ghostscript fails to convert PBM files to PDF. Attempts were made with
3 different PBM files:
1) scanner-made PDF → (pdfimages -all) → (unpaper) → PBM →
(ghostscript/pdfwrite) → error
2) tex → (LaTeX) → PDF → (ghostscript/pbm) → PBM → (ghostscript/pdfwrite) →
error
3) (imagemagick) → PBM → (ghostscript/pdfwrite) → error
This seems to show that PBMs of any kind produce an error when using
the PDFwrite driver. Case 2 is interesting because it shows
Ghostscript’s own output is fed back into it and it can’t handle it.
Case 3 is demonstrated below because it requires no source file to
start with (ImageMagick gives a way to generate an arbitrary image
on-the-fly). So it’s easy to reproduce as long as ImageMagick is
installed.
===8<------------------------------
$ convert logo: -colors 2 -colorspace gray -normalize pbm:im_logo.pbm
$ gs -sDEVICE=pdfwrite -q -r300 -dSCALE=1 -o im_logo.pdf --
/usr/share/ghostscript/9.53.3/lib/viewpbm.ps im_logo.pbm
Error: /invalidfileaccess in --file--
Operand stack:
(im_logo.pbm) (r)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 1990 1 3 %oparray_pop
1989 1 3 %oparray_pop 1977 1 3 %oparray_pop 1833 1 3
%oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval--
--nostringval-- --nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- %array_continue --nostringval--
Dictionary stack:
--dict:734/1123(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)--
--dict:0/20(L)--
Current allocation mode is local
Last OS error: Permission denied
Current file position is 10282
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
===8<------------------------------
It’s worth noting that case 2 has no problem if the middle step uses
the ppmraw driver instead of the pbm driver. So I thought perhaps a
workaround would be to convert the PBM file produced by unpaper (case
1) to PPM, then feed the PPM file into GS -- but no, the same
“invalidfileaccess” occurs. I also retried case 3 but using a PPM
instead, which also failed:
===8<------------------------------
$ convert logo: -colors 2 -colorspace gray -normalize pbm:im_logo.ppm
$ gs -sDEVICE=pdfwrite -q -r300 -dSCALE=1 -o im_logo_ppm.pdf --
/usr/share/ghostscript/9.53.3/lib/viewpbm.ps im_logo.ppm
Error: /invalidfileaccess in --file--
Operand stack:
(im_logo.ppm) (r)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval--
--nostringval-- 2 %stopped_push --nostringval-- --nostringval--
--nostringval-- false 1 %stopped_push 1990 1 3 %oparray_pop
1989 1 3 %oparray_pop 1977 1 3 %oparray_pop 1833 1 3
%oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval--
--nostringval-- --nostringval-- 2 %stopped_push --nostringval--
--nostringval-- --nostringval-- %array_continue --nostringval--
Dictionary stack:
--dict:734/1123(ro)(G)-- --dict:0/20(G)-- --dict:87/200(L)--
--dict:0/20(L)--
Current allocation mode is local
Last OS error: Permission denied
Current file position is 10282
GPL Ghostscript 9.53.3: Unrecoverable error, exit code 1
===8<------------------------------
-- System Information:
Debian Release: 11.4
APT prefers stable-updates
APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990,
'testing'), (990, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.0-16-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages ghostscript depends on:
ii libc6 2.31-13+deb11u3
ii libgs9 9.53.3~dfsg-7+deb11u2
ghostscript recommends no packages.
Versions of packages ghostscript suggests:
ii ghostscript-x 9.53.3~dfsg-7+deb11u2
-- no debconf information
--- End Message ---
--- Begin Message ---
On Sun, 31 Jul 2022 21:46:27 +0200 anonymous coward <debbug.1016424@sideload.
33mail.com> wrote:
> Package: ghostscript
> Version: 9.53.3~dfsg-7+deb11u2
> Followup-For: Bug #1016424
> X-Debbugs-Cc: [email protected]
>
> > Therefore please report the issue upstream.
>
> I just happened to have an account on the upstream bug tracker that
> still works, so I reported here:
>
> https://bugs.ghostscript.com/show_bug.cgi?id=705699
Upstream bug is resolved. See the link above for detailed notes as there has
been a deliberate change in behaviour so that this is regarded as not a bug,
but rather the command invocation needs adjustment.
-Steve
signature.asc
Description: This is a digitally signed message part.
--- End Message ---