Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas021.isp.belgacom.be (localhost [127.0.0.1])
        by inav029.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k0BF7xDL027264
        for <joris.at.lebbeke@skynet.be>; Wed, 11 Jan 2006 16:07:59 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx005.isp.belgacom.be (inmx005.isp.belgacom.be [195.238.5.148])
        by inas021.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k0BF7n06017952
        for <joris.at.lebbeke@skynet.be>; Wed, 11 Jan 2006 16:07:52 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx005.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k0BF7d4d003260
        for <joris.at.lebbeke@skynet.be>; Wed, 11 Jan 2006 16:07:40 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k0BEwoLQ017943;
	Wed, 11 Jan 2006 10:00:01 -0500
Received: from scmze001.ssan.egs-seg.gc.ca (scmze001.ssan.egs-seg.gc.ca
	[205.194.19.85])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k0BEwmsH017940
	for <tiff@lists.maptools.org>; Wed, 11 Jan 2006 09:58:49 -0500
Received: from bulwark1.ic.gc.ca ([192.197.178.1])
	by scmze001.ssan.egs-seg.gc.ca with ESMTP; 11 Jan 2006 09:58:48 -0500
Received: from msg-gate2.ic.gc.ca ([142.53.11.42]) by bulwark1.ic.gc.ca
	via smtpd (for scmze001.ssan.egs-seg.gc.ca [205.194.19.85]) with ESMTP;
	Wed, 11 Jan 2006 09:58:48 -0500
Received: from parapet11.ic.gc.ca (parapet11.ic.gc.ca [142.53.11.253])
	by msg-gate2.ic.gc.ca (Switch-3.1.7/Switch-3.1.7) with ESMTP id
	k0BEwmhg001428
	for <tiff@lists.maptools.org>; Wed, 11 Jan 2006 09:58:48 -0500 (EST)
Received: from msg-con2.icent.ic.gc.ca by parapet11.ic.gc.ca
	via smtpd (for msg-gate2.ic.gc.ca [142.53.11.42]) with ESMTP;
	Wed, 11 Jan 2006 09:58:48 -0500
Received: from msg-mb2.icent.ic.gc.ca ([142.53.28.151]) by
	msg-con2.icent.ic.gc.ca with Microsoft SMTPSVC(6.0.3790.211); 
	Wed, 11 Jan 2006 09:58:48 -0500
X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
Subject: RE: [Tiff] Problem closing TFF file : First Chance exception
Date: Wed, 11 Jan 2006 09:58:47 -0500
Message-ID: <F78E6BBD22A6FC4489EBE25045407908036FA509@msg-mb2.icent.ic.gc.ca>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: RE: [Tiff] Problem closing TFF file : First Chance exception
Thread-Index: AcYWjQZtS59iIaZ0RiaF7qBywR0ceQAMOzMQ
From: "Pallek, Bernie: #CIPO - OPIC" <Pallek.Bernie@ic.gc.ca>
To: <tiff@lists.maptools.org>
X-OriginalArrivalTime: 11 Jan 2006 14:58:48.0141 (UTC)
	FILETIME=[86B807D0:01C616BF]
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by duke.maptools.org id
	k0BEwmsH017940
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
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>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.0000113a
X-MSP-STORE: Wed, 11 Jan 2006 16:08:02 +0100
Status:   

> From: Bogoss [mailto:tub95@wanadoo.fr]
> 
> When i debug, it's specified that TIFF pointer "in" is not 
> NULL and i have the same error on the instruction TIFFClose : 
> First-Chance exception in test.exe (NTDLL.DLL) : 0x0000008 : 
> Invalid Handle
> 
> Have you an other idea ?

You're not mixing up, say, a release-version of the library, and a debug version of your app, or something like that, right?  Generally, weird exceptions happen when you cross debug and non-debug modules.  Or perhaps you are linking with an old, stale LIB, but the app is runtime-linking to a fresher, incompatible DLL.

Try a fresh rebuild in debug mode, run it through the debugger, and when it faults, break into the code, check the call stack, and move back out until you're in the libtiff code, to try to see where it "went wrong".  If that proves to be useless, you'll probably have to set a breakpoint at the TIFFClose call, then step through it.

If no luck, perhaps you can archive your project (it's just test code at this point, yes?) and put it on the web somewhere for download, and I (or someone else on the list) will be able to look at it and suggest something else.  (Please don't send the files to this list!)

Good luck!

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