AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2000.07.06 04:06 "libtiff crash with G4 file", by peters
2000.07.06 11:15 "Re: libtiff crash with G4 file", by Ivo
2000.07.07 03:47 "Re: libtiff crash with G4 file", by Frank Warmerdam
2000.07.12 04:50 "Re: libtiff crash with G4 file", by peters

2000.07.07 03:47 "Re: libtiff crash with G4 file", by Frank Warmerdam

I have downloaded and opened your image, but did not find any problem, whatsoever, testing on Windows 2K, Solaris 2.7 and Linux RH 6 platforms. Our viewer is based on 3.4beta037, although little tweaked. Specially, I have applied all the available patches related to FAX 3 and 4 codec (some of them I have submitted myself) - make sure that you have, too. Could you specify at which strip you ran to the problems?

Peter / Ivo,

I would add that I have no problem reproducing this problem with tiffcp built from the current CVS source tree. It crashes on strip zero with the following traceback:

#ifdef FAX3_DEBUG
                printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
                printf("-------------------- %d\n", tif->tif_row);
                fflush(stdout);
#endif
==> EXPAND2D(EOFG4);
                (*sp->fill)(buf, thisrun, pa, lastx);
                SETVAL(0); /* imaginary change for reference */
(gdb) where

#0  0x805d028 in Fax4Decode (tif=0x8083b10, buf=0x4112b008 "", occ=6228992, 
    s=0) at ../libtiff/tif_fax3.c:1403
#1  0x8054d37 in TIFFReadEncodedStrip (tif=0x8083b10, strip=0, buf=0x4112b008, 
    size=6228992) at ../libtiff/tif_read.c:145
#2  0x8049ed7 in cpDecodedStrips (in=0x8083b10, out=0x8083768, 
    imagelength=75590, imagewidth=97322, spp=1) at ../tools/tiffcp.c:599
#3  0x8049db9 in tiffcp (in=0x8083b10, out=0x8083768) at ../tools/tiffcp.c:541
#4  0x804928d in main (argc=3, argv=0xbffff7b4) at ../tools/tiffcp.c:184

Of course EXPAND2D() is a monster macro, so it is a hassle to look into this more closely. I just hate this G3/G4 code, and would be really happy if someone else could trace this down, and produce a fix.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush    | Geospatial Programmer for Rent