[Gdal-dev] Program crash in GDAL call

Clay, Bruce bclay at ball.com
Tue May 11 15:28:02 EDT 2004


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?

The stack trace follows:

NTDLL! 77f813b1()
NTDLL! 77fb6972()
NTDLL! 77fb5bbe()
NTDLL! 77fa6afc()
NTDLL! 77fccc55()
MSVCRT! 7800115c()
VSIFree(void * 0x054c2978) line 343 + 10 bytes
CPLReadDir(const char * 0x054c2920) line 103 + 9 bytes
GDALDriverManager::AutoLoadDrivers() line 574 + 15 bytes
GDALAllRegister() line 266
TerrainData::Initialize(int 0, char * 0x00000000) line 254
BMV::blue_marble_viewer::main_loop(BMV::blue_marble_viewer * const
0x0012fb14) line 1456
main(int 1, char * * 0x053e99b0) line 102
BMV! mainCRTStartup + 227 bytes
001

I checked the archives and did not find anything related to CPLReadDir.
There were references to CPLFree but none of them seemed to apply.

Stats:
  Code = gdal-cvs-20040506.
  OS = win2k
  COMPILER = MSVC 6.0 + STLport

Any thoughts or suggestions (other that always use the debug version)
would be greatly appreciated.

Thanks.

Bruce Clay
bclay at ball.com 



More information about the Gdal-dev mailing list