[gdal-dev] ERDAS ECWJP2 sdk 4.2 GDAL plugin, runtime crashes in debug/debugger

Emmet Spier Emmet.Spier at 2d3.com
Thu May 26 06:27:54 EDT 2011


All,

 

I have been trying to build GDAL with ECWJP2 support with the ERDAS 4.2
SDK, without much sucess.

 

I am finding runtime crashes in both Release and Debug build when
running in the visual studio debugger:

 

This in Debug:

 

                NCSUtil4d.dll!NCS::CMutexLock::CMutexLock(NCS::CMutex *
pmMutex=0x0043e6e0)  Line 156 + 0x12 bytes     C++

 
NCSEcw4d.dll!NCS::CView::SetFileInfo(NCSFileViewFileInfoEx & Info={...})
Line 1316 + 0x12 bytes           C++

>             gdal_ECW_JP2ECW.dll!GDALECWCompressor::Initialize(const
char * pszFilename=0x0043dda0, char * * papszOptions=0x00000000, int
nXSize=100, int nYSize=150, int nBands=1, int bRGBA=0, GDALDataType
eType=GDT_Byte, const char * pszWKT=0x00000000, double *
padfGeoTransform=0x0043e320, int nGCPCount=0, const GDAL_GCP *
pasGCPList=0x00000000, int bIsJPEG2000=1)  Line 910 + 0x29 bytes
C++

                gdal_ECW_JP2ECW.dll!ECWWriteDataset::Crystalize()  Line
1433 + 0x65 bytes     C++

                gdal_ECW_JP2ECW.dll!ECWWriteDataset::FlushLine()  Line
1459 + 0x8 bytes       C++

                gdal_ECW_JP2ECW.dll!ECWWriteRasterBand::IWriteBlock(int
nBlockX=0, int nBlockY=0, void * pBuffer=0x0043dcd8)  Line 1561 + 0xb
bytes       C++

                gdal18.dll!GDALRasterBlock::Write()  Line 518     C++

                gdal18.dll!GDALRasterBand::FlushBlock(int nXBlockOff=0,
int nYBlockOff=0, int bWriteDirtyBlock=1)  Line 1079 + 0x8 bytes     C++

                gdal18.dll!GDALDataset::BlockBasedFlushCache()  Line 424
+ 0x12 bytes                C++

                gdal_ECW_JP2ECW.dll!ECWWriteDataset::FlushCache()  Line
1366           C++

                gdal_ECW_JP2ECW.dll!ECWWriteDataset::~ECWWriteDataset()
Line 1345           C++

                gdal_ECW_JP2ECW.dll!ECWWriteDataset::`vector deleting
destructor'()  + 0x50 bytes    C++

                gdal18.dll!GDALClose(void * hDS=0x0043e270)  Line 2380 +
0x20 bytes   C++

                jpg2000test.exe!main()  Line 60                C++

 

 

I have double checked the build lines:

 

        cd frmts

        nmake /nologo /f makefile.vc plugindirs

        for %d in (  ecw ) do  cd %d  && nmake /nologo /f makefile.vc
plugin  && cd ..  || exit 1

 

D:\ThirdPartyBuilds\GDAL\GDAL-1.80-EDRAS-PLUGIN\gdal-1.8.0\frmts>cd ecw
&& nmake /nologo /f makefile.vc plugin   && cd ..   || exit 1

        cl  /nologo /MD /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_NONSTDC_NO_DEPRECATE /Fd..\..\gdal18.pdb /DDEBUG -I..\..\port
-I..\..\ogr -I..\..\gcore  -I..\..\alg -I..\..

\ogr\ogrsf_frmts -DHAVE_COMPRESS -DECWSDK_VERSION=41  -I"D:\Program
Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write"\include
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK

 Desktop Read-Write"\include/ecw/api -I"D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write"\include/ecw/jp2
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop

Read-Write"\include/ecw/ecw -DFRMT_ecw -DOGR_ENABLED  /c ecwdataset.cpp

ecwdataset.cpp

        cl  /nologo /MD /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_NONSTDC_NO_DEPRECATE /Fd..\..\gdal18.pdb /DDEBUG -I..\..\port
-I..\..\ogr -I..\..\gcore  -I..\..\alg -I..\..

\ogr\ogrsf_frmts -DHAVE_COMPRESS -DECWSDK_VERSION=41  -I"D:\Program
Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write"\include
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK

 Desktop Read-Write"\include/ecw/api -I"D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write"\include/ecw/jp2
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop

Read-Write"\include/ecw/ecw -DFRMT_ecw -DOGR_ENABLED  /c
ecwcreatecopy.cpp

ecwcreatecopy.cpp

        cl  /nologo /MD /EHsc /Zi /W4 /D_CRT_SECURE_NO_DEPRECATE
/D_CRT_NONSTDC_NO_DEPRECATE /Fd..\..\gdal18.pdb /DDEBUG -I..\..\port
-I..\..\ogr -I..\..\gcore  -I..\..\alg -I..\..

\ogr\ogrsf_frmts -DHAVE_COMPRESS -DECWSDK_VERSION=41  -I"D:\Program
Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write"\include
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK

 Desktop Read-Write"\include/ecw/api -I"D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write"\include/ecw/jp2
-I"D:\Program Files (x86)\ERDAS\ERDAS ECWJP2 SDK Desktop

Read-Write"\include/ecw/ecw -DFRMT_ecw -DOGR_ENABLED  /c jp2userbox.cpp

jp2userbox.cpp

        link /dll /debug /out:gdal_ECW_JP2ECW.dll ecwdataset.obj
ecwcreatecopy.obj jp2userbox.obj ..\../gdal_i.lib "D:\Program Files
(x86)\ERDAS\ERDAS ECWJP2 SDK Desktop Read-Write

"\lib\vc80\win32\NCSEcw4d.lib  "D:\Program Files (x86)\ERDAS\ERDAS
ECWJP2 SDK Desktop Read-Write"\lib\vc80\win32\NCSUtil4d.lib  "D:\Program
Files (x86)\ERDAS\ERDAS ECWJP2 SDK Deskt

op Read-Write"\lib\vc80\win32\NCScnet4d.lib

Microsoft (R) Incremental Linker Version 8.00.50727.762

Copyright (C) Microsoft Corporation.  All rights reserved.

 

LINK : gdal_ECW_JP2ECW.dll not found or not built by the last
incremental link; performing full link

   Creating library gdal_ECW_JP2ECW.lib and object gdal_ECW_JP2ECW.exp

        if exist gdal_ECW_JP2ECW.dll.manifest mt -manifest
gdal_ECW_JP2ECW.dll.manifest -outputresource:gdal_ECW_JP2ECW.dll;2

Microsoft (R) Manifest Tool version 5.2.3790.2075

Copyright (c) Microsoft Corporation 2005.

 

 

-- Any advice pointing me in the right direction would be very
gratefully received.

 

Regards, Emmet.

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110526/24590806/attachment.html


More information about the gdal-dev mailing list