<div>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</div>
<div>I am using visual studio 2008 </div><div>The error message from debugger is <i>"Unhandled exception at 0x773f61e9 in gdal_translate.exe: 0xC0000005: Access violation reading location 0x7e7fd537."</i></div>
<div>
<br></div><div><font class="Apple-style-span" color="#000099">#include "gdal_1_6_0_files\gdal_pam.h"</font></div><div><font class="Apple-style-span" color="#000099"><br></font></div><div><font class="Apple-style-span" color="#000099">CPL_C_START</font></div>
<div><font class="Apple-style-span" color="#000099">void CPL_DLL GDALRegister_test();</font></div><div><font class="Apple-style-span" color="#000099">CPL_C_END</font></div><div><font class="Apple-style-span" color="#000099"><br>
</font></div><div><font class="Apple-style-span" color="#000099">class testDataset : public GDALPamDataset</font></div><div><font class="Apple-style-span" color="#000099">{</font></div><div><font class="Apple-style-span" color="#000099">public:</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">static GDALDataset *Open( GDALOpenInfo * )</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">{</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">return new testDataset();</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">}</font></div><div><font class="Apple-style-span" color="#000099">};</font></div>
<div><font class="Apple-style-span" color="#000099"><br></font></div><div><font class="Apple-style-span" color="#000099">void GDALRegister_test()</font></div><div><font class="Apple-style-span" color="#000099">{</font></div>
<div><font class="Apple-style-span" color="#000099"><br></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">GDALDriver *poDriver = NULL;</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">if( GDALGetDriverByName( "test" ) == NULL )</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">{</font></div><div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">poDriver = new GDALDriver();</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">poDriver->SetDescription( "test" );</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">poDriver->SetMetadataItem( GDAL_DMD_LONGNAME, "Test (.test)" );</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">poDriver->SetMetadataItem( GDAL_DMD_EXTENSION, "test" );</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">poDriver->pfnOpen = testDataset::Open;</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">GetGDALDriverManager()->RegisterDriver( poDriver );</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">                </font></span><font class="Apple-style-span" color="#000099">printf("Ramprasad: Registered Test driver\n");</font></div>
<div><span class="Apple-tab-span" style="white-space:pre"><font class="Apple-style-span" color="#000099">        </font></span><font class="Apple-style-span" color="#000099">}</font></div><div><font class="Apple-style-span" color="#000099">}</font></div>