[gdal-dev] Visual Studio 2005 Debug mode error
GDAL Devs, I added GDAL into my exisiting project to see how GDAL handles WMS and JPIP and I get an exception error when calling GDALAllRegister(). This is odd to me, but I downloaded the SVN for 3-1-2011 and made modifications in nmake.opt to handle WMS and JPIP (via kakadu v5.2) files (this is not the error). Here is the pop-up message display error output: Visual Studio Unhandled exception at 0x772bc41b in GDAL_DEBUG_PROBLEMS.exe: 0xC005: Access violation writing location 0x5a74c985. NOW, here is the call-stack. GetGDALDriverManager returned 0x00764360 {nDrivers=0 papoDrivers=0x pszHome=0x008794d0 } GDALDriverManager * pData 0x00879580 void * gdal19dev.dll!VSIFree(void * pData=0x00879580) Line 573 + 0xa bytes C++ gdal19dev.dll!VSIWin32FilesystemHandler::ReadDir(const char * pszPath=0x007694e8) Line 622 + 0x9 bytes C++ gdal19dev.dll!VSIReadDir(const char * pszPath=0x007694e8) Line 67 C++ gdal19dev.dll!GDALDriverManager::AutoLoadDrivers() Line 686 + 0x11 bytes C++ gdal19dev.dll!GDALAllRegister() Line 79 C++ GDAL_DEBUG_PROBLEMS.exe!wmain(int argc=1, wchar_t * * argv=0x00874e68) Line 43 C++ GDAL_DEBUG_PROBLEMS.exe!__tmainCRTStartup() Line 594 + 0x19 bytes C GDAL_DEBUG_PROBLEMS.exe!wmainCRTStartup() Line 414 C From what I see, the problem lies in the method call in gdalallregister.cpp line 76: GetGDALDriverManager()-AutoLoadDrivers(); This should not happen. What is odd is if I build it in Release mode, I do not get this issue. However, that defeats the purpose because I want to step through the code. Anyone can confirm my problem? Solutions why only in Debug mode this occurs? Any suggestions would be great, Robert ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev
Re: [gdal-dev] Visual Studio 2005 Debug mode error
On 04/03/11 07:58, Robert Zermeno wrote: This should not happen. What is odd is if I build it in Release mode, I do not get this issue. However, that defeats the purpose because I want to step through the code Anyone can confirm my problem? Solutions why only in Debug mode this occurs? Any suggestions would be great, GDAL debug mode is not a real debug mode as expected by Visual C++ and it is a known issue which IMHO is a bug in GDAL, but there are different opinions about that. The only fix is: http://lists.osgeo.org/pipermail/gdal-dev/2010-May/024683.html You can find quite a number of of related tickets: http://trac.osgeo.org/gdal/ticket/1647 http://trac.osgeo.org/gdal/ticket/540 Best regards, -- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org Member of ACCU, http://accu.org ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev