-
Notifications
You must be signed in to change notification settings - Fork 65
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
import pymeshlab
crashes on Windows 11 on 2023.12.post2
#398
Comments
I can confirm this issue is still present in the latest |
Is this happening only on python 3.8? We already dropped it, since it reached its end of life. |
I've asked someone on Windows to test this, they've tested Python 3.8, 3.9 and 3.10. The problem only happened on Python 3.8, so that seems to be it. Do you want to keep the issue open regardless, or should it be closed? So tl;dr for anyone coming across this in the future: Update your Python to not-3.8. |
Ah, sorry, my error is similar, but slightly different in Python 3.11.4. Importing works fine, but Downgrading to Have we tracked down what happened between Here's the full reproduction script: print("Importing Libraries...")
import numpy as np
print("Imported Numpy! Loading xatlas...")
import xatlas
print("Imported xatlas! Loading pymeshlab...")
import pymeshlab
mesh_to_simplify_name = 'myMesh.stl'
print("Imported all Libraries! Loading mesh...")
#pymeshlab.print_filter_list()
ms = pymeshlab.MeshSet()
print("Load a new mesh, and set it as the current mesh...")
ms.load_new_mesh(mesh_to_simplify_name)
print("Loaded! Mesh ID:", ms.current_mesh_id(), "Simplifying...")
ms.apply_filter('meshing_decimation_quadric_edge_collapse', targetfacenum=60000)
ms.save_current_mesh('./simplified_mesh.stl')
print("Surface Simplification Completed!")
print("UV Unwrapping...")
vmapping, indices, uvs = xatlas.parametrize(ms.current_mesh().vertex_matrix(), ms.current_mesh().face_matrix())
print(vmapping, indices, uvs)
vertices = np.copy(ms.current_mesh().vertex_matrix()[vmapping])
ms = pymeshlab.MeshSet()
print("UV Unwrapping completed; constructing new pymeshlab mesh...") # <--- CRASHES AFTER THIS PRINTS
uv_mapped_mesh = pymeshlab.Mesh(vertex_matrix=vertices, face_matrix=indices, v_tex_coords_matrix=uvs.astype(np.float64))
print("Adding mesh to current workspace...")
ms.add_mesh(uv_mapped_mesh, "UV Mesh")
print("UV Unwrapping Complete! New Mesh ID:", ms.current_mesh_id())
ms.save_current_mesh('./simplified_uv_mapped_mesh.obj') |
On Nerfstudio, there have been several recent reports (nerfstudio-project/nerfstudio#3461, more on discord) by Windows users of their
ns-export
commands closing without error.Analyzing the dump in visual studio produces the following:
We have narrowed the issue down to this line specifically, aka
import pymeshlab
.Downgrading to
pymeshlab==2023.12.post1
resolves the issue, so the issue seems to be specific topymeshlab==2023.12.post2
.Confirmed on, at least, Python 3.8.20 and Numpy 1.24.4, on Windows 11.
In theory, simply running an
import pymeshlab
on Windows 11 should be enough to reproduce this issue.(I have not personally reproduced this yet as I don't have access to a Windows machine I could test this on right now, though I've helped narrow it down. At least 5 people reported this issue over the past few days however.)
The text was updated successfully, but these errors were encountered: