isl-org / isl-org/Open3D

Segmentation Fault When Using `set_front` in Visualizer (段错误 (核心已转储))

Open
#6,978 2 comments 0 reactions 0 assignees View on GitHub
bug
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

Hi,
I'm encountering a segmentation fault when trying to set the view control using `set_front` and other camera controls (`set_lookat`, `set_up`) within the `Visualizer` class in Open3D. The visualizer works fine until I try to modify the camera view control parameters.

Any guidance on this issue would be greatly appreciated. Thank you!

### Steps to reproduce the bug

```python
import open3d as o3d
import numpy as np

... ...

# Initialize visualizer
vis = o3d.visualization.Visualizer()
vis.create_window(window_name="Point Cloud", width=1200, height=600)
vis.add_geometry(pano_pcd)
ctr = vis.get_view_control()
ctr.set_front([1, 0, 0])
vis.run()
vis.destroy_window()
```

### Error message

00000
11111
段错误 (核心已转储)

### Expected behavior

The camera view should adjust without causing a segmentation fault.

### Open3D, Python and System information

```markdown
1. When I remove the `set_front` call, the visualizer runs without issue.
2. I am working with a point cloud containing 8,294,400 points and corresponding color data.
3. The segmentation fault occurs after calling `set_front` (or sometimes `set_lookat`).
4. My system:
- OS: Ubuntu 20.04
- Open3D Version: 0.18.0
- Python Version: 3.9
```

### Additional information

The program crashes with a segmentation fault when calling `set_front` (or related methods) after starting the visualizer.

- I have tried adjusting the order of operations by calling `vis.run()` before and after setting the view control, but the segmentation fault persists.
- The program runs without error when I do not modify the view control settings.
- I also tried `ctr.set_front(np.array([1, 0, 0], dtype=np.float64))` following the document, not work either.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.