Hallo,

I have builded GDAL 3.10.2 version. I downloaded source code, extracted, and 
then using CMake I created a project file for VS2019.
I also downloaded some additional drivers, and with one I have a problem ... 
ECW. I downloaded latest version from
"www.hexagongeospatial.com" and in CMake I set following variables ...

ECW_INCLUDE_DIR = C:\Dev\Hexagon\ERDAS ECW JPEG 2000 SDK 5.5.0\Desktop 
Read-Only\include
ECW_LIBRARY = C:/Dev/Hexagon/ERDAS ECW JPEG 2000 SDK 5.5.0/Desktop 
Read-Only/lib/vc141/x64/NCSEcw.lib
GDAL_USE_ECW = ON

When I checked if everything is ok, I did it with "gdalinfo.exe" and I got 
following results ...

C:\TestProjects\TestGDAL_3.10.2>gdalinfo --format ecw
Format Details:
  Short Name: ECW
  Long Name: ERDAS Compressed Wavelets (SDK 5.5)
  Supports: Raster
  Extension: ecw
  Help Topic: drivers/raster/ecw.html
  Supports: Open() - Open existing dataset.
  Supports: Create() - Create writable dataset.
  Supports: CreateCopy() - Create dataset by copying another.
  Creation Datatypes: Byte UInt16

<CreationOptionList>
  <Option name="TARGET" type="float" description="Compression Percentage" />
  <Option name="PROJ" type="string" description="ECW Projection Name" />
  <Option name="DATUM" type="string" description="ECW Datum Name" />
  <Option name="ECW_ENCODE_KEY" type="string" description="OEM Compress Key 
from ERDAS." />
  <Option name="ECW_ENCODE_COMPANY" type="string" description="OEM Company 
Name." />
  <Option name="ECW_FORMAT_VERSION" type="integer" description="ECW format 
version (2 or 3)." default="2" />
</CreationOptionList>

but when I added gdal 3.10.2 with necessary dlls and with ECW (NCSEcw.dll) to 
my app, there is a crash in ... file
..\gdal-3.10.2\frmts\ecw\ecwdataset.cpp (line 1185 in ECWDataset::~ECWDataset())

My code looks like ...

const auto dataset =  (GDALDataset *)GDALOpen(fileName, GA_ReadOnly);
if (dataset != nullptr)
{
    const auto driver = dataset->GetDriver();
    GDALClose(dataset); // it crashes here
...
}

 Could you write me, what could be a problem ?

Best regards, Marian Hadri




_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to