Skip to content
GitLab
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 830
    • Issues 830
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 240
    • Merge requests 240
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #18059
Closed
Open
Issue created Dec 02, 2020 by Steve Pieper@pieper

crash writing vtp with degenerate cells (new in vtk9)

Code that uses vtkXMLPolyDataWriter that previously worked with vtk8 started crashing with vtk9. We created a workaround to that in this PR.

In discussions with @jcfr, we decided to post the issue here and flag it as a regression in VTK, since code that used to work (with a warning) now leads to a crash.

The issue is that this line in vtk 9.0.1 throws and error, which is caught and this->Cells is set to nullptr.

In vtk 8.1.2, the corresponding code generates a warning but processing continues and this->Cells is valid.

Because this->Cells is null in vtk 9.0.1, vtkXMLUnstructuredDataWriter crashes with a stack trace like this:

1   std::vector<vtkPolyData_detail::TaggedCellId>::operator[] stl_vector.h                         1043 0x7f3e1ff04516 
2   vtkPolyData_detail::CellMap::GetTag                       vtkPolyDataInternals.h               239  0x7f3e1ff04325 
3   vtkPolyData::GetCellType                                  vtkPolyData.h                        730  0x7f3e2012759a 
4   vtkDataSet::GetCellTypes                                  vtkDataSet.cxx                       326  0x7f3e1ff39865 
5   vtkXMLUnstructuredDataWriter::ProcessRequest              vtkXMLUnstructuredDataWriter.cxx     166  0x7f3e1b31418e 
6   vtkExecutive::CallAlgorithm                               vtkExecutive.cxx                     746  0x7f3e1fe25449 
7   vtkDemandDrivenPipeline::ExecuteData                      vtkDemandDrivenPipeline.cxx          462  0x7f3e1fe1cf92 
...

IMO the correct behavior would be to restore the previous option of just printing a warning and continuing. It's not optimal to have degenerate cells in a vtkPolyData, but it should not lead to a crash, especially since it worked before.

Assignee
Assign to
Time tracking