<div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:arial,sans-serif;font-size:13px;white-space:normal">the mutex is commented out, the starting_barrier ensures that all threads start the read at about the same time. If you uncomment the mutex everything works as expected.</span><br>
</pre></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 21, 2014 at 2:32 PM, Jim Miller <span dir="ltr"><<a href="mailto:millerjv@gmail.com" target="_blank">millerjv@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>A bit odd. Note quite sure from your example why you need the barrier or the mutex. </div><div><br>
</div><div>But since you are using a mutex, it would seem to me that only on ImageFileReader is executing at a time. As such, I wouldn't have expected any interactions between the ImageIO objects. <span class="HOEnZb"><font color="#888888"><br>
<br>Jim</font></span></div><div class=""><div><br>On May 21, 2014, at 3:46 PM, Scott Pfeifer <<a href="mailto:scottfivefour@gmail.com" target="_blank">scottfivefour@gmail.com</a>> wrote:<br><br></div></div><div><div class="h5">
<blockquote type="cite"><div><div dir="ltr">Hi all,<div> I have found what seems to be a bug in IOFactory which seems to be a threading issue. I do not have a fix for it but I have a small program which reproduces the issue. I will attach the files. <div>
<br></div><div>The fix I have for the situation is to either put a mutex around all itkIamgeFileReader::Update()'s of assign the ioObject if I already know what sort of image I am dealing with.</div><div>You will have to change the file names to some mhd files you have, if you need me to provide some I can do that.</div>
<div><br></div><div>to make the problem go away here just uncomment line 24 or 32 in ItkTestThreadSupport.cpp</div><div><br></div><div>I am running Itk 4.5.2 and boost 1.55</div><div><br></div><div>If I can be of any assistance I would be happy to hel p- my stack trace looks like this</div>
<div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">H5MM_xfree()</div>
</div><div style="font-family:arial,sans-serif;font-size:13px">H5E_preintf_stack()</div><span style="font-family:arial,sans-serif;font-size:13px">H5E_clear_starck()</span><div><span style="font-family:arial,sans-serif;font-size:13px">isHdf5()</span></div>
<span style="font-family:arial,sans-serif;font-size:13px">HDF5ImageIO::CanReadFile()<br></span><span style="font-family:arial,sans-serif;font-size:13px">ImageIOFactory::CreateImageIO(</span><span style="font-family:arial,sans-serif;font-size:13px">)</span><span style="font-family:arial,sans-serif;font-size:13px">>::GeneraterOutputInformation(</span><span style="font-family:arial,sans-serif;font-size:13px">) line 116</span><div>
<span style="font-family:arial,sans-serif;font-size:13px">ImageFileReader<itk::image<</span><span style="font-family:arial,sans-serif;font-size:13px">short,3> itkDefaultConvertPixelTrats<</span><span style="font-family:arial,sans-serif;font-size:13px">short> </span></div>
<span style="font-family:arial,sans-serif;font-size:13px">ProcessObject::</span><span style="font-family:arial,sans-serif;font-size:13px">UpdateOutputInformation()</span><div><span style="font-family:arial,sans-serif;font-size:13px">ImageBase<3>::</span><span style="font-family:arial,sans-serif;font-size:13px">UpdateOutputInformation()</span></div>
<span style="font-family:arial,sans-serif;font-size:13px">DataObject::Update()</span><div><span style="font-family:arial,sans-serif;font-size:13px">ProcessObject::update()</span><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div></div>
</div></blockquote></div></div><div class=""><blockquote type="cite"><div><itkLoadTestMain.cpp></div></blockquote><blockquote type="cite"><div><ItkTestThreadSupport.cpp></div></blockquote><blockquote type="cite">
<div><ItkTestThreadSupport.h></div></blockquote><blockquote type="cite"><div><span>_____________________________________</span><br><span>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a></span><br>
<span></span><br><span>Visit other Kitware open-source projects at</span><br><span><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a></span><br>
<span></span><br><span>Kitware offers ITK Training Courses, for more information visit:</span><br><span><a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a></span><br>
<span></span><br><span>Please keep messages on-topic and check the ITK FAQ at:</span><br><span><a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a></span><br><span></span><br><span>Follow this link to subscribe/unsubscribe:</span><br>
<span><a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a></span><br></div></blockquote></div></div></blockquote></div><br></div>