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

Fast winding number terminates with some meshes / segfaults #198

Open
mark-at-hypothetic opened this issue Jun 7, 2023 · 3 comments
Open

Comments

@mark-at-hypothetic
Copy link

Hi!
I'm using
fast_winding_number_for_meshes(v: array, f: array, q: array)
Mostly it works, but with some variations of v and f, the code crashes, and gives C++ errors without a clear stack trace. Just

terminate called without an active exception
terminate called recursively
terminate called recursively
[1]    697800 IOT instruction (core dumped)

q is of size 256x256x256x3
The problem is sporadic for different meshes, and haven't found what exactly triggers a crash, just that it's reproducible with the same mesh, and that this error doesn't happen when simplifying the mesh to have less vertices.

using python 3.10, and libigl 2.4.1

@alecjacobson
Copy link
Contributor

Could you please upload the problematic input?

@guohaoxiang
Copy link

guohaoxiang commented Sep 10, 2024

I met the same bugs. Here are the files and codes to reproduce this bug.

data link: https://drive.google.com/file/d/1K7r3udYOXrwn4kmWq--rvDquBkN49sGK/view?usp=sharing

def reproduce_bugs():
    m = trimesh.load('Maserati.obj')
    nonsurf_points = np.loadtxt('nonsurf_points.xyz')
    wn = igl.fast_winding_number_for_meshes(m.vertices, m.faces, nonsurf_points)

Note that the bug occurs occasionally. Every 3 or 4 times I run the program, the bug will occur.

@guohaoxiang
Copy link

By the way, I find I can reproduce this bug on a Ubuntu 22.04 machine with python 3.10.6, but I can not reproduce it on my windows machine with python 3.10.9

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

No branches or pull requests

3 participants