[gdal-dev] Gdal driver not working in windows 7

Ram prasad ramprasad85 at gmail.com
Thu Nov 18 13:49:54 EST 2010

The gdal driver for my format is working perfectly in windows XP but not in
windows7. It is crashing when I run gdalinfo gdal_translate.exe with or
without parameters. so i wrote a dummy gdal driver (the following code),
which also is crashing in GDALDriverManager::~GDALDriverManager()  at the
line "delete poDriver;". This also happens in windows server 2008. The gdal
versions i tested are 1.6.0, 1.6.1. and 1.7.3
I am using visual studio 2008
The error message from debugger is *"Unhandled exception at 0x773f61e9 in
gdal_translate.exe: 0xC0000005: Access violation reading location

#include "gdal_1_6_0_files\gdal_pam.h"

void CPL_DLL GDALRegister_test();

class testDataset : public GDALPamDataset
 static GDALDataset *Open( GDALOpenInfo * )
return new testDataset();

void GDALRegister_test()

GDALDriver  *poDriver = NULL;
 if( GDALGetDriverByName( "test" ) == NULL )
poDriver = new GDALDriver();
 poDriver->SetDescription( "test" );
 poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "Test (.test)" );
 poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "test" );
 poDriver->pfnOpen = testDataset::Open;
 GetGDALDriverManager()->RegisterDriver( poDriver );
 printf("Ramprasad: Registered Test driver\n");
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101119/54e1654c/attachment.html

More information about the gdal-dev mailing list