[vtkusers] vtkusers Digest, Vol 78, Issue 52

Jan Ehrhardt ehrhardt at imi.uni-luebeck.de
Mon Nov 1 08:36:56 EDT 2010


Hi John, Hi Bill,

maybe this buck is related to a bug mentioned before:
http://vtk.1045678.n5.nabble.com/vtkPointLocator-FindPointsWithinRadius-NOT-thread-safe-td2644350.html

At least in the concrete implementation of vtkPointSet::FindCell() a
vtkPointLocator is used.
I have noticed that in methods supposed to be thread-safe the function
double *vtkDataSet::GetPoint(vtkIdType) is called (in VTK 5.4.2). This
function is NOT thread safe.

Changing two lines in vtkPointLocator::FindPointsWithinRadius()
from:
double *pt;
pt = this->DataSet->GetPoint(ptId);

to:
double pt[3];
this->DataSet->GetPoint(ptId,pt);

makes this function thread-safe. However, I have seen 
double *vtkDataSet::GetPoint(vtkIdType) is in other "thread-safe"
methods called too.

Best regards,
Jan


> Message: 1
> Date: Sat, 30 Oct 2010 07:53:31 -0600
> From: John Haiducek <jhaiduce at gmail.com>
> Subject: Re: [vtkusers] FindCell in multithreaded application
> To: Bill Lorensen <bill.lorensen at gmail.com>
> Cc: vtkusers at vtk.org
> Message-ID: <1288446811.7576.4.camel at lhc.mendelsonsouth.oh.us>
> Content-Type: text/plain; charset="UTF-8"
> 
> On Fri, 2010-10-29 at 23:42 -0400, Bill Lorensen wrote:
> > Can you post a small compilable example that exhibits this behavior?
> > If the thread-safe call is not thread-safe, then there is a bug.
> 
> Bill, thanks for your reply.
> 
> Making a small example will take some work. Where I'm seeing the bug is
> with modifications to Blender 3D, which is a pretty big application. I
> don't have anything smaller yet that's multithreaded. I'll try to follow
> up in a few days with an example that reproduces the bug.
> 
> John Haiducek
> 
> 
> 
> 
> ------------------------------
> 
> _______________________________________________
> vtkusers mailing list
> vtkusers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> End of vtkusers Digest, Vol 78, Issue 52
> ****************************************





More information about the vtkusers mailing list