AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.07.02 18:15 "Access violation in TiffOpen Function in "write" mode", by <acanicio@astrosnap.com>
2009.07.04 16:55 "Re: Access violation in TiffOpen Function in "write" mode", by <acanicio@astrosnap.com>
2009.07.04 17:30 "Re: Access violation in TiffOpen Function in "write" mode", by Toby Thain
2009.07.04 17:51 "Re: Access violation in TiffOpen Function in "write" mode", by Bob Friesenhahn

2009.07.02 18:15 "Access violation in TiffOpen Function in "write" mode", by <acanicio@astrosnap.com>

Hello everybody,

I use LibTiffDelphi version 3.7.0.0 with LibTiff version 3.7.0.0 

I have an issue using the TiffOpen Function. Whenever I try to open a Tiff
file in "w" (write) mode, I get an access violation.

I have traced the error through the following stack of calls :

1 - In my program :
OpenTiff is a pointer. 
Filename is a string containing the value 'c:\dev\testtiff\test.tif';
Of course, the file does NOT exist. The directory does. 
<<
OpenTiff :=TTiffOpen(PAnsichar(Filename),'w');
>> 

2 - In LibTiffDelphi.pas line 1652 function TTiffOpen :
<< 
Result:=TIFFClientOpen(PChar(Name),PChar(Mode),fd,@TIFFFileReadProc,@TIFFFileWriteProc,@TIFFFileSeekProc,@TIFFFileCloseProc,@TIFFFileSizeProc,@TIFFNoMapProc,@TIFFNoUnmapProc);
>> 

3 - In tif_open.c line 333, function TIFFClientOpen :
<< 
if (!TIFFDefaultDirectory(tif))
goto bad;
>> 

4 - In tif_dir.c , line 1198, function TIFFDefaultDirectory:
<< 
(void) TIFFSetField(tif,TIFFTAG_COMPRESSION,COMPRESSION_NONE);
>>
5 - In tif_dir.c , line 708, function TIFFSetField :
<< 
status = TIFFVSetFIeld(tif,tag,ap);
>> 

6 - In tif_dir.c,line 177, function TIFFVSetFIeld:
<< 
if(status = TIFSetCompressionScheme(tif,v) !=0)
>> 

7 - In tif_compress.c function TIFSetCompressionScheme: 

<< 
int
TIFFSetCompressionScheme(TIFF* tif, int scheme)
{
const TIFFCodec *c = TIFFFindCODEC((uint16) scheme);
_TIFFSetDefaultCompressionState(tif);
/*
* Don't treat an unknown compression scheme as an error.
* This permits applications to open files with data that
* the library does not have builtin support for, but which
* may still be meaningful.
*/
return (c ? (*c->init)(tif, scheme) : 1);
} 
>> 
It crashes at the "return" clause, with the following error : 
"Access violation at address B0B8005C . Read of address B0B8005C." 
I don't have a C compiler so I cannot make changes to it or even test... 
Thank you for any help. 
Best regards 
Axel 

-- 
View this message in context:
http://www.nabble.com/Access-violation-in-TiffOpen-Function-in-%22write%22-mode-tp24311610p24311610.html
Sent from the Tiff / LibTiff mailing list archive at Nabble.com.