pdf - tty

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jayjay
Posts: 3
Joined: 2013-07-10T23:31:32-07:00
Authentication code: 6789

pdf - tty

Post by jayjay »

If you try to convert certain pdf-files using magick++ without being logged on/using a tty under linux, you get an errormessage:


Magick: Postscript delegate failed `/tmp/magick-12151iAzPpgLwp8cj': No such file or directory @ error/pdf.c/ReadPDFImage/682.

If I redo the same job while being logged on, everything works. It might be related to something within ghostscript.
jayjay
Posts: 3
Joined: 2013-07-10T23:31:32-07:00
Authentication code: 6789

Re: pdf - tty

Post by jayjay »

imagemagick 6.8.6-4
ghostscript 9.07
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: pdf - tty

Post by dlemstra »

It seems that ImageMagick cannot find Ghostscript. You will get more info when you use the following statement:

Code: Select all

MagickCore::SetLogEventMask("All");
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
jayjay
Posts: 3
Joined: 2013-07-10T23:31:32-07:00
Authentication code: 6789

Re: pdf - tty

Post by jayjay »

strace shows that imagemagick does find ghostscript and also executes it.
However, ghostscript fails with an unrecoverable error. This is probably not related to imagemagick. Ill figure it out on my own. Thanks for your quick response anyway.


4363 execve("/usr/bin/gs", ["gs", "-q", "-dQUIET", "-dSAFER", "-dBATCH", "-dNOPAUSE", "-dNOPROMPT", "-dMaxBitmap=500000000",
"-dAlignToPixels=0", "-dGridFitTT=2", "-sDEVICE=pngalpha", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4",
"-r200x200", "-sOutputFile=/tmp/magick-4048Ux50JyKinPdO%d", "-f/tmp/magick-4048RrBZY9XEcUeP", "-f/tmp/magick-40489tSD-U7ux5fQ"], [/* 23 vars */]) = 0

...

4363 write(2, " **** Warning: stream operator isn\'t terminated by valid EOL.\n", 64) = -1 EIO (Input/output error)
4363 write(2, "\0", 1) = -1 EIO (Input/output error)
4363 fstat(1, {st_mode=S_IFREG|0644, st_size=6933, ...}) = 0
4363 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffb0f042000
4363 write(1, "Error: /ioerror", 15) = 15
4363 write(1, " in --run--", 11) = 11
4363 write(1, "\nOperand stack:\n --dict:6/6(L)-- --dict:74/74(ro)(L)-- PageSpotColors --dict:6/6(L)-- --dict:0/0(L)-- --dict:1/4(L)-", 128) = 128
4363 write(1, "- 5448338 1 0 --dict:10/19(L)-- --nostringval-- --nostringval-- --nostringval-- ( **** Error reading a content", 128) = 128
4363 write(1, " stream. The page may be incomplete.\\n)\nExecution stack:\n %interp_exit .runexec2 --nostringval-- --nostringval-- --nos", 128) = 128
4363 write(1, "tringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1900 1 3 ", 128) = 128
4363 write(1, " %oparray_pop 1899 1 3 %oparray_pop 1883 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 25 --", 128) = 128
4363 write(1, "nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- ", 128) = 128
4363 write(1, " %loop_continue --nostringval-- --dict:1/1(L)-- --nostringval-- 1 %dict_continue --nostringval-- --nostringval-- ", 128) = 128
4363 write(1, " --nostringval-- --nostringval--\nDictionary stack:\n --dict:1166/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --d", 128) = 128
4363 write(1, "ict:82/200(L)-- --dict:109/127(ro)(G)-- --dict:292/300(ro)(G)-- --dict:25/32(L)-- --dict:3/6(L)--\nCurrent allocation mod", 128) = 128
4363 write(1, "e is local\nLast OS error: Input/output error\n", 45) = 45
4363 write(2, "GPL Ghostscript ", 16) = -1 EIO (Input/output error)
4363 write(2, "\0", 1) = -1 EIO (Input/output error)
4363 write(2, "9.07", 4) = -1 EIO (Input/output error)
4363 write(2, "\0", 1) = -1 EIO (Input/output error)
4363 write(2, ": ", 2) = -1 EIO (Input/output error)
4363 write(2, "\0", 1) = -1 EIO (Input/output error)
4363 write(2, "Unrecoverable error, exit code 1\n", 33) = -1 EIO (Input/output error)
4363 write(2, "\0", 1) = -1 EIO (Input/output error)
4363 munmap(0x7ffb0d50e000, 14979072) = 0
4363 write(1, "Unrecoverable error: ioerror", 28) = 28
4363 write(1, " in quit\n", 9) = 9
4363 write(1, "Operand stack:\n --nostringval--", 34) = 34
4363 write(1, " --nostringval--", 17) = 17
4363 write(1, "\n", 1) = 1
4363 close(8) = 0
broucaries
Posts: 467
Joined: 2008-12-21T11:51:10-07:00

Re: pdf - tty

Post by broucaries »

Could you post an example program ?

What is your distribution/OS ?
Post Reply