isl-org / isl-org/Open3D

Open3d Application inexplicably terminates when too many geometries are on screen,

Open
#6,141 1 comment 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](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Describe the issue

I am trying to render a lot of triangle mesh geometries with open3d Application / O3DSceneWidget. The geometries are added to the scene and rendered correctly. However when I zoom out and all geometries are on screen the Application immediately closes the window and terminates. There is no Exception thrown or any kind of output to the console. The application behaves as if it was closed normally. This only happens when there are more then 4700+ geometries beeing rendered, if I reduce the amount everything works as expected and super stable.

### Steps to reproduce the bug

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

o3d.visualization.gui.Application.instance.initialize()
window = o3d.visualization.gui.Application.instance.create_window(
"Open3d", 2560, 1200
)
scene_widget = o3d.visualization.gui.SceneWidget()
scene_widget.scene = o3d.visualization.rendering.Open3DScene(window.renderer)
scene_widget.enable_scene_caching(True) # makes UI _much_ more responsive
scene_widget.scene.set_background([0.3, 0.3, 0.3, 1])

window.add_child(scene_widget)

mat = o3d.visualization.rendering.MaterialRecord()
mat.shader = "defaultLit"

N = 5000
for i in range(N):
cf = o3d.geometry.TriangleMesh.create_coordinate_frame()
t = (np.random.rand(3) - 0.5) * 100.
cf = cf.translate(t)
scene_widget.scene.add_geometry(str(i), cf, mat)

o3d.visualization.gui.Application.instance.run()
```

### Error message

None

### Expected behavior

_No response_

### Open3D, Python and System information

```markdown
- Operating system: Ubuntu 22.04
- Python version: Python 3.9
- Open3D version: output from python: 0.17.0
- System architecture: arm64
- Is this a remote workstation?:no
- How did you install Open3D?: pip
```

### Additional information

_No response_

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.