isl-org / isl-org/Open3D

Crash on window quit

Open
#3,862 0 comments 0 reactions 0 assignees View on GitHub
legacy (Open3D 0.x API) visualization
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

**Describe the bug**
I'm trying to texture map a simple mesh using draw_geometries.
I get the right results in a window, and everything works OK, but when I press the 'x' button or 'q' (to quit) - python crashes with the following dump.

**To Reproduce**
The following code reproduces the problem:
import open3d as o3d
import numpy as np

mesh = o3d.geometry.TriangleMesh()
mesh.vertices = o3d.utility.Vector3dVector(
np.array([[0, 1, 1], [0, -1, 1], [0, -1, -1], [0, 1, -1]]))
mesh.triangles = o3d.utility.Vector3iVector(
np.array([
[0, 3, 2],
[2, 1, 0],
]))
mesh.triangle_uvs = o3d.utility.Vector2dVector(
np.array([[0.0, 0.0], [0.0, 1.0], [1.0, 1.0], [1.0, 1.0], [1.0, 0.0],
[0.0, 0.0]]))
im = np.zeros((100, 200, 3), dtype=np.float32)
mesh.textures = [o3d.geometry.Image(im)]
mesh.triangle_material_ids = o3d.utility.IntVector(
np.array([0, 0], dtype=np.int32))
o3d.visualization.draw_geometries([mesh])

[Now, quit/close the window]

Crash dump:
[crash_dump.txt](https://github.com/isl-org/Open3D/files/6943589/crash_dump.txt)

**Expected behavior**
Window should close gracefully

**Environment (please complete the following information):**

- Operating system: OSX 11.5
- Python version: Python 3.8
- Open3D version: 0.13
- Is this remote workstation?: no
- How did you install Open3D?: I tried pip, conda and also compiled from source
- Compiler version (if built from source): clang version 12.0.5

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.