[vtk-developers] interesting problem with vtkObject Update() [FIX + PATCH, please apply]

Charl P. Botha c.p.botha at its.tudelft.nl
Wed Feb 19 16:55:18 EST 2003


Dear developers,

On Wed, Feb 19, 2003 at 04:59:14PM +0100, Charl P. Botha wrote:
> I ran into this problem whilst developing such a GUI + VTK application.  My
> questions are:
> 
> 1. Can this be considered a bug?
> 2. Is there a way to lock the Update() method of a vtkObject?  This would of
>    course solve the problem above.

I believe that this DOES constitute a bug (a very serious one that affects
all descendants of vtkSource) and therefore I've attached my fix. The
UpdateData() method in the vtkSource class IS protected with an "Updating"
variable, but it gets reset too soon, which means the previously attached
deciFran.py example will always segfault.

I've attached my fix, which moves the "Updating" reset to the END of the
method.  I believe this is correct, as UpdateData() was never supposed to be
fully re-entrant.

Please apply before the new release if at all possible.

Thanks,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
-------------- next part --------------
Index: vtkSource.cxx
===================================================================
RCS file: /vtk/cvsroot/VTK/Common/vtkSource.cxx,v
retrieving revision 1.101
diff -u -r1.101 vtkSource.cxx
--- vtkSource.cxx	17 Jan 2003 14:09:51 -0000	1.101
+++ vtkSource.cxx	19 Feb 2003 21:48:51 -0000
@@ -352,7 +352,7 @@
         }
       }
     }
-  this->Updating = 0;     
+
     
   // Initialize all the outputs
   for (idx = 0; idx < this->NumberOfOutputs; idx++)
@@ -425,6 +425,8 @@
         }
       }  
     }
+
+  this->Updating = 0;
   
 }
 


More information about the vtk-developers mailing list