[vtk-developers] Calling UpdateProgress from multiple threads

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jan 9 11:11:56 EST 2008


Hi there,

  I am getting a seg fault from a python script when I am observing a
ProgressEvent

==20066== Thread 2:
==20066== Invalid read of size 4
==20066==    at 0x403232A: sem_post@@GLIBC_2.1 (in
/usr/lib/debug/libpthread-2.5.so)
==20066==    by 0x80B0D53: PyEval_ReleaseLock (in /usr/bin/python2.4)
==20066==    by 0x80DDB20: PyGILState_Release (in /usr/bin/python2.4)
==20066==    by 0x45C7AB4: vtkPythonCommand::Execute(vtkObject*,
unsigned long, void*) (vtkPythonUtil.cxx:2016)
==20066==    by 0x483C0DF: vtkSubjectHelper::InvokeEvent(unsigned
long, void*, vtkObject*) (vtkObject.cxx:547)
==20066==    by 0x483C18E: vtkObject::InvokeEvent(unsigned long,
void*) (vtkObject.cxx:713)
==20066==    by 0x4E67E6A: vtkAlgorithm::UpdateProgress(double)
(vtkAlgorithm.cxx:115)


  Calling the very same filter from C++ is running perfectly fine. I
did put the critical section (call to UpdateProgress) in between a
mutex lock. Is there something I should pay attention when using
command/observer calling a python function ?

Thanks,
-- 
Mathieu



More information about the vtk-developers mailing list