MantisBT - ITK
View Issue Details
0008839ITKpublic2009-04-03 17:072010-11-18 21:10
Hans Johnson 
Gaetan Lehmann 
normalminoralways
closedfixed 
ITK-3-12 
 
2009-05-08
backlog
0008839: Multithreaded exception handling in itkConnectedComponentImageFilter

Sorry to complain, and not provide a fix. But here is the situation, I have a program that uses the itkConnectedComponentImageFilter, and when I set ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1, the exception at line 345 is of src/include/InsightToolkit/BasicFilters/itkConnectedComponentImageFilter.txx is thrown (proper behavior)

When ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=8; the same code enters into an infinite loop that never exits.

    336 if( threadId == 0 )
    337 {
    338 unsigned long int totalLabs = CreateConsecutive();
    339 m_ObjectCount = totalLabs;
    340 // check for overflow exception here
    341 if( totalLabs > static_cast<unsigned long int>(
    342 NumericTraits<OutputPixelType>::max() ) )
    343 {
    344 itkExceptionMacro(
    345 << "Number of objects greater than maximum of output pixel type " );
    346 }
    347 }
    348 this->Wait();
    349

I was wondering what the correct behavior is supposed to be in a case like this.
No tags attached.
Issue History
2009-04-03 17:07Hans JohnsonNew Issue
2009-04-03 17:08Hans JohnsonStatusnew => assigned
2009-04-03 17:08Hans JohnsonAssigned To => user685
2009-04-06 09:32Hans JohnsonAssigned Touser685 => glehmann
2009-04-06 09:33Hans JohnsonNote Added: 0015918
2009-04-29 20:03Hans JohnsonNote Added: 0016259
2009-05-08 18:34Gaetan LehmannNote Added: 0016359
2010-11-18 03:21Gaetan LehmannAssigned Toglehmann => Gaetan Lehmann
2010-11-18 03:21Gaetan LehmannResolution Date => 2009-05-08
2010-11-18 03:21Gaetan LehmannSprint Status => backlog
2010-11-18 03:21Gaetan LehmannStatusassigned => resolved
2010-11-18 03:21Gaetan LehmannResolutionopen => fixed
2010-11-18 21:10Luis IbanezStatusresolved => closed
2010-11-18 21:10Luis IbanezNote Added: 0023406

Notes
(0015918)
Hans Johnson   
2009-04-06 09:33   
> On 4/3/09 5:09 PM, "Gaëtan Lehmann" <gaetan.lehmann@jouy.inra.fr> wrote:
>
>>
>> Hi Hans,
>>
>> I've made the multithreaded part - I guess I've missed a case.
>> I'll look at it soon.
>>
>> Gaëtan
(0016259)
Hans Johnson   
2009-04-29 20:03   
Gaetan,

Any luck with this?

Thanks,
Hans
(0016359)
Gaetan Lehmann   
2009-05-08 18:34   
Hans,

It took me a lot longer than I thought before I can look into it.
I finally did, and commited a fix as well as new test in ITK.

Can you test and, if it's ok, close the bug?

Regards,

Gaëtan
(0023406)
Luis Ibanez   
2010-11-18 21:10   
We have decided to skip the "resolved" status and move directly to "closed".