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 on mac #399

Open
katosad opened this issue Oct 16, 2024 · 1 comment
Open

segmentation fault on mac #399

katosad opened this issue Oct 16, 2024 · 1 comment

Comments

@katosad
Copy link

katosad commented Oct 16, 2024

Hello,
I am experiencing a strange segmentation fault issue when iterating over directories and generating ply files. I am running this on an M3 mac, OS v14.7, using PyMeshLab v2023.12.post2 & python 3.10.

Pseudocode

main.py:

for dir in os.listdir(root_dir):
    try:
         ms = generate_ply_files(dir)
         # do some other stuff with ms
    except Exception:
         print("error")

generate_ply_files:

def generate_ply_files(dir):
    ms = pml.MeshSet()
    ms.load_new_mesh(f"{dir}/mesh1.ply")
    ms.load_new_mesh(f"{dir}/mesh2.ply")
    ms.apply_filter("generate_boolean_intersection")
    return ms

Behavior

My root_dir has the following structure:

root_dir
| - dir1
|    | - mesh1.ply
|    | - mesh2.ply
| - dir2
|    | - mesh1.ply
|    | - mesh2.ply

If i start with processing dir1 and an error is thrown from generate_ply_files, then I receive a segmentation fault when I move on to processing dir2. The seg fault is triggered when calling ms.load_new_mesh('root_dir/dir2/mesh1.ply'). If no errors are thrown when processing dir1, then no seg faults occur either.

I hope this is clear, but let me know if you need anything else. Thanks!

@alemuntoni
Copy link
Member

alemuntoni commented Nov 18, 2024

That's strange, and it seems very difficult to debug.
I don't even know where to start since a new MeshSet instance is created every time...
What kind of error is thrown when processing dir1? Have you tried the same example on other platforms?

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

2 participants