ITK
ITK copied to clipboard
Calling python itk.meshread on the linked file causes itk to segfault.
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
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)
The reader is choking on the presence of OFFSETS
, which is because VTK changed the format in legacy file format version 5.1:
https://github.com/Kitware/VTK/commit/7f76b9e97b1a05cfe4fcd5f9af58f0d7a385b639
which is currently undocumented:
https://gitlab.kitware.com/vtk/vtk/-/issues/17989
Also: https://discourse.vtk.org/t/legacy-polydata-file-compatibility/5354/11