strange error when deleting objects

Jan Stifter j.stifter at medres.ch
Fri Jul 9 07:26:28 EDT 1999


hi vtk users,
in an object called ViewItemObject, i have the following pipeline:

vtkSTLReader
   ¦
vtkPolyData *myData (needed for filters, ...)
   ¦
vtkNormalsFilter
   ¦
vtkPolyDataMapper
   ¦
vtkActor
   ¦

the object ViewItemObject has many instances. i connect the actors together
in a vtkAssembly. Everything works fine, until I want to delete all objects.
sometimes it works, sometimes not.

in the destructor of this object, i delete first the vtkActor, then
vtkPolyDataMapper, vtkNormalsFilter, vtkPolyData and then the program
crashes:

   if (myActor)         { myActor->Delete ();         }
   if (myMapper)        { myMapper->Delete ();        }
   if (myNormalsFilter) { myNormalsFilter->Delete (); }
   if (myData)          { myData->Delete();           }
   if (mySTLReader)     { mySTLReader->Delete ();     }  // here we crash

the program crashes, when i call "mySTLReader->Delete();"

any hints are greatly appreciated

jan




-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list