Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx9.public.one.com ([195.47.247.105])
	by mail6.local.one.com (Dovecot) with LMTP id /yh3Ci2EW1m5DwAAsyOMew
	for <filtered@awaresystems.be>; Tue, 04 Jul 2017 13:05:58 +0000
X-HalOne-ID: 848100b7-60b9-11e7-9a4c-246e961730ec
Received: from mail-oi0-f51.google.com (unknown [209.85.218.51])
	by mx9.public.one.com (Halon) with ESMTPS
	id 848100b7-60b9-11e7-9a4c-246e961730ec;
	Tue, 04 Jul 2017 13:05:57 +0000 (UTC)
Received: by mail-oi0-f51.google.com with SMTP id 191so77423092oii.2
        for <filtered@awaresystems.be>; Tue, 04 Jul 2017 06:05:57 -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
         :from:to:date:message-id:user-agent:in-reply-to:references
         :mime-version:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe:mime-version:sender
         :errors-to;
        bh=OyI13s4TBzD10leotE+MI0FmztNbS+URzY2Pz+C9wjA=;
        b=rl697UD7A4iwE1kdms55RPzGvcAGFY79pekgcJ2wERr8JN2ncLaC9OZSka7a6EMhFj
         SSlidAdEvE29IAsy11xsuae1P3+UiBZYB5obKPcPs/n7c+3a4qTKDe7n7+1QMu5BipeM
         deEoXXWIwSmYpYdtvDzCdHLsVjmijmSOwoXAs/bKdeZleWui0kazmHywqPRT5rcFknqB
         bw8jtcf+4VC/wGAO/YaifniiHSXjRhp7EsdiLw8kp6lLSAmerlaUvVGCxwYmrads6j0b
         QmPqOnd8QqwhrtPl0DixvGo+tW939LTRmLWfgKOF872TpJighuy/5KvSIDPMmdWGvW/l
         fgRA==
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
X-Gm-Message-State: AKS2vOxmCrPspaMPSQUQGUWP/zvb4pHqPS8T/sQklnFs37LJRemKDUe6
	pyPCHPn23xTKwFl+Fab/cYB04vmck1q+d2YS3eAlRg==
X-Received: by 10.202.67.6 with SMTP id q6mr21092026oia.100.1499173556297;
        Tue, 04 Jul 2017 06:05:56 -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.64.84 with SMTP id n81csp951358oia;
        Tue, 4 Jul 2017 06:05:55 -0700 (PDT)
X-Received: by 10.223.153.238 with SMTP id y101mr33714038wrb.168.1499173555017;
        Tue, 04 Jul 2017 06:05:55 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1499173554; cv=none;
        d=google.com; s=arc-20160816;
        b=iakio3qiOIb5PfbKfUyn6MIN/EkfFvwCN7H1n7+oj05LuF7Q6oXRbb7u0FBmCU4H5K
         66QGOBleLx+B34Me8jc6U4qTLwDD4CJ6u8XfByMm7wiI+uLO/+M5N/pq4FRoo8pQRcPe
         buqAkjOFc170ehN+W6VRh6m0128hHXUNJA0apCtAAaVtvAHjIT954ld000BYRrnnkTuj
         ylwS5b049MIHPlAoad9UcNR0OJAlRWTq/Zbwx6W1PPWJpWv1eSNwaQTsHZV7BgGqWRlx
         zPx+l+EN79sud/cWtWzwFICaPhcetQNKxe2crR5o/D8F7sggWOBmrIavdawWa2Vn1f85
         d/qA==
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
         :mime-version:references:in-reply-to:user-agent:message-id:date:to
         :from:arc-authentication-results;
        bh=OyI13s4TBzD10leotE+MI0FmztNbS+URzY2Pz+C9wjA=;
        b=AClfgrTCQ1209EIqMDxyf3Yhj30jsrvmngLApEGAcvFu8ERJEL40/JMByImsTQsEI0
         +iap39qsJGK1EmASJBixv8u7CIUgjHH1tdEzhXlwDDyJ5fNry9pEvjI+2TAyQl/2aeU7
         vQ/dxu6LV11LzHq5t2jpYqfbFQJPXcsFOhi+VEIcHdXNOPCr5fmvOV7f3Kt1sRbAH6vE
         Fauhtu+hP8Jh57q1X0tEETN5yeq9UT4kr7AUF7J8I+t6OCirWG0V3EXojHlhJYaJSjNu
         YTi+Ol3zWBz28YexbdZbwuABvDOo8vpM1RTodphOVJcxOM9oLU2YPjE/7jPuhhqcaf1o
         YyhA==
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
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 e6si13368412wmi.120.2017.07.04.06.05.54;
        Tue, 04 Jul 2017 06:05:54 -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
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id B7E6B35C053;
	Tue,  4 Jul 2017 08:04:38 -0500 (EST)
Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5])
	by lists.maptools.org (Postfix) with ESMTPS id D3AF835C051
	for <tiff@lists.maptools.org>; Tue,  4 Jul 2017 07:55:27 -0500 (EST)
