Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling python itk.meshread on the linked file causes itk to segfault. #4478

Closed
HastingsGreer opened this issue Feb 23, 2024 · 3 comments · Fixed by #4669
Closed

Calling python itk.meshread on the linked file causes itk to segfault. #4478

HastingsGreer opened this issue Feb 23, 2024 · 3 comments · Fixed by #4669
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Milestone

Comments

@HastingsGreer
Copy link
Contributor

Description

Calling python itk.meshread on the linked file causes itk to segfault.

Steps to Reproduce

Download

https://github.com/uncbiag/OAI_analysis_2/blob/oh-no/meshR.vtk

import itk
itk.imread("meshR.vtk")

Actual behavior

>>> itk.meshread("Downloads/meshR.vtk")
zsh: segmentation fault  python
(base) hastings@hastingss-air ~ % /Users/hastings/opt/anaconda3/lib/python3.8/multiprocessing/resource_tracker.py:216:     UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Reproducibility

I have reproduced on mac and linux 100%

Versions

I have seen this on itk 5.3.0

Environment

Mac and linux, with the default pip install itk

Additional Information

@HastingsGreer HastingsGreer added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Feb 23, 2024
@HastingsGreer
Copy link
Contributor Author

Quick and easy reproduction: https://colab.research.google.com/drive/1n1t0525CigneZ--2QTxSsiPsKXQ6LKaP?usp=sharing

(There is no output when it segfaults, the notebook just restarts with an error message)

@thewtex thewtex added this to the ITK 5.4.0 milestone Feb 26, 2024
@thewtex
Copy link
Member

thewtex commented Mar 11, 2024

The reader is choking on the presence of OFFSETS, which is because VTK changed the format in legacy file format version 5.1:

Kitware/VTK@7f76b9e

which is currently undocumented:

https://gitlab.kitware.com/vtk/vtk/-/issues/17989

@thewtex
Copy link
Member

thewtex commented May 13, 2024

thewtex added a commit to thewtex/ITK that referenced this issue May 15, 2024
This format is not documented per:

- Kitware/VTK@7f76b9e
- https://gitlab.kitware.com/vtk/vtk/-/issues/17989
- https://discourse.vtk.org/t/legacy-polydata-file-compatibility/5354/11

so best guess implementation.

Continue to write with the older form, which is supported by more software.

Closes InsightSoftwareConsortium#4478
thewtex added a commit to thewtex/ITK that referenced this issue May 15, 2024
This format is not documented per:

- Kitware/VTK@7f76b9e
- https://gitlab.kitware.com/vtk/vtk/-/issues/17989
- https://discourse.vtk.org/t/legacy-polydata-file-compatibility/5354/11

so best guess implementation.

Continue to write with the older form, which is supported by more software.

Closes InsightSoftwareConsortium#4478
thewtex added a commit to thewtex/ITK that referenced this issue May 16, 2024
This format is not documented per:

- Kitware/VTK@7f76b9e
- https://gitlab.kitware.com/vtk/vtk/-/issues/17989
- https://discourse.vtk.org/t/legacy-polydata-file-compatibility/5354/11

so best guess implementation.

Continue to write with the older form, which is supported by more software.

Closes InsightSoftwareConsortium#4478
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants