#7553·Open3D

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

Author: mstoelzleCreated Sep 9, 2026Updated Sep 9, 2026

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.

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:

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 <module>

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:

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.