Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-h.b-one.net (mx-h.one.com [91.198.169.55])
	by mail9.b-one.net (Postfix) with ESMTP id 33E8040080A
	for <info@awaresystems.be>; Tue,  9 Feb 2010 16:18:22 +0100 (CET)
Received: by mx-h.b-one.net (Postfix, from userid 106)
	id 16C4FA05F79B; Tue,  9 Feb 2010 16:17:30 +0100 (CET)
X-Virus-Scanned: by one.com
X-Spam-Score: 0
X-Spam-Level: 
X-Spam-Status: No, score=0 tagged_above=0 required=4 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-h.b-one.net (Postfix) with ESMTP id 165139D56561 for
 <info@awaresystems.be>; Tue,  9 Feb 2010 16:17:27 +0100 (CET)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 925F01D4ACBF4; Tue,  9 Feb 2010
 10:16:31 -0500 (EST)
Received: from uni-bonn.de (mail.uni-bonn.de [131.220.15.113]) by
 lists.maptools.org (Postfix) with ESMTP id 97A231D5304D0 for
 <tiff@lists.maptools.org>; Tue,  9 Feb 2010 09:54:35 -0500 (EST)
Received: from [131.220.147.85] (HELO [131.220.61.102]) by fe2.uni-bonn.de
 (CommuniGate Pro SMTP 5.2.12) with ESMTP id 32400465 for
 tiff@lists.maptools.org; Tue, 09 Feb 2010 15:54:34 +0100
Message-ID: <4B717728.7080603@uni-bonn.de>
Date: Tue, 09 Feb 2010 15:54:32 +0100
From: Kai Muehlbauer <kai.muehlbauer@uni-bonn.de>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.5) Gecko/20091130
 SUSE/3.0.0-12.2 Lightning/1.0b2pre Thunderbird/3.0
MIME-Version: 1.0
To: tiff@lists.maptools.org
References: <4B7161E2.3040508@uni-bonn.de> <op.u7u4z4o9qw3wu1@titan>
In-Reply-To: <op.u7u4z4o9qw3wu1@titan>
Subject: Re: [Tiff] TIFFOpen returns 0
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="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

Am 09.02.2010 14:56, schrieb Andrew Brooks:
> On Tue, 09 Feb 2010 13:23:46 -0000, Kai Muehlbauer
> <kai.muehlbauer@uni-bonn.de> wrote:
>> If I execute my program
>> on a shell, TIFFOpen returns 0 (cannot open). If I run or debug the
>> program in the IDE (eclipse) everything runs fine.
> =

> Have you tried running your program via "strace" or "truss" to see if
> there is a difference in the parameters to, or the return values from,
> the system calls made by the program/library ?

I very much appreciate your helpful hint on strace.

So it goes:

It was no libtiff issue. With strace I found out that some code before
TIFFOpen was eating up all file-descriptors (1024 in my case). The
program tried to open all files (>5000) in a particular folder. Then, no
descriptors were left for TIFFOpen. On the other machine, there were
only 500 files in that folder. Maybe the IDE also controles the
file-descriptors so that no errors were produced.

After fixing the file-issue TIFFOpen behaves like a charm.

What I've learned: Know your tools!

Regards,
Kai
-- =

Kai Muehlbauer
Meteorological Institute University of Bonn
Auf dem H=FCgel 20        | +49 228 739084
D-53121 Bonn            | kai.muehlbauer@uni-bonn.de
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
