[Gdal-dev] Program crash in GDAL call

Frank Warmerdam warmerdam at pobox.com
Tue May 11 16:08:58 EDT 2004


Clay, Bruce wrote:
> I have the program working correctly (I think) in debug mode but it
> crashes in release mode.  I turned on some of the flags to see where it
> was crashing and it seems it is crashing in the call to free inside
> CPLFree called from CPLReadDir.  As far as I can tell the pointer is
> valid but debugging a release program tends to give odd results.  What I
> did notice is that the path always seems to be /usr/local/lib which of
> course does not exist on a Windows machine.  I don't think that is
> related to the problem just a note.  Since the program is statically
> linked (one big lib) should it be looking for drivers and why in
> /usr/local/lib on a windows machine?  Is there some other initialization
> I need?

Bruce,

"/usr/local/lib" is the default location to search, inherited from Unix
conventions.  It should be no problem if it does not exist.  I have no
idea why things are crashing for you though.  I looked through the code
and short of heap corruption arising somewhere ahead of time I don't see
why the CPLFree() should cause any problem.

PS. You can just comment out the call to AutoLoadDrivers() if you want, it isn't
generally necessary.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Gdal-dev mailing list