Thank you Frank,<div>I had upgraded the MSVC 2005 sln to 2008 sln without changing the MSVC_VER in the NMAKE properties page. Now the gdal executables and the driver are compiled are by MSVC 2008 (MSVC_VER =1500) in the release mode, but the problem still continues to exist.</div>
<div><br></div><div>In fact in the <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(0, 0, 153); ">GDALRegister_test </span>function if I add the following lines of code</div>
<div><br></div><div><div><font class="Apple-style-span" color="#000099">GDALDriver *poDriver_temp = new GDALDriver();</font></div><div><font class="Apple-style-span" color="#000099">printf("about to delete\n");</font></div>
<div><font class="Apple-style-span" color="#000099">delete poDriver_temp;</font></div><div><font class="Apple-style-span" color="#000099">printf("delete ok\n");</font></div></div><div><br></div><div><div class="gmail_quote">
The code crashes at line 3 <img src="cid:361@goomoji.gmail" style="margin-top: 0px; margin-right: 0.2ex; margin-bottom: 0px; margin-left: 0.2ex; vertical-align: middle; " goomoji="361"></div><div class="gmail_quote"><br>
</div>
<div class="gmail_quote">But i am sure that there is something wrong in my code because the drivers in <span class="Apple-style-span" style="font-family: Arial; font-size: 13px; color: rgb(0, 136, 0); white-space: nowrap; "><a href="http://vbkto.dyndns.org/sdk/release-1500-gdal-1-7-mapserver-5-6.zip">http://vbkto.dyndns.org/sdk/release-1500-gdal-1-7-mapserver-5-6.zip</a> </span>seem to be working correctly</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Let me briefly explain what i am doing.</div><div class="gmail_quote">I 've created an empty win32 console project in dll configuration</div><div class="gmail_quote">
have created a folder called <font class="Apple-style-span" color="#000099">gdal_1_6_0_files </font>which contains the .h files from gcore and port directories and the gdal_i.lib, gdal16.dll and the exes in apps</div><div class="gmail_quote">
add the testDataset.cpp and makethe include and linker settings</div><div class="gmail_quote">after compilation I set the GDAL_DRIVER_PATH accordingly and run gdal_translate.exe</div><div class="gmail_quote"><br></div><div class="gmail_quote">
This works in WindowsXP but the same does not work in windows7</div><div class="gmail_quote">I don't know what to do?</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Fri, Nov 19, 2010 at 12:38 AM, Frank Warmerdam <span dir="ltr"><<a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ram prasad wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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<br>
</div>
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 0x7e7fd537."/<br>
<br>
</blockquote>
<br>
Ram,<br>
<br>
Are you building GDAL itself with visual studio 2008 and similar compiler<br>
options as used for your plugin?<br>
<br>
It has been my experience that it is not safe to build plugins with<br>
significantly different compiler version or flags. Also, I found that<br>
Vista and Win7 are much more sensitive to the problems caused by mixing<br>
versions compared to WinXP.<br>
<br>
Best regards,<br><font color="#888888">
-- <br>
---------------------------------------+--------------------------------------<br>
I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com" target="_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href="http://pobox.com/~warmerdam" target="_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush | Geospatial Programmer for Rent<br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>"Love all serve all" - ..::Sri Sathya Sai::..<br>
</div>