ghostscript - pdf2dsc error: invalidaccess --.locksafe-- -
this problem encountered in preview-latex auctex. believe problem should caused ghostscript, pdf2dsc tool.
the command executed in shell environment
pdf2dsc input.pdf output.dsc
(where input.pdf generated pdflatex) generate empty output.dsc , following error message, breaks preview command chain,
error: /invalidaccess in --.locksafe-- operand stack: true --nostringval-- --dict:1152/1684(ro)(g)-- getenv --nostringval-- execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1870 0 3 %oparray_pop 1869 0 3 %oparray_pop --nostringval-- dictionary stack: --dict:1152/1684(ro)(g)-- --dict:0/20(g)-- --dict:72/200(l)-- current allocation mode local current file position 2063 gpl ghostscript 8.70: unrecoverable error, exit code 1 error: /invalidaccess in --.locksafe-- operand stack: true --nostringval-- --dict:1152/1684(ro)(g)-- getenv --nostringval-- execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- 1870 0 3 %oparray_pop 1869 0 3 %oparray_pop --nostringval-- dictionary stack: --dict:1152/1684(ro)(g)-- --dict:0/20(g)-- --dict:72/200(l)-- current allocation mode local current file position 2063 gpl ghostscript 8.70: unrecoverable error, exit code 1
the man page , google search give little information "locksafe" error message, wander if guys have way fix it.
thanks.
edit input file generated compiling following minimal tex file
\documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} \begin{equation} 1 + 1 = 2 \end{equation} \end{document}
by pdf version 3.14159265-2.6-1.40.15.
pdftex 3.14159265-2.6-1.40.15 (tex live 2014) kpathsea version 6.2.0 copyright 2014 peter breitenlohner (etex)/han thanh (pdftex). there no warranty. redistribution of software covered terms of both pdftex copyright , lesser gnu general public license. more information these matters, see file named copying , pdftex source. primary author of pdftex: peter breitenlohner (etex)/han thanh (pdftex). compiled libpng 1.6.10; using libpng 1.6.10 compiled zlib 1.2.8; using zlib 1.2.8 compiled xpdf version 3.03
i suspected virtually pdf input(for example generated latex -> dvipdf ) produce same error. i'm doing in ~/deskop/input
path.
i use suggested command
gs -sdevice=ps2write -o out.dsc input.pdf
and produce out.dsc
file successfully. png figure produced in next step
gs -sdevice=png16m -o out.png out.dsc
is quite blurred.
anyway, customize auctex variable, , last step dsc png doesn't work, here output
preview-latex exited expected code 1 @ sun jan 8 12:14:19 running `preview-pdf2dsc' ``gs -sdevice=ps2write -o _region_.prv/tmp19812cjl/preview.dsc _region_.pdf'' gpl ghostscript 8.70 (2009-07-31) copyright (c) 2009 artifex software, inc. rights reserved. software comes no warranty: see file public details. processing pages 1 through 1. page 1 preview-pdf2dsc finished @ sun jan 8 12:14:19 running `preview-ghostscript' ``gs -doutputfile\=\(_region_.prv/tmp19812cjl/pr1-\%d.png\) -q -dnosafer -dnopause -dnoplatfonts -dprinted -dtextalphabits\=4 -dgraphicsalphabits\=4 -sdevice\=png16m -r200.255x200.074'' ghostscript filter: args out of range: [(1 102368)], 1
edit
i filed bug report bugzilla.
in meantime, upgrading ghostscript 9.20(lastest) , auctex 11.89(lastest) solve problem.
thanks @kens.
well, simple answer nobody going able 7 year old version of ghostscript, nor without seeing input file.
the error simple, while executing '.locksafe' operator (which non-standard ghostscript extension, provided because of linux users security concerns), program attempted disallowed access object.
the pdf2dsc postscript program (which moderately complex) not execute .locksafe operator directly. call .setsafe, , .setsafe calls .locksafe, possible that's route causing problem.
however, i'm sure aware, debugging piece of software pretty requires run software under same conditions, in order see paths takes. since haven't supplied original input file, can't that. i'm not going try , debug old version either.
to honest, if want dsc-compliant postscript, better use current version of ghostscript , ps2write device instead.
gs -sdevice=ps2write -o out.dsc input.pdf
Comments
Post a Comment