Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 738
    • Issues 738
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 202
    • Merge requests 202
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #17529

Closed
Open
Created Feb 13, 2019 by Allison Vacanti@allisonvacantiDeveloper

vtkDataObjectTreeIterator uses fragile caching mechanism.

Consider the following code:

vtkDataObject newDObj = ...;
vtkDataObjectTreeIterator *iter = ...;

// Replace the data object pointed to by iter with newDObj:
iter->GetDataSet()->SetDataSet(iter, newDObj);

assert(this->GetDataSet()->GetDataSet(iter) == newDObj); // ok
assert(iter->GetCurrentDataObject() == newDObj); // ERROR!

The vtkDataObjectTreeIterator (and maybe other implementations of vtkCompositeDataIterator) cache the current data object internally when they are created/incremented, and do not accurately reflect the current state of the container.

The new vtk::Range iterator implementations (!5158 (merged), !5201 (merged)) are implemented with workarounds to correct this behavior, but the original iterators will need some non-trivial refactoring to fix.

Edited Feb 18, 2019 by Allison Vacanti
Assignee
Assign to
Time tracking