[vtkusers] Re: mysterious ErrorEvent phenomenon with vtkPolyDataNormals

Charl P. Botha cpbotha at gmail.com
Mon Nov 7 12:26:15 EST 2005


On 11/7/05, Charl P. Botha <cpbotha at gmail.com> wrote:
> Please see the attached python sample for a demonstration of some very
> strange behaviour in VTK CVS HEAD.

Hmm, the VTK mailing list system scrubbed my attachment, so here it is
inline as well:

import vtk

def errorObserver(theObject, eventType):
    print "errorObserver invoked! **************"

# setup polydata reader with ErrorEvent observer
reader = vtk.vtkPolyDataReader()
reader.AddObserver('ErrorEvent', errorObserver)
# deliberately trigger error
reader.SetFileName('does.not.exist')
reader.Update()
# with VTK CVS HEAD 20051106, we see:
# errorObserver invoked! **************

# now do the same for vtkPolyDataNormals:
filt = vtk.vtkPolyDataNormals()
filt.AddObserver('ErrorEvent', errorObserver)
filt.Update()
# with VTK CVS HEAD 20051106, we see:
#
# ERROR: In
# /home/cpbotha/DoNotBackup/build/VTK/Filtering/vtkDemandDrivenPipeline.cxx,
# line 692
# vtkStreamingDemandDrivenPipeline (0x82b8d98): Input port 0 of algorithm
# vtkPolyDataNormals(0x82b86f8) has 0 connections but is not optional.
#
# which is the standard error output, and NOT the error observer.

# vtkDemandDrivenPipeline.cxx, at line 689 - 692, DOES make use of the
# vtkErrorMacro, so it SHOULD be triggering the ErrorEvent observer

# What's going on?

--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list