[Gdal-dev] about VRTDataset

Fu Chen fchen at ne.rsgs.ac.cn
Mon Oct 27 02:25:04 EST 2003


Frank,

I also find it very weird. I compile gdal and my test program on two PC has the same result. 
The gdal is cleaned by "nmake /f makefile.vc clean", and rebuild several times. But still has trouble.
even this code won't work

#include "cpl_vsi.h"
#include "cpl_conv.h"
#include "cpl_string.h"
#include "gdal_priv.h"
#include "ogr_spatialref.h"
#include "vrt/vrtdataset.h"

void main()
{
    //GDALAllRegister();
    VRTDataset *poVDS;
    poVDS = new VRTDataset( 100, 100);
 //GDALDumpOpenDatasets( stderr );
 delete poVDS;
}

The Debug said
HEAP[translate.exe]: Invalid Address specified to RtlFreeHeap( 12b0000, 12c3a28 )
at the end of delete statement.

I really don't know what's wrong. Maybe a bug in vc compiler :<


----- Original Message ----- 
From: "Frank Warmerdam" <warmerdam at pobox.com>
To: <gdal-dev at remotesensing.org>
Sent: Monday, October 27, 2003 2:16 AM
Subject: Re: [Gdal-dev] about VRTDataset


> Fu Chen wrote:
> > Hi!
> > I read the code of gdal_translate, which take vrt as a temp dataset. I wanna write something like that. So I write a simple test program. But this doesn't work :<
> > 
> > void main()
> > {
> >     GDALAllRegister();
> >     VRTDataset *poVDS;
> >     poVDS = new VRTDataset( 100, 100);
> >  GDALDumpOpenDatasets( stderr );
> >  delete poVDS;
> > }
> > 
> > the program crashed at GDALDumpOpenDatasets.
> > 
> > I use VC7 VC6 on win2k platform. and my GDAL is gdalcvs-031015.zip.
> > Anyone know what's up?
> 
> Fu Chen,
> 
> I tried this on Linux and had no problem. I even ran it through valgrind
> and had no issues.   I would encourage you to debug the problem at your end.
> 
> Best regards,
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
> 
> 
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev



More information about the Gdal-dev mailing list