Received: from [192.48.153.1] by phillip.thumbsplus.com (NTMail 3.03.0017/7.aaxh) with ESMTP id pcrews for <pcrews@cerious.com>; Tue, 7 Apr 1998 12:52:31 -0400
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) by sgi.sgi.com (980309.SGI.8.8.8-aspam-6.2/980304.SGI-aspam) via ESMTP id JAA28570; Tue, 7 Apr 1998 09:36:18 -0700 (PDT)
	mail_from (owner-tiff@sgi.engr.sgi.com)
Received: (from majordomo-owner@localhost)
	by cthulhu.engr.sgi.com (980205.SGI.8.8.8/970903.SGI.AUTOCF) id IAA7636816
	for tiff-list;
	Tue, 7 Apr 1998 08:43:04 -0700 (PDT)
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980205.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id IAA8852412
	for <tiff-relay@cthulhu.engr.sgi.com>;
	Tue, 7 Apr 1998 08:43:02 -0700 (PDT)
Received: from ymps5 (ymps5.ymp.gov [198.147.246.51]) by sgi.sgi.com (980309.SGI.8.8.8-aspam-6.2/980304.SGI-aspam) via ESMTP id IAA02493
	for <tiff@sgi.com>; Tue, 7 Apr 1998 08:43:00 -0700 (PDT)
	mail_from (Rex_Jolliff@notes.ymp.gov)
From: Rex_Jolliff@notes.ymp.gov
Received: from ymln11.ymp.gov by ymps5.ymp.gov (PMDF V5.1-7 #23027)
 with SMTP id <0ER1VKL0H0055B@ymps5.ymp.gov> for tiff@sgi.com; Tue,
 7 Apr 1998 08:41:10 -0700 (PDT)
Received: by ymln11.ymp.gov(Lotus SMTP MTA v1.1 (385.6 5-6-1997))
 id 882565DF.005668CE ; Tue, 07 Apr 1998 08:43:49 -0700
Date: Tue, 07 Apr 1998 08:40:44 -0700
Subject: Re: libtiff isn't closing all of the file handles on NT ?
To: jmwhite@interserv.com
Cc: cgriffin@mathworks.com, tiff@sgi.com, jaxon@lizardtech.com,
        vxf@lizardtech.com, grizz@lizardtech.com, bradley@lizardtech.com
Message-id: <882565DF.0055D90A.00@ymln11.ymp.gov>
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
X-Lotus-FromDomain: CRWMS
Sender: owner-tiff@fddi-sgi.sgi.com
Precedence: bulk




I saw this same behavior under VMS and traced it down to the file mapping
code also.
I noticed that it was allocating a channel and then not mapping the file
correctly,
so it gave up on the map, but it did not deallocate the channel after the
mapping
error.  Perhaps somthing similar is happening in the NT code?

Rex.


>Chris,
>    I have had this exact problem on NT.  I have a program that needs to
>open many TIFF files and eventually it hangs the system.  I wrote a
>small test program that repeatedly opens and then closes the same TIFF
>file.  Foe each open/close it looks like there are 3-5 handles left
>around.  I have looked into this a little bit and I've found nothing
>obvious. One possible place it in the routine _tiffMapProc where it
>calls MapViewOfFile but I'm not sure.  I've found no good work around
>and I'd be interested in any information too.
>                        Jim White
>Chris Griffin wrote:
>>
>> Hi,
>>
>> I am using LIBTIFF from within a DLL to read and write TIFF images on a
>> Windows NT machine.   I am finding that after I read a file, I can no
longer
>> write to that file, and I also cannot delete it at the OS level until my
>> application
>> has exited.
>>
>> This leads me to beleive that TIFFClose is not properly closing the
file.
>> I rebuilt the library with debugging flags and ran the whole thing in
>> a debugger, and the call to CloseHandle (in tif_win32) is returning a 1,
>> which indicates that it succeeded.
>>
>> So now I'm completely stumped!  Has anyone else seen this
>> problem?
>>
>> Thanks,
>> Chris




