# itkApproximateSignedDistanceMapImageFilterTest1 failures

**URL:** https://discourse.itk.org/t/itkapproximatesigneddistancemapimagefiltertest1-failures/913
**Category:** Engineering
**Created:** [May 9, 2018, 5:35pm UTC](https://discourse.itk.org/t/itkapproximatesigneddistancemapimagefiltertest1-failures/913 "2018-05-09T17:35:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [May 9, 2018, 5:35pm UTC](https://discourse.itk.org/t/itkapproximatesigneddistancemapimagefiltertest1-failures/913/1 "2018-05-09T17:35:39Z")

</div>

The following test has sporadic failures:  
[https://open.cdash.org/testDetails.php?test=650830714&build=5365233](https://open.cdash.org/testDetails.php?test=650830714&build=5365233)

They occur more one highly multi-threaded system.

I narrowed the failure down to the IsoContourDistanceImageFilter by setting this filter to only having 1 thread in the above filter’s composite mini-pipeline.

I believe that I further narrowed it down to the following line:

> <https://github.com/InsightSoftwareConsortium/ITK/blob/64703c6df3253ca4a0b282747a11473e7dc2bcc7/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx#L383>

Which appear to be writing outside the output region for the thread leading to race conditions. I could not find a quick solution to it, and have moved on at the moment.

Any one else care to pick this up?

---

<div class="post-metadata">

### Author: ![blowekamp](https://discourse.itk.org/user_avatar/discourse.itk.org/blowekamp/32/79_2.png) [@blowekamp](https://discourse.itk.org/u/blowekamp)
#### Post date: [May 24, 2018, 3:25pm UTC](https://discourse.itk.org/t/itkapproximatesigneddistancemapimagefiltertest1-failures/913/2 "2018-05-24T15:25:57Z")

</div>

Here is my oafish solution to the concurrent read/write in the output of the filter:  
[http://review.source.kitware.com/#/c/23467/](http://review.source.kitware.com/#/c/23467/)
