AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2010.02.09 13:23 "[Tiff] TIFFOpen returns 0", by Kai Muehlbauer
2010.02.09 14:54 "Re: [Tiff] TIFFOpen returns 0", by Kai Muehlbauer

2010.02.09 14:54 "Re: [Tiff] TIFFOpen returns 0", by Kai Muehlbauer

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ügel 20        | +49 228 739084
D-53121 Bonn            | kai.muehlbauer@uni-bonn.de