Segmenttaion fault when setting material record.
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### 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
I get a segmentation fault when I make the following call:
```python
material = rendering.MaterialRecord()
material.base_color = np.array([1., 1., 1., 1.], dtype=np.float32)
```
No error message, just a seg fault. I have no checked and this does not happen in 0.17.0. It also appears there are some issues with numpy v2 in some cases. Particularly in my CI I still got Seg Faults with 0.17.0 until I set numpy < 2.0.0.
### Steps to reproduce the bug
You can do this:
```python
material = rendering.MaterialRecord()
material.base_color = np.array([1., 1., 1., 1.], dtype=np.float32)
```
But it doesn't really matter what I pass to the class it will Seg Fault unless the type is wrong in which case we get an exception.
### Error message
```sh
Segmentation fault (core dumped)
```
### Expected behavior
Does not seg fault.
### Open3D, Python and System information
```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.10
- Open3D version:0.18.0
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.