[gdal-dev] Memory access violation withGDALGetRandomRasterSample and NITF/JPEG2000

Shaw, Jonathan-P29740 Jonathan.Shaw at gdc4s.com
Thu Mar 4 18:06:12 EST 2010

Ah -- turning on the debug logging reveals JP2ECW messages (below).

I will definitely take a look at OSGeo4W. Out of curiosity, is there a
programmatic way to force the NITF driver to use JP2MrSID (which is also
in FWTools 2.4.7) rather than the ECW driver? Or to disable the ECW
driver altogether?

ECW: NCScbmOpenFileView(/vsisubfile/3695_1180575911,file.ntf): eErr = 2
ECW: Got mutex.
ECW: FileInfo: SizeXY=9132,37889 Bands=4
       OriginXY=0,0  CellIncrementXY=1,1

ECW: projection=RAW, datum=RAW
GDAL: GDALOpen(/vsisubfile/3695_1180575911,file.ntf, this=031B52D0)
succeeds as JP2ECW.
GDAL: GDALOpen(file.ntf, this=0105FB88) succeeds as NITF.
GDAL: GDALDefaultOverviews::OverviewScan()
OGRCT: Source: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
OGRCT: Target: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
GDAL: GDALClose(/vsisubfile/3695_1180575911,file.ntf, this=031B52D0)
GDAL: GDALClose(file.ntf, this=0105FB88)
GDAL: GDALDeregister_GTiff() called.

Thanks again,

More information about the gdal-dev mailing list