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

MeshIO crashes on reading #866

Open
thewtex opened this issue May 14, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@thewtex
Copy link
Member

commented May 14, 2019

Description

MeshIO crashes on reading. For more information, see the end of this thread:

https://discourse.itk.org/t/trianglemeshtobinaryimagefilter-in-python/1604/6

Steps to Reproduce

import itk
meshType = itk.Mesh[itk.F, 3]
meshReader = itk.MeshFileReader[meshType].New()
meshIO = itk.OBJMeshIO.New()
meshReader.SetMeshIO(meshIO)
meshReader.SetFileName(‘bunny.obj’)
meshReader.Update()

Versions

ITK 5.0 RC 2.

Environment

Python packages.

@thewtex thewtex added this to the ITK v5.0.0 milestone May 14, 2019

fbudin69500 pushed a commit to fbudin69500/ITK that referenced this issue May 16, 2019

Francois Budin
BUG: m_NumberOfPointPixels was set equal to m_NumberOfPoints
Addresses issue InsightSoftwareConsortium#866.

When reading the mesh information, `m_NumberOfPointPixels` is computed based
on the number of lines starting with the code `vn`. However, this was
then overriden and set equal to `m_NumberOfPoints`.
This lead to a crash when these lines were actually read in
the function `ReadPointData()` because not enough memory was allocated.

thewtex added a commit to fbudin69500/ITK that referenced this issue May 18, 2019

BUG: m_NumberOfPointPixels was set equal to m_NumberOfPoints
Addresses issue InsightSoftwareConsortium#866.

When reading the mesh information, `m_NumberOfPointPixels` is computed based
on the number of lines starting with the code `vn`. However, this was
then overriden and set equal to `m_NumberOfPoints`.
This lead to a crash when these lines were actually read in
the function `ReadPointData()` because not enough memory was allocated.

@thewtex thewtex modified the milestones: ITK v5.0.0, ITK v5.0.1 May 22, 2019

@thewtex

This comment has been minimized.

Copy link
Member Author

commented May 22, 2019

Addressed in: #883

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.