[Insight-users] Re: Array deallocation error
Albert Huang
alberth+itk at ece.ubc.ca
Sat Feb 10 03:47:05 EST 2007
Sorry missed a few lines of my call stack:
> msvcr71d.dll!_free_dbg_lk(void * pUserData=0x01978540, int nBlockUse=1) Line 1154 + 0x3b C
msvcr71d.dll!_free_dbg(void * pUserData=0x01978540, int nBlockUse=1) Line 1070 + 0xd C
msvcr71d.dll!operator delete(void * pUserData=0x01978540) Line 54 + 0x10 C++
msvcr71d.dll!operator delete[](void * p=0x01978540) Line 21 + 0x9 C++
watershed.exe!vnl_c_vector_dealloc(void * v=0x01978540, int __formal=360, int __formal=360) Line 398 + 0xf C++
watershed.exe!vnl_c_vector<unsigned int>::deallocate(unsigned int * p=0x01978540, int n=360) Line 468 + 0xf C++
watershed.exe!vnl_vector<unsigned int>::destroy() Line 282 + 0x12 C++
watershed.exe!vnl_vector<unsigned int>::~vnl_vector<unsigned int>() Line 275 C++
watershed.exe!itk::Array<unsigned int>::~Array<unsigned int>() Line 73 + 0x8 C++
Albert
----- Original Message -----
From: Albert Huang
To: insight-users at itk.org
Sent: Saturday, February 10, 2007 12:36 AM
Subject: Array deallocation error
Dear experts
I am trying to use itkArray (ITK 3.0.1) inside a class member function as below:
unsigned int ParametersDimension = 100;
typedef Array<unsigned int> CountType;
CountType derivative_count = CountType( ParametersDimension );
derivative_count.Fill( NumericTraits<ITK_TYPENAME CountType::ValueType>::Zero );
However the program crash with the following error at the end of the function at runtime in Visual C++ 2003 Debug mode:
watershed.exe!vnl_c_vector<unsigned int>::deallocate(unsigned int * p=0x019cc998, int n=360) Line 468 + 0xf C++
watershed.exe!vnl_vector<unsigned int>::destroy() Line 282 + 0x12 C++
watershed.exe!vnl_vector<unsigned int>::~vnl_vector<unsigned int>() Line 275 C++
watershed.exe!itk::Array<unsigned int>::~Array<unsigned int>() Line 73 + 0x8 C++
I am wondering if I am missing something obvious or if something is out of whack here.
Thanks =)
Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20070210/b2e92cae/attachment.htm
More information about the Insight-users
mailing list