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

Segmentation fault when running manifold_harmonics sample program #166

Closed
megawattfs opened this issue Jul 18, 2024 · 1 comment
Closed

Comments

@megawattfs
Copy link

megawattfs commented Jul 18, 2024

This is a Windows debug build of version 1.9.0 using the dynamic libraries. I have attached a .zip archive containing the .obj file I used. It has 500 vertices and 983 triangles.

To reproduce (from the build\Windows\bin\Debug directory):
manifold_harmonics.exe path/to/test.obj nb_eigens=4 discretization=UNIFORM works
manifold_harmonics.exe path/to/test.obj nb_eigens=24 discretization=UNIFORM gives a segmentation fault

After tracing the issue, I discovered that with some starting values of nb_eigens (nb_eigens=24 in this example), there is an ARPack routine (I think dseupd) that increments nev (number of eigenvalues) by one, so later when the eigenvectors are being written to the buffer at the end of solving, there is a segmentation fault.

EDIT: Worked around it, working on a PR

test.zip

@BrunoLevy
Copy link
Owner

I just tested on my machine (Linux) with a memory debugger it worked and did not detect anything. I'll try on a Windows machine as soon as I have time (and yes, I'll be interested in a PR if you found a workaround)

Note: it was not the origin of the problem, but your mesh has a very small number of vertices, you may need to remesh it in order to have sufficient degrees of freedom to accurately represent the MHs. You can use:

$ vorpalite test.obj remesh:nb_pts=10000 remeshed.obj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants