Problems with TIFF CCITT T.6

Klaus Bartz bartzkau at c...
Fri Sep 29 09:56:18 EDT 2000


Hi Gurus,
downloaded OpenEV 0.9.0 this morning.
Nice, very nice ...
only ( ? ) TIFF CCITT T.6 are not working. At loading such an image
I get a Box from the system ( Windows NT 4.0 SP 6 ) wich tell me, that there
is an unhandled exception ( 0xC0000005:Access Violation ).
I love bugs, about that I have searched for it. Then I'm smiling ...
I have only debugged GDAL 1.1.1.
Unfortenly it is a little bit complicated. About that more then one line:

GDALOpen is called from _GV!011cffc6 ( don't know what it is )
with the eAccess GA_Update, this is mapped in GTiffDataset::Open to
"r+".
TIFFClientOpen maps this to O_RDWR.
Some lines later TIFFClientOpen calls ... -> ... -> InitCCITTFax3.
There is allocated a Fax3EncodeState because the mode is not O_RDONLY
( we know, it is O_RDWR ). Some lines later the structure is initialisized -
with values for encoding, not decoding.
Later TIFFReadRGBAStrip is called which calls ...->...-> Fax3PreDecode.
There is a cast from tif->tif_data to Fax3DecodeState *.
The access to sp->refruns[0] raises then the exception because the value is not
null, but also not a valid pointer.

OK, where is the bug. May be it is philosophic.
Is it not allowed to open a file with r+ if we would read the image ( then
the bug is in GDAL or OpenEV).
Or is it not allowed to detect the read/write state at the file open mode
( then the bug is in libtiff ). In libtiff ( tif_fax3.c ) there are more than one
if (tif->tif_mode == O_RDONLY)
may be a little bit difficult to change it.
Frank will be happy ( i like his comments in tif_fax3.c )
libtiff is not able to update an TIFF file, about that r+ makes no sense (or ??).
Or is the bug to click on a TIFF CCITT T.6 ?

Good that Frank manages both libs ...

Klaus







More information about the Gdal-dev mailing list