MantisBT - VTK
View Issue Details
0003688VTK(No Category)public2006-08-31 20:012016-08-12 09:54
Heath Davis 
Will Schroeder 
normalmajoralways
closedmoved 
 
 
0003688: Segfault when subclassing vtkProp and vtkPropAssembly
When subclassing vtkProp and vtkPropAssembly, rendering and picking are adversely affected by NULL returns from GetMatrix(). Rendering can segfault near line 119 of Filtering/vtkPropAssembly.cxx. Picking can exit early from line 332 of Rendering/vtkPicker.cxx.

     Analysis of the crash shows that the vtkAssemblyPath built for these subclasses contain NULL Matrix entries. Thankfully, the virtual GetMatrix() can be overridden in subclasses of vtkProp and vtkPropAssembly. That only gets you halfway there, though. The base classes still try to insert NULL matricies into the vtkAssemblyPath when built for subclasses.

     Changes are proposed which will cause subclasses to act correctly. Since the base classes have GetMatrix() defined to return NULL, I predict that the following changes will not adversely affect the operation of VTK.

Common/vtkProp.cxx
  Line 72:
    from:
    path->AddNode(this,NULL);
    to:
    path->AddNode(this, this->GetMatrix());
Filtering/vtkPropAssembly.cxx
  Line 313:
    from:
    path->AddNode(this,NULL);
    to:
    path->AddNode(this, this->GetMatrix());
  Line 346:
    from:
    path->AddNode(prop,NULL);
    to:
    path->AddNode(prop, prop->GetMatrix());
No tags attached.
Issue History
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036887
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved

Notes
(0036887)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.