Ticket #1749 (closed defect: fixed)
CreateCopy crashes when creating a virtual copy of a vrt data set
| Reported by: | mauceri | Owned by: | mloskot |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.3 |
| Component: | GDAL_Raster | Version: | 1.4.1 |
| Severity: | normal | Keywords: | GDAL VRT Crash createCopy copy |
| Cc: | warmerdam |
Description
Hi,
I'm from the ACT developement team.
I have a VRT data set file pointing to a PNG source file. I want to add some Metadata to the VRT file.
In order to do this I'm creating a virtual data set from the VRT data set in the following way:
[...]
GDALDriver *poDriver;
GDALDataset *poSrcDS, *poVirtualDS;
poDriver = GetGDALDriverManager()->GetDriverByName("VRT");
if( poDriver == NULL )
return;
// open the source data set
poSrcDS = (GDALDataset *) GDALOpenShared( "file.png.vrt", GA_ReadOnly );
if( !poSrcDS )
return;
// create the new virtual data set
poVirtualDS = poDriver->CreateCopy( "", poSrcDS, FALSE, NULL, NULL, NULL );
if( poVirtualDS == NULL ){
GDALClose(poSrcDS);
return;
}
[...]
The problem is that GDAL crashes when the createCopy for the virtual data set is executed.
I'm using GDAL 1.4.1, but the problem is happening also with GDAL 1.3
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

