Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx1.public.one.com ([10.246.18.21])
	by mail6.local.one.com (Dovecot) with LMTP id /4APAlhrKFn4nwEAsyOMew
	for <filtered@awaresystems.be>; Fri, 26 May 2017 18:04:27 +0000
X-HalOne-ID: bd9ee4f5-423d-11e7-bdda-b82a72d859f1
Received: from mail-oi0-f47.google.com (unknown [209.85.218.47])
	by mx1.public.one.com (Halon) with ESMTPS
	id bd9ee4f5-423d-11e7-bdda-b82a72d859f1;
	Fri, 26 May 2017 18:04:26 +0000 (UTC)
Received: by mail-oi0-f47.google.com with SMTP id h4so22022292oib.3
        for <filtered@awaresystems.be>; Fri, 26 May 2017 11:04:25 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :mime-version:in-reply-to:references:from:date:message-id:to:cc
         :subject:precedence:list-id:list-unsubscribe:list-archive:list-post
         :list-help:list-subscribe:mime-version:sender:errors-to;
        bh=ILz6prj7tuu3jQmSIBsgJg1JNtfcrZ3ZZSrjlLJtnsg=;
        b=kp6/yrJbMoZngMK437krvckpA2JxdglpcVeDVEWvEK4jcrQ0Ckm4UkZZ6Z+V8IbIcX
         Yx0b4BOMOhxL8dFxqaIg31xHbp0vTuWKdil/W+dvdiYrInxVJDk7pdaiJ2hcIpyhYtZc
         6zzL9e9GHkddsDm8tcMtV7XMDrVdNNn0Q3nXdV93y6QYrpy8vrMfS5BnM1EGWbrBLQDZ
         EUde/FHseKRY/RmXrckO13VAwFNFL7NkKLrLpYYs2hdZAuPAYlQ8q7OnLsth2rS3ymU3
         rwK2lp0+cAOa7eYCRQfy5e7tuRtD+F6N3KTkGJs3Erjvr1boaNkeukLet/TfjmKectrC
         dkhg==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
X-Gm-Message-State: AODbwcBq14v15JJ4dNbqILxA22YQe4dCq/4TOMIqNIa60NVAHjvjSxf6
	yqCfnQbzpnwZMw3sOrh658xXlvk1DUCPuPPTtlY/5A==
X-Received: by 10.202.244.86 with SMTP id s83mr1565565oih.116.1495821859512;
        Fri, 26 May 2017 11:04:19 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.104.144 with SMTP id o16csp343561oik;
        Fri, 26 May 2017 11:04:18 -0700 (PDT)
X-Received: by 10.28.26.82 with SMTP id a79mr14702444wma.119.1495821858148;
        Fri, 26 May 2017 11:04:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1495821858; cv=none;
        d=google.com; s=arc-20160816;
        b=J/7/ZgDLL4/6fSx+ticZvjrmxpeqhEOSaOhDktxeuf2lS2GSK1udUKZr0gR66tkJfN
         cepG/ygdAVyr9vrw67sw58xRnqz7FYM9feZEc/2qN760vxQ/OWC3DJREdNTnQoi2N+WC
         n5GYfJsM4Cl3tri3jKVLu7/xfXqqkHtuou7Q9I2hILe6tDsDEe0/IkHpJfrPdRHRMTg7
         iZNjfr17BKZ8BeuENqB57kD/cKnN8to46AwtxB3QO+K7mGiEmnXPyxPt+aRdY1fCfWz9
         g/XvIERxSr9fTbqH7AMGujnVdrGdbbqKkl9NOng4jYctEUP7LBhd4+e+numPSBhdJCbB
         Pp6w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:mime-version:list-subscribe:list-help:list-post
         :list-archive:list-unsubscribe:list-id:precedence:subject:cc:to
         :message-id:date:from:references:in-reply-to:mime-version
         :arc-authentication-results;
        bh=ILz6prj7tuu3jQmSIBsgJg1JNtfcrZ3ZZSrjlLJtnsg=;
        b=ilTLIP2eQ9ES27ng7eSFgPw0yr1fg9KtMrwN2orAK/pKVfJLnas15SOzNp6QjmHRk+
         wm1JrlOQjd3RtvQz1b6aQMdjZgsYg4K0kX2NQpMUHuWw57rRUQekEbkkY2LdmtgrLJjI
         Q9V9jdGZmiZMmJVISL05EQr0BkZL9p4xeDLmYQwU4VzDMTJKGpiOKlPK0fzAJqLiDVU+
         9qMcvc9NvbxIFB4xSd8MVqVlhuKznRsbJWbr7gfcdmrW/Rhuqe8qV3Nj7MSqw3KCi3DR
         QSQ0GPyf+F7R3wzk8kh4VXZa58s06Jt9efmiu7bMZxRBBSGJbC+LVY51Wigqh4rItwy+
         vNrA==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id y84si2868429wmg.147.2017.05.26.11.04.17;
        Fri, 26 May 2017 11:04:18 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id CFBC035C045;
	Fri, 26 May 2017 13:03:16 -0500 (EST)
Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com
	[209.85.220.174])
	by lists.maptools.org (Postfix) with ESMTPS id 87B1335C042
	for <tiff@lists.maptools.org>; Fri, 26 May 2017 12:42:11 -0500 (EST)
Received: by mail-qk0-f174.google.com with SMTP id k74so12805815qke.1
	for <tiff@lists.maptools.org>; Fri, 26 May 2017 10:42:11 -0700 (PDT)
