[vtk-developers] Possible bug in StreamingDemandDriver
David E DeMarle
dave.demarle at kitware.com
Wed Nov 12 15:14:18 EST 2008
On Wed, Nov 12, 2008 at 3:07 PM, Nathan Fabian <ndfabia at sandia.gov> wrote:
> 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.
>
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
Yes that looks like a bug and a correct fix to me (the person who
introduced the bug).
Please commit.
thanks,
Dave DeMarle
--
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
More information about the vtk-developers
mailing list