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

オープン
#7,553 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp, macos, python

調査の方向性

open3d-mixed-viewer-repro.py を mixed モードと --legacy-only モードの両方で実行し、次に gui.Application、SceneWidget、rendering.Open3DScene、Visualizer.create_window から調査を始めます。GLFW の警告と modern から legacy への遷移を確認します。連続する viewer で segmentation fault が発生しなくなるか、サポートされていない遷移が Python 例外を発生させれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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:

python -u -X faulthandler open3d-mixed-viewer-repro.py
python -u -X faulthandler open3d-mixed-viewer-repro.py --legacy-only
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.

主要言語
C++
スター
14.3k
フォーク
2.7k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

isl-org/Open3D のほかの issue

isl-org/Open3D の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。