[Gdal-dev] FWTools 0.9.9 and ECW

Bill Binko bill at binko.net
Tue Aug 16 11:51:28 EDT 2005


On Tue, 16 Aug 2005, Frank Warmerdam wrote:

> On 8/16/05, Bart van den Eijnden <BEN at syncera-itsolutions.nl> wrote:
> > Hi Frank,
> > 
> > you mention Linux, but does this also apply to the Windows version?
> 
> Bart,
> 
> I think I am using stock ECW library binaries from ERMapper and they
> don't have the linux problems on win32. I think they are safe for any
> use. 

While I have not tested ECW on Win32, I can explain what the problem and 
solution were so that Frank can guess whether he has a problem.

The problem was an uninitialized boolean variable (that should have
defaulted to false or 0 ).  When build with -g (debugging) on Linux (and
most *nix's), that variable will be set to 0 as the compiler includes
memsets to start all variables at 0.  When compiled with -O2 (or any of 
the -O's) for optimization, those memsets are removed and the value will 
have a random value.

The code that waited for running threads was expecting that to start at 
zero and was not letting the process die (or the library call return).

So, depending on how FWTools was build (-g or -O) and depending on how 
Win32 initializes memory, you might or might not have a problem :)

Tom has assured us that this will be in libECW Real Soon Now (TM) so 
hopefully, Frank will put out a new FWTools when that happens.

Bill



More information about the Gdal-dev mailing list