Open3d segfault -- with OffscreenRenderer and matplotlib together
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
Open3d segfaults if matplotlib plots something on the screen, after the OffscreenRenderer renders. If I remove the matplotlib plotting, then there is no segfault.
**To Reproduce**
Steps to reproduce the behavior:
I get the following error:
```
FEngine (64 bits) created at 0x7fda98000000 (threading is enabled)
FEngine resolved backend: OpenGL
Segmentation fault: 11
```
when I run the following lines:
```python
import numpy as np
import open3d
width = 1920
height = 1200
intrinsic_matrix = np.array([[1402.76792, 0.00000000, 981.742208],
[0.00000000, 1402.76792, 610.761766],
[0.00000000, 0.00000000, 1.00000000]])
extrinsic_matrix = np.array(
[
[-6.69250831e-01, 7.42904674e-01, -1.39989508e-02, 8.40723352e+02],
[ 1.56425704e-02, -4.74929949e-03, -9.99866368e-01, -1.95120523e+01],
[-7.42871883e-01, -6.69380378e-01, -8.44246605e-03, 2.82693528e+03],
[ 0.00000000e+00, 0.00000000e+00, 0.00000000e+00, 1.00000000e+00]
])
intrinsic_width_px, intrinsic_height_px = (1920, 1200)
renderer = open3d.visualization.rendering.OffscreenRenderer(width=width, height=height)
renderer.setup_camera(intrinsic_matrix, extrinsic_matrix, intrinsic_width_px, intrinsic_height_px)
img = renderer.render_to_image()
img = np.asarray(img)
import matplotlib.pyplot as plt
plt.imshow(img)
plt.show()
```
**Expected behavior**
Expect to see no segfault.
**Environment (please complete the following information):**
- Operating system: macOS Big Sur 11.4
- Python version: (e.g. Python 3.8)
- Open3D version: '0.13.0'
- Is this 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.