Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 153078

Summary: dev-tex/latex2html-2002.2.1_pre20041025-r1 pstoimg crashes when converting picture
Product: Gentoo Linux Reporter: pavel sanda <ps>
Component: Current packagesAssignee: TeX project <tex>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: jstein
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: poscript example
patch for pstoimg.pl
pstoimg2.patch

Description pavel sanda 2006-10-27 15:18:14 UTC
when i try to convert postscript file (see attachment) i get the following error:
$ pstoimg bum.ps
pstoimg V2002-2-1 (Revision 1.19, Perl 5.008008)
pstoimg: Processing bum.ps
pstoimg: Error: "/usr/bin/ppmquant 256 < /tmp/p14449.pnm | /usr/bin/pnmtopng  > bum.png" failed: Bad file descriptor

when the output from gnuplot is the same picture in 
monochromatic colors no error occurs, which is probably caused 
by the fact that ppmquant is not called.

using dev-tex/latex2html-2002.2.1_pre20041025-r1.
(i have tried both netpbm 10.36.0 and 10.34)
Comment 1 pavel sanda 2006-10-27 15:20:15 UTC
Created attachment 100620 [details]
poscript example
Comment 2 Alexandre Buisse (RETIRED) gentoo-dev 2006-10-28 19:49:48 UTC

*** This bug has been marked as a duplicate of 111188 ***
Comment 3 pavel sanda 2007-01-09 13:48:00 UTC
this bug shares the eroror  message with 111188 , but it is not the same error,
as bug-file for 111188 works without problems for me.
i will add patch for this bug soon
Comment 4 pavel sanda 2007-01-09 14:00:47 UTC
this bug is caused by the fact, that the intermediate .pnm file created in pstoimg
consists of two images (see pamfile -allimages).
older versions of netpbm ignored this fact and just took the first
one, however the new version check this and pnmquant fails with error.

my fix simply takes only the first image, which is then used for pnmquant.
see patch for pstoimg. 
Comment 5 pavel sanda 2007-01-09 14:01:34 UTC
Created attachment 106207 [details, diff]
patch for pstoimg.pl
Comment 6 Alexis Ballier gentoo-dev 2008-10-31 22:05:09 UTC
hmm you have the -multipage option for this.
admitedly the error message is weird and that patch could be useful, but then i'll need one that applies when building latex2html
Comment 7 pavel sanda 2008-11-16 20:04:36 UTC
Created attachment 172018 [details, diff]
pstoimg2.patch

better one
Comment 8 pavel sanda 2011-07-14 10:41:50 UTC
i added latex2html-2008-r2 which fixes this crash into rebutia overlay
Comment 9 Jonas Stein gentoo-dev 2017-12-19 20:26:23 UTC
Please test with dev-tex/latex2html-2017.2-r2 and dev-tex/latex2html-2015