[vtkusers] vtkImageAppend does not work correctly with multiple threads
Dominik Szczerba
dominik at itis.ethz.ch
Fri May 27 10:18:01 EDT 2011
Hi David,
Many thanks for the immediate bug fix! It does eliminates the crash in
the given example.
I expect to test this fix extensively in the coming days.
Many thanks and regards,
Dominik
On Fri, May 27, 2011 at 3:10 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi Dominik,
>
> It looks like an extent error around line 510 of vtkImageAppend.cxx,
> here is the patch:
>
> Change this:
> if (inExt[this->AppendAxis*2] <= inExt[this->AppendAxis*2 + 1])
>
> To this:
> if (inExt[0] <= inExt[1] && inExt[2] <= inExt[3] && inExt[4] <= inExt[5])
>
> Can you make this change to vtkImageAppend.cxx and let me know
> if it fixes the issue?
>
> - David
>
>
> On Fri, May 27, 2011 at 5:21 AM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
>> Hi David,
>>
>> I submitted a bug with example data and steps to reproduce:
>>
>> http://www.vtk.org/Bug/view.php?id=12229
>>
>> Regards
>> Dominik
>>
>> On Thu, May 26, 2011 at 8:33 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>> Hi Dominik,
>>>
>>> Thanks, I just needed confirmation of what you had done to ensure that
>>> the bug was specifically in vtkImageAppend and not in some other
>>> filter in your pipeline.
>>>
>>> Thread-related problems in the imaging filters are often due to
>>> incorrect assumptions by the execute methods about how the extents
>>> will be broken up for different threads. I notice that vtkImageAppend
>>> does not have its own regression test, instead it is tested indirectly
>>> by Imaging/Testing/Tcl/TestAllFlips.tcl and a few others, and only for
>>> 2D images.
>>>
>>> If you can send a short test for it that crashes, one that can
>>> eventually become part of the nightly testing, that would be the best
>>> way to proceed.
>>>
>>> - David
>>>
>>>
>>> On Thu, May 26, 2011 at 12:01 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
>>>> Yes, that was my point, it only works correctly with SetNumberOfThreads(1).
>>>> So there seems to be a bug, I am happy to debug and patch,
>>>> unfortunately, the code implementation is hardly documented...
>>>> Any hints are appreciated.
>>>> Dominik
>>>>
>>>> On Thu, May 26, 2011 at 5:58 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>>>> Hi Dominik,
>>>>>
>>>>> If you call SetNumberOfThreads(1) does it make the problem go away?
>>>>>
>>>>> - David
>>>>>
>>>>>
>>>>> On Thu, May 26, 2011 at 9:37 AM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
>>>>>>
>>>>>> I have found that vtkImageAppend only works correctly for me
>>>>>> (preserving extents, overlapping regions) with one thread. With more
>>>>>> it crashes reported incorrect input/output pointers.
>>>>>> Did anybody have similar problems?
>>>>>>
>>>>>> Thanks,
>>>>>> Dominik
>>>
>>>
>>
>
>
More information about the vtkusers
mailing list