[Insight-users] ITK and iterators debugging in Visual Studio 8

Luis Ibanez luis.ibanez at kitware.com
Wed Dec 27 14:57:09 EST 2006


Hi Matei,


Thanks for sending the exact error message.
This is very useful.


Question:


   Does any of these errors happen when running
   one of the ITK tests or examples ?

   or do the errors appear in a specific application
   that you are developing ?


Please let us know so we can attempt to reproduce the problem.



      Thanks


      Luis



--------------------
Matei Stroila wrote:
> Yes, here it is:
> 
> "Debug Assertion Failed!
> Program: ...(my executable)
>  File: C:\Program Files\Microsoft Visual Studio 8\VC\include\vector
> Line: 238
> 
> Expression: vector iterators incompatible"
> 
> This is triggered by a:
> 
> writer->Update();
> 
> in my code,
> 
> and the call stack stops in itk at:
> 
> Insight\Code\IO\itkimageioregion.h
> Line 170:  same = (m_Index == region.m_Index);
> 
> I had the same problem with the watershed segmentation filter, the "
> Expression: vector iterators incompatible" came from:
> 
> Insight\Code\Common\itk_hashtable.h
> Line 947: this->buckets.swap(tmp);
> 
> On the other hand, everything works fine in Release mode If I use:
> _SECURE_SCL=1
> and  _SECURE_SCL_THROWS=1.
> 
> Thanks,
> 
> Matei
> 
> 
> 
> On 12/27/06, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> 
>>
>> Hi Matei,
>>
>>
>> Can you please post the *EXACT* error message that you get ?
>>
>>
>> Are you sure that those are run-time errors ?
>>
>>
>> Please post to the list the exact message.
>>
>>
>>    Thanks
>>
>>
>>       Luis
>>
>>
>>
>> ---------------------
>> Matei Stroila wrote:
>> > Dear all,
>> >
>> > I am using the latest CVS source of ITK and VS 2005.
>> > Even if I define  _SECURE_SCL=0 and _HAS_ITERATOR_DEBUGGING=0 in my
>> > project,
>> > I still cannot use ITK in debug mode, since I keep getting run time
>> > errors related to the iterator debugging. Does anyone know how to
>> > avoid this?
>> >
>> > Thank you for help,
>> >
>> > Matei
>> > _______________________________________________
>> > Insight-users mailing list
>> > Insight-users at itk.org
>> > http://www.itk.org/mailman/listinfo/insight-users
>> >
>>
> 


More information about the Insight-users mailing list