[Gdal-dev] Debug assertion failed in GDAL/OGR-1.3.2

Jean-Daniel GONON jdgonon at gi-lemans.com
Fri Dec 1 10:50:02 EST 2006


> ------------------------------
> Jean-Daniel GONON wrote:
>>> Jean-Daniel GONON wrote:
>>>> Hi
>>>>
>>>> I could solve my last problem, I thought  it was because of XERCES-C
>>>> 2.7.0 (but it was a bad include library).
>>>>
>>>> Now, I have an other problem, still about GDAL/OGR-1.3.2 (in original
>>>> version, with XERCES-C 2.7.0 moreover).
>>>> Compilation of gdal.DLL is good, but using of gdal.dll by ogrinfo.exe
>>>> generates two errors in "C:\Program Files\Microsoft Visual Studio .NET
>>>> 2003\Vc7\crt\src\dbgheap.c" file (at the lines 1132 and 1138).
>>>
>>> Jean,
>>>
>>> This error indicates there must be a bug somewhere that causes heap
>>> corruption. The assertion caught in dbgheap.c file comes from free()
>>> function and says something like this:
>>> "you're trying to free block of memory that can't be deallocated because
>>> of invalid type - not deallocable block."
>>>
>>> Unfortunately, without more details, I can't see how to track the
>>> problem down and to find where is the problem in GDAL/ogrinfo.exe.
>>>
>>> Could you provide more details about:
>>> 1. How did you compile GDAL? Using provided makefile.vc?
>>> 2. What operation do you do using ogrinfo.exe?
>>> 3. What dataset do you use and can you provide them for testing?
>>
>> Good morning Mateusz,
>>
>> Thank you for your help.
>>
>> 1. I compile GDAL/OGR by MS Visual C++ 2003 (.Net). I don't use 
>> makefile.vc.
>
> Hi Jean,
>
> I understand you use Visual C++ 2003 compiler.
> But do you use your own project files and compile GDAL from the Visual
> C++ IDE ?
>
> If you use VC++ project files, please check if you use the same
> compilation flags in the project file as specified in namek.opt file:
>
> http://www.gdal.org/srctree/nmake.opt
>
> as OPTFLAGS, especially if you use /MD flag.
>
>> 2. First I have to include "C:\Program Files\Microsoft Visual Studio
>> .NET 2003\Common7\Tools\vsvars32.bat" in command line.
>
> Hmm, I'm confused.
> Previously, you're saying you don't compile GDAL using makefile.vc but
> here you're saying that you calls vsvars32.bat to configure command line
> environment.
> Please, explain exactly how do you build GDAL.
>
> Cheers
> -- 
> Mateusz Loskot
> http://mateusz.loskot.net
>

Mateusz,

GDAL/OGR is a project that I manage only with Visual C++ 2003.
I don't use makefile.vc, nor nmake.opt.
But I use command lines only to test "gdal.dll" with ogrinfo.exe (that is 
why I call vsvars32.bat).

I think I use in my VC++ project files same options as specified in 
nmake.opt from www.gdal.ogr.
But I am not sure for all flags (you can see in attachement file, if you 
want)

How do I build GDAL :
- I compile/build gdal.dll and ogrinfo.exe with Visual C++ 2003
- I copy/paste ogrinfo.exe and a DGN v7 file in a same folder with gdal.dll
- I call vsvars32.bat in command lines
- I call ogrinfo.exe to verify which file formats supported by gdal.dll 
(ogrinfo --formats)
- I call ogrinfo.exe to open a DGN v7 file (ogrinfo file.dgn)

thank you

Good weekend
Jean-Daniel 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VC++_GDAL_Project.zip
Type: application/octet-stream
Size: 6164 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/gdal-dev/attachments/20061201/ceb7ff44/VC_GDAL_Project.obj


More information about the Gdal-dev mailing list