[gdal-dev] thuban/ gdal : ERROR 4 not recognized format

Even Rouault even.rouault at mines-paris.org
Thu Jul 9 13:58:13 EDT 2009


I see in a call to GDALDestroyDriverManager() in 
http://wald.intevation.org/plugins/scmsvn/viewcvs.php/trunk/thuban/libraries/thuban/gdalwarp.cpp?rev=2866&root=thuban&view=markup.

This is a very bad idea if you intend to call the ProjectRasterFile() method 
several times !! This deregisters all drivers, so this might explain why you 
don't manage to open the file afterwards.

The GDALDestroyDriverManager() method is called in the *utilities* to release 
as much memory as possible to make memory checker tools such as Valgrind 
happy, but they should not be used in the context of a library.

Le Thursday 09 July 2009 02:43:00 Didrik Pinte, vous avez écrit :
> Hi,
>
> I am trying to solve an annoying bug in Thuban. Thuban uses a python
> gdalwarp module to reproject raster files.
>
> Since gdal 1.5, everything worked fine. But now the following problem
> occurs.
>
> Loading a new raster in Thuban is done like this :
> 1. Open the file using gdal.Open() to get some info
> 2. Open the file using gdal.Open() to get the bbox
> 3. Reproject and draw the file using a python gdalwarp module [1]
>
> When loading the first raster, the file is displayed correctly but after
> that every trial to load another file gives the following error (even
> loading the same file that worked at the first use):
>
> ERROR 4: `[...]/current/thuban/Data/iceland/island.tif' not recognised
> as a supported file format.
>
> The gdal.Open methods continuously return None. There seem to be some
> corruption of the module there but I really do not know how to debug
> that.
>
> Do someone know how to debug/solve that ? What could be the cause of
> this ?
>
> Thanks in advance for any help.
>
> Didrik
>
>
> [1]
> http://wald.intevation.org/plugins/scmsvn/viewcvs.php/trunk/thuban/librarie
>s/thuban/gdalwarp.cpp?rev=2866&root=thuban&view=markup




More information about the gdal-dev mailing list