Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.b-one.net (mx-k.one.com [91.198.169.58])
	by mail9.b-one.net (Postfix) with ESMTP id AB8E540013D
	for <info@awaresystems.be>; Thu,  2 Jul 2009 20:18:10 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=6 tests=[none]
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144])
	by mx-k.b-one.net (Postfix) with ESMTP id D3F17C220AC
	for <info@awaresystems.be>; Thu,  2 Jul 2009 20:18:09 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id D4A001D1940C9;
	Thu,  2 Jul 2009 13:16:57 -0500 (EST)
Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158])
	by lists.maptools.org (Postfix) with ESMTPS id E9B331D19CC8B
	for <tiff@lists.maptools.org>; Thu,  2 Jul 2009 13:15:24 -0500 (EST)
Received: from isper.nabble.com ([192.168.236.156])
	by kuber.nabble.com with esmtp (Exim 4.63)
	(envelope-from <bounces@nabble.com>) id 1MMQod-0002TO-JQ
	for tiff@lists.maptools.org; Thu, 02 Jul 2009 11:15:23 -0700
Message-ID: <24311610.post@talk.nabble.com>
Date: Thu, 2 Jul 2009 11:15:23 -0700 (PDT)
From: acanicio <acanicio@astrosnap.com>
To: tiff@lists.maptools.org
MIME-Version: 1.0
X-Nabble-From: acanicio@astrosnap.com
Subject: [Tiff]  Access violation in TiffOpen Function in "write" mode
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org


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.

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