Received: from even-i700.localnet (unknown [88.162.84.61])
	(Authenticated sender: even.rouault)
	by smtp5-g21.free.fr (Postfix) with ESMTPSA id 6398D5FFD0;
	Tue,  4 Jul 2017 14:55:21 +0200 (CEST)
From: Even Rouault <even.rouault@spatialys.com>
To: tiff@lists.maptools.org
Date: Tue, 04 Jul 2017 14:55:20 +0200
Message-ID: <8926942.D8ztvE4CMI@even-i700>
User-Agent: KMail/5.1.3 (Linux/4.4.0-83-generic; KDE/5.18.0; x86_64; ; )
In-Reply-To: <e56af1a6823fe8904a8c5121601553df@codelibre.net>
References: <alpine.GSO.2.20.1705211423410.6623@freddy.simplesystems.org>
	<15146403.Hy9LK3uOdm@even-i700>
	<e56af1a6823fe8904a8c5121601553df@codelibre.net>
MIME-Version: 1.0
Subject: Re: [Tiff] A bug in libtiff error/warning handling
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="===============0230183566=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

This is a multi-part message in MIME format.

--===============0230183566==
Content-Type: multipart/alternative; boundary="nextPart2485368.YHC4SQZL2L"
Content-Transfer-Encoding: 7Bit

This is a multi-part message in MIME format.

--nextPart2485368.YHC4SQZL2L
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

> Why can't Handler delegate to HandlerExt so that there's only ever a
> single handler irrespective of which call you use?  Can't Handler
> register its own private handler with HandlerExt which strips off the
> thandle and calls the user-supplied handler?  Internally, only the Ext
> variant need be invoked, with Handler wrapping it transparently.

Hum, I'm not sure we can do that (or that would be tricky) since TIFFSetErrorHandler() 
must return the previous handler with a type of TIFFErrorHandler. Or actually that would 
mess a sequence fo calls of TIFFSetErrorHandler() and then TIFFSetErrorHandlerExt(), 
where the later would then return our internal ErrorHandlerExt wrapper instead of 
NULL currently.

I've just applied Paavo's patch for now. This should fix crashing situations.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com

--nextPart2485368.YHC4SQZL2L
Content-Transfer-Encoding: 7Bit
Content-Type: text/html; charset="us-ascii"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; Why can't Handler delegate to HandlerExt so that there's only ever a</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; single handler irrespective of which call you use?  Can't Handler</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; register its own private handler with HandlerExt which strips off the</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; thandle and calls the user-supplied handler?  Internally, only the Ext</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; variant need be invoked, with Handler wrapping it transparently.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Hum, I'm not sure we can do that (or that would be tricky) since TIFFSetErrorHandler() must return the previous handler with a type of TIFFErrorHandler. Or actually that would mess a sequence fo calls of TIFFSetErrorHandler() and then TIFFSetErrorHandlerExt(), where the later would then return our internal ErrorHandlerExt wrapper instead of NULL currently.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I've just applied Paavo's patch for now. This should fix crashing situations.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Even</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Spatialys - Geospatial professional services</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">http://www.spatialys.com</p></body></html>
--nextPart2485368.YHC4SQZL2L--


--===============0230183566==
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/
--===============0230183566==--