X-Received: by 10.55.112.6 with SMTP id l6mr3531761qkc.232.1495820530170; Fri,
	26 May 2017 10:42:10 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.12.145.246 with HTTP; Fri, 26 May 2017 10:42:09 -0700 (PDT)
In-Reply-To: <alpine.GSO.2.20.1705261033290.27282@scrappy.simplesystems.org>
References: <CAHcSuBrF90Aabi9zdXPmO+SPDoYqAaOYWfBSsdhNW4GbNAFGYw@mail.gmail.com>
	<alpine.GSO.2.20.1705241118040.28353@scrappy.simplesystems.org>
	<CAHcSuBrK1rmrpQ2o5824_0_PKAjt6rwb7e5B=GBE1JXr2VyHmw@mail.gmail.com>
	<alpine.GSO.2.20.1705241413060.28353@scrappy.simplesystems.org>
	<CAHcSuBrRuxN+RPGT9Ow2G-F+yW9EGgz4cc9u-terwj+k_yvPAQ@mail.gmail.com>
	<CAHcSuBq4r-f7SSgAit3Eg7yEGn56vc-nqqq-G21agMwcHV4=Bg@mail.gmail.com>
	<alpine.GSO.2.20.1705261033290.27282@scrappy.simplesystems.org>
From: Dinesh Iyer <dsi.maillist@gmail.com>
Date: Fri, 26 May 2017 13:42:09 -0400
Message-ID: <CAHcSuBo=OCNhoOyOV05N51CY-xVhjFch8P5FL5zioWn3fmR_cg@mail.gmail.com>
To: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Sporadic crash on Windows when appending images to TIFF
	file
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: multipart/mixed; boundary="===============0228317460=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============0228317460==
Content-Type: multipart/alternative; boundary="001a114fefc8593f90055070dbe0"

--001a114fefc8593f90055070dbe0
Content-Type: text/plain; charset="UTF-8"

Thanks Bob. I will give this a shot as part of upgrading to 4.0.8

On Fri, May 26, 2017 at 11:42 AM, Bob Friesenhahn <
bfriesen@simple.dallas.tx.us> wrote:

> On Fri, 26 May 2017, Dinesh Iyer wrote:
>
>>
>> which is generated when the call to CreateFileW in tif_win32.c fails?
>> Again
>> this failure happens sporadically.
>>
>> I added a guard in my code to retry opening the file if an error occurs
>> with a pause 0.1 seconds between retries (max 5 retries) and the errors
>> seemed to have gone away.
>>
>> This might be a Windows file handling issue.
>>
>
> There are two possible I/O implementations available under Windows. The
> implementations are tif_win32.c and tif_unix.c in the libtiff
> subdirectory.  Either of these may be used and you can switch your build to
> use tif_unix.c rather than tif_win32.c.
>
> There is a known issue with tif_win32.c in that libtiff only preserves the
> lower 32-bits (or maybe 31 bits) of the Windows file handle so if the
> handle requires more bits, then there would be a failure.
>
> In recent libtiff 4.0.X I would expect tif_unix.c to function as well as
> tif_win32.c, and in some cases better.  I am not sure if unicode filenames
> are supported with tif_unix.c though.
>
>
> Bob
> --
> Bob Friesenhahn
> bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
>

--001a114fefc8593f90055070dbe0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks Bob. I will give this a shot as part of upgrading t=
o 4.0.8</div><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On F=
ri, May 26, 2017 at 11:42 AM, Bob Friesenhahn <span dir=3D"ltr">&lt;<a href=
=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@simple.=
dallas.tx.us</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span =
class=3D"">On Fri, 26 May 2017, Dinesh Iyer wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<br>
which is generated when the call to CreateFileW in tif_win32.c fails? Again=
<br>
this failure happens sporadically.<br>
<br>
I added a guard in my code to retry opening the file if an error occurs<br>
with a pause 0.1 seconds between retries (max 5 retries) and the errors<br>
seemed to have gone away.<br>
<br>
This might be a Windows file handling issue.<br>
</blockquote>
<br></span>
There are two possible I/O implementations available under Windows. The imp=
lementations are tif_win32.c and tif_unix.c in the libtiff subdirectory.=C2=
=A0 Either of these may be used and you can switch your build to use tif_un=
ix.c rather than tif_win32.c.<br>
<br>
There is a known issue with tif_win32.c in that libtiff only preserves the =
lower 32-bits (or maybe 31 bits) of the Windows file handle so if the handl=
e requires more bits, then there would be a failure.<br>
<br>
In recent libtiff 4.0.X I would expect tif_unix.c to function as well as ti=
f_win32.c, and in some cases better.=C2=A0 I am not sure if unicode filenam=
es are supported with tif_unix.c though.<div class=3D"HOEnZb"><div class=3D=
"h5"><br>
<br>
Bob<br>
-- <br>
Bob Friesenhahn<br>
<a href=3D"mailto:bfriesen@simple.dallas.tx.us" target=3D"_blank">bfriesen@=
simple.dallas.tx.us</a>, <a href=3D"http://www.simplesystems.org/users/bfri=
esen/" rel=3D"noreferrer" target=3D"_blank">http://www.simplesystems.org/u<=
wbr>sers/bfriesen/</a><br>
GraphicsMagick Maintainer,=C2=A0 =C2=A0 <a href=3D"http://www.GraphicsMagic=
k.org/" rel=3D"noreferrer" target=3D"_blank">http://www.GraphicsMagick.org/=
</a><br>
</div></div></blockquote></div><br></div>

--001a114fefc8593f90055070dbe0--

--===============0228317460==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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