isl-org / isl-org/Open3D

Modern GUI followed by legacy Visualizer segfaults on macOS (main 1a9eb99)

Open
#7,553 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

## Describe the issue

Closing a modern GUI window and then creating a legacy Visualizer in the same Python process segfaults on macOS. The legacy-only control succeeds.

## Reproduction

Official, unmodified development wheel: `open3d-0.19.0+1a9eb99-cp312-cp312-macosx_11_0_arm64.whl`, downloaded from the [main-devel release](https://github.com/isl-org/Open3D/releases/tag/main-devel).

Save as `open3d-mixed-viewer-repro.py` and run each command in a fresh desktop process:

```bash
python -u -X faulthandler open3d-mixed-viewer-repro.py
python -u -X faulthandler open3d-mixed-viewer-repro.py --legacy-only
```

```python
import sys
import threading
import time
import open3d as o3d
from open3d.visualization import gui, rendering
print(o3d.__version__, flush=True)
if '--legacy-only' not in sys.argv:
app = gui.Application.instance
app.initialize()
window = app.create_window('Modern viewer', 320, 240)
widget = gui.SceneWidget()
widget.scene = rendering.Open3DScene(window.renderer)
window.add_child(widget)
def close_modern():
time.sleep(0.6)
app.post_to_main_thread(window, window.close)
threading.Thread(target=close_modern, daemon=True).start()
app.run()
print('modern closed', flush=True)
vis = o3d.visualization.Visualizer()
created = vis.create_window('Legacy viewer', width=320, height=240)
print('legacy created:', created, flush=True)
if created:
for _ in range(10):
vis.poll_events()
vis.update_renderer()
vis.destroy_window()
print('finished', flush=True)
```

## Actual output

Both commands were executed with the official wheel on 2026-09-08.

Mixed modern-to-legacy run:

```text
0.19.0+1a9eb99
FEngine (64 bits) created at 0x8e7c58000 (threading is enabled)
FEngine resolved backend: Metal
Selected physical device 'Apple M4 Max'
Backend feature level: 3
FEngine feature level: 1
Selected physical device 'Apple M4 Max'
modern closed
[Open3D WARNING] GLFW Error: Cannot make current with a window that has no OpenGL or OpenGL ES context
[Open3D WARNING] GLFW Error: Cannot set swap interval without a current OpenGL or OpenGL ES context
Fatal Python error: Segmentation fault

Current thread 0x00000001f6596180 (most recent call first):
File "/tmp/open3d-mixed-viewer-repro.py", line 21 in

Extension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, markupsafe._speedups, simplejson._speedups, charset_normalizer.md, charset_normalizer.cd (total: 6)
Exit status: 139
```

Legacy-only control:

```text
0.19.0+1a9eb99
legacy created: True
finished
Exit status: 0
```

## Expected behavior

The viewers can be opened sequentially, or an unsupported transition raises a Python exception instead of terminating the interpreter.

## Environment

- macOS26.6.2, Apple M4 Max, arm64, local desktop
- Python3.12.11
- Official Open3D `0.19.0+1a9eb99` development wheel; upstream commit `1a9eb990f9a20936c30c428568c602bdef760744`
- Modern renderer: Metal; legacy renderer: OpenGL

The GLFW messages identify a window without an OpenGL/OpenGL ES context immediately before the segmentation fault. Retained GLFW window hints are a candidate explanation.

Contributor guide

No contributing guide indexed for this repository

Research direction

Run open3d-mixed-viewer-repro.py in both mixed and --legacy-only modes, then start at gui.Application, SceneWidget, rendering.Open3DScene, and Visualizer.create_window. Check the GLFW warnings and the modern-to-legacy transition; done means sequential viewers no longer segfault, or the unsupported transition raises a Python exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, macos, python
Domain
computer-graphics, desktop-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.