Opened 14 years ago

Closed 14 years ago

#3713 closed defect (worksforme)

GDAL CreateCopy fails: 'hDriver is Null' - Segmentation Fault

Reported by: firani41 Owned by: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: 1.7.1
Severity: normal Keywords: CreateCopy() Segmentation Fault
Cc:

Description

I have not been able to determine what I am doing wrong here. I'm still a pretty new GDAL user. My call to CreateCopy (and also to Create)fails with the error message:

ERROR 10: Pointer 'hDriver' is NULL in 'GDALValidateCreationOptions' I have gone in using GDB but have not been able to determine what the problem is.

I am attaching the input .img files and the source.

Attachments (4)

fmicrcpy.cpp (2.0 KB ) - added by firani41 14 years ago.
fmitest.img (13.1 KB ) - added by firani41 14 years ago.
fmitest.img.vat.dbf (250 bytes ) - added by firani41 14 years ago.
fmitest.img.xml (549 bytes ) - added by firani41 14 years ago.

Download all attachments as: .zip

Change History (6)

by firani41, 14 years ago

Attachment: fmicrcpy.cpp added

by firani41, 14 years ago

Attachment: fmitest.img added

by firani41, 14 years ago

Attachment: fmitest.img.vat.dbf added

by firani41, 14 years ago

Attachment: fmitest.img.xml added

comment:1 by firani41, 14 years ago

Version: unspecified1.7.1

comment:2 by warmerdam, 14 years ago

Resolution: worksforme
Status: newclosed

I don't see any attempt to set the poDriver variable. I would suggest adding this before poDriver is used:

    poDriver = (GDALDriver *) GDALGetDriverByName( "GTiff" );
Note: See TracTickets for help on using tickets.