[vtk-developers] Possible bug in StreamingDemandDriver
Nathan Fabian
ndfabia at sandia.gov
Wed Nov 12 15:07:29 EST 2008
Hi,
I think I've stumbled on a bug in vtkStreamingDemandDrivenPipeline. On line
137 (and below) it looks like this:
if (!N2E && outputPort>-1 && this->GetNumberOfInputPorts())
{
vtkInformation* outInfo = outInfoVec->GetInformationObject(outputPort);
vtkInformation* inInfo = inInfoVec[0]->GetInformationObject(0);
int outNumberOfPieces = outInfo->Get(UPDATE_NUMBER_OF_PIECES());
int inNumberOfPieces = inInfo->Get(UPDATE_NUMBER_OF_PIECES());
However, if the input port is optional then this will fail because there is
not necessarily an Information object for the line:
vtkInformation* inInfo = inInfoVec[0]->GetInformationObject(0);
I think the fix is to change line 137 to read:
if (!N2E && outputPort>-1 && this->GetNumberOfInputPorts() &&
inInfoVec[0]->GetNumberOfInformationObjects () > 0)
Is this correct (it does resolve the problem I'm seeing)? If so, I am happy
to commit the change.
Thanks,
Nathan.
More information about the vtk-developers
mailing list