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

geodesic_new_mesh causes segmentation fault for non-manifold meshes #55

Open
p-j-smith opened this issue Jan 7, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@p-j-smith
Copy link

To reproduce

load openep_dataset_2.mat
distanceBetweenPoints(userdata, 1, 2, 'method', 'geodesic')

Output
Produces a segmentation fault and geodesic_library raises the error:
Assertion failed: (std::find(map.begin(), map.end(), false) == map.end()), function verify, file ./geodesic_mesh.h, line 404.

Suggested fix
Before calculating geodesic distances, check that both points are referenced in the triangulation (otherwise no geodesic path can be found).

@p-j-smith p-j-smith added the bug Something isn't working label Jan 7, 2022
@p-j-smith p-j-smith changed the title distanceBetweenPoints causes segmentation fault if there is no geodesic path between two points geodesic_new_mesh causes segmentation fault for some meshes Jan 18, 2022
@p-j-smith
Copy link
Author

The problem is not that there is no path between the two points - the problem is with creating a mesh in private/geodesic_new_mesh. Line 32 is where the problem arises:

[id, tmp1, tmp2, num_edges, edges] = calllib(geodesic_library, 'new_mesh', length(p)/3, p, length(t)/3, t, 1, tmp);

@p-j-smith
Copy link
Author

This issue is that the mesh in openep_dataset_2.mat is non-manifold. Perhaps meshlab could be used to re-mesh non-manifold geometries?

@p-j-smith p-j-smith changed the title geodesic_new_mesh causes segmentation fault for some meshes geodesic_new_mesh causes segmentation fault for non-manifold meshes Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant