HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Incoming faxes sometimes result in invalid TIFF documents

Sorry it's taken me this long to respond, but here's some stuff I've found out:

We do actually have libtiff installed using libjbig. You were right
about my viewer now supporting it. I verified with a different viewer
that I downloaded. So, that's good.

The problem really seems to be the process by which the tiff is
converted to PDF. After a lot of digging through hylafax, I found that
it was using /usr/bin/tiff2pdf to do the conversion. When the it was
doing that, this would happen:

fax # tiff2pdf -d -o tmp/fax000125802.pdf recvq/fax000125802.tif
*** glibc detected *** tiff2pdf: free(): invalid pointer: 0x08096358 ***
======= Backtrace: =========
======= Memory map: ========
08048000-08055000 r-xp 00000000 09:02 2004474    /usr/bin/tiff2pdf
08055000-08056000 r--p 0000c000 09:02 2004474    /usr/bin/tiff2pdf
08056000-08057000 rw-p 0000d000 09:02 2004474    /usr/bin/tiff2pdf
08057000-080f1000 rw-p 08057000 00:00 0          [heap]
b7b00000-b7b21000 rw-p b7b00000 00:00 0
b7b21000-b7c00000 ---p b7b21000 00:00 0
b7ce4000-b7cee000 r-xp 00000000 09:02 102455
b7cee000-b7cef000 r--p 00009000 09:02 102455
b7cef000-b7cf0000 rw-p 0000a000 09:02 102455
b7cf0000-b7cf9000 r--s 00000000 09:02 155871
b7cf9000-b7cfb000 rw-p b7cf9000 00:00 0
b7cfb000-b7e25000 r-xp 00000000 09:02 530208     /lib/libc-2.6.1.so
b7e25000-b7e27000 r--p 0012a000 09:02 530208     /lib/libc-2.6.1.so
b7e27000-b7e28000 rw-p 0012c000 09:02 530208     /lib/libc-2.6.1.so
b7e28000-b7e2b000 rw-p b7e28000 00:00 0
b7e2b000-b7e4f000 r-xp 00000000 09:02 529994     /lib/libm-2.6.1.so
b7e4f000-b7e50000 r--p 00023000 09:02 529994     /lib/libm-2.6.1.so
b7e50000-b7e51000 rw-p 00024000 09:02 529994     /lib/libm-2.6.1.so
b7e51000-b7e62000 r-xp 00000000 09:02 9258069    /lib/libz.so.1.2.3
b7e62000-b7e63000 r--p 00010000 09:02 9258069    /lib/libz.so.1.2.3
b7e63000-b7e64000 rw-p 00011000 09:02 9258069    /lib/libz.so.1.2.3
b7e64000-b7e82000 r-xp 00000000 09:02 1430796    /usr/lib/libjpeg.so.62.0.0
b7e82000-b7e83000 r--p 0001e000 09:02 1430796    /usr/lib/libjpeg.so.62.0.0
b7e83000-b7e84000 rw-p 0001f000 09:02 1430796    /usr/lib/libjpeg.so.62.0.0
b7e84000-b7e8e000 r-xp 00000000 09:02 131846     /usr/lib/libjbig.so
b7e8e000-b7e91000 rw-p 0000a000 09:02 131846     /usr/lib/libjbig.so
b7e91000-b7ee4000 r-xp 00000000 09:02 1938943    /usr/lib/libtiff.so.3.8.2
b7ee4000-b7ee6000 r--p 00052000 09:02 1938943    /usr/lib/libtiff.so.3.8.2
b7ee6000-b7ee7000 rw-p 00054000 09:02 1938943    /usr/lib/libtiff.so.3.8.2
b7ee7000-b7ee8000 rw-p b7ee7000 00:00 0
b7eed000-b7eee000 r-xp b7eed000 00:00 0          [vdso]
b7eee000-b7f08000 r-xp 00000000 09:02 529967     /lib/ld-2.6.1.so
b7f08000-b7f09000 r--p 00019000 09:02 529967     /lib/ld-2.6.1.so
b7f09000-b7f0a000 rw-p 0001a000 09:02 529967     /lib/ld-2.6.1.so
bfa6a000-bfa7f000 rw-p bfa6a000 00:00 0          [stack]

The fax000125802.pdf file in the tmp/ folder was created, but is not
viewable. However, if I use the tiff2pdf that's in hylafax's bin
folder, it does work. Oddly, though, I do still get that backtrace.
It's coming from /usr/bin/tiff2ps, but only when the -a parameter is
passed to it. The exact line in the bin/tiff2pdf script is:

$TIFF2PS -a -O $tmpps $FILE > $ERRORSTO 2>&1     # fax2ps output looks bad

Removing the -a removes the backtrace. I'm not sure if that's wise to
do, so I left it in since it does actually create the PDF.

Another thing is that not all JBIG TIFF files created are affected
like this, just a handful. Maybe there is still something going on
with the TIFFs that are produced, but only affects /usr/bin/tiff2pdf
and /usr/bing/tiff2ps more than other methods.

My solution was to have TIFF2PDF in the setup.cache point to
./bin/tiff2pdf instead of /usr/bin/tiff2pdf.

EDIT: Actually, I reverted my change in setup.cache and changed my
FaxDispatch file to use bin/tiff2pdf for TIFF2PDF, which would
override the setting from setup.cache.

At this point I'm going to watch it and see what happens :)


On Thu, Dec 4, 2008 at 2:40 PM, Siri Vias Khalsa
<sirivias.khalsa@xxxxxxxxxx> wrote:
>>-----Original Message-----
>>From: hylafax-users-bounce@xxxxxxxxxxx
> [mailto:hylafax-users->bounce@xxxxxxxxxxx] On Behalf Of Adam Randall
>>Sent: Thursday, December 04, 2008 1:55 PM
>>To: hylafax-users@xxxxxxxxxxx
>>Subject: [hylafax-users] Incoming faxes sometimes result in invalid
> TIFF >documents
>>Here is a log from one of these bad TIFF faxes:
>>Dec 04 12:28:22.17: [ 5606]: REMOTE wants JBIG
> This is very likely your problem. You probably don't have JBIG support
> compiled into libtiff. And if you do, you dont have a verion of the
> converter and or viewer that supports it.
> The hard way to fix this is to get JBIG support and compile it into
> libtiff.
> The easy way is to tell HylaFax that you don't want to receive JBIG
> encoded faxes.
> To disable use "Class1JBIGSupport: no" in your hylafax modem config
> file.
> JBIG is a more recent extension to the fax specification, It is a higher
> rate compression that allows faxes to be sent quicker, but is not well
> supported outside of the specialty fax market.
> -Siri Vias

Adam Randall

____________________ HylaFAX(tm) Users Mailing List _______________________
  To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
 On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
  *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*

Project hosted by iFAX Solutions