"pcl.paint_uniform_color" gives segmentation fault.
envgap__isl-org__Open3D-6845
01 / FAILURE SIGNATURE
As reported upstream
### Error message
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
c9f671323ffd762f74249b52e0e4c4223aecce49- Manifest
CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
isl-org/Open3D #6845 · read the original issue
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).
### Describe the issue
"pcl.paint_uniform_color" gives segmentation fault
### Steps to reproduce the bug
```python
import open3d as o3d
import numpy as np
import sys
print("Open3D version: {}".format(o3d.__version__))
print("Python version: {}".format(sys.version))
def check_properties(mesh):
# From: http://www.open3d.org/docs/release/tutorial/geometry/mesh.html
mesh.compute_vertex_normals()
edge_manifold = mesh.is_edge_manifold(allow_boundary_edges=True)
vertex_manifold = mesh.is_vertex_manifold()
self_intersecting = mesh.is_self_intersecting()
watertight = mesh.is_watertight()
orientable = mesh.is_orientable()
print(f" edge_manifold: {edge_manifold}")
print(f" vertex_manifold: {vertex_manifold}")
print(f" self_intersecting: {self_intersecting}")
print(f" watertight: {watertight}")
print(f" orientable: {orientable}")
geoms = [mesh]
if not vertex_manifold:
print("1")
verts = np.asarray(mesh.get_non_manifold_vertices())
print("1")
pcl = o3d.geometry.PointCloud(
points=o3d.utility.Vector3dVector(np.asarray(mesh.vertices)[verts]))
print("1")
pcl.paint_uniform_color((0.0, 0.0, 1.0)) # segmentation fault
print("1")
geoms.append(pcl)
print("Visualizing the mesh and non-manifold vertices in blue.")
o3d.visualization.draw_geometries(geoms, mesh_show_back_face=True)
assert edge_manifold, 'The triangle mesh is not edge-manifold.'
def load_and_visualize_mesh(file_path):
# Load the triangle mesh
mesh = o3d.io.read_triangle_mesh(file_path)
check_properties(mesh)
file_path = "mesh.ply" # Replace this with the path to your mesh file
load_and_visualize_mesh(file_path)
```
### Error message
Open3D version: 0.18.0
Python version: 3.9.19 (main, May 6 2024, 19:43:03)
[GCC 11.2.0]
edge_manifold: True
vertex_manifold: False
self_intersecting: True
watertight: False
orientable: True
1
1
1
Segmentation fault (core dumped)
### Expected behavior
Change the color of the point
### Open3D, Python and System information
```markdown
- Operating system: Pop!_OS 22.04
- Python version: Python 3.9.12
- Open3D version: 0.18.0
- System architecture: x86_64 x86_64 x86_64 GNU/Linux
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
### Additional information
To download my mesh. 2MB
https://drive.google.com/file/d/1eRWxaxAdx6IZKF1VaswgQqO1i45Fr5qr/view?usp=sharing
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]