Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions examples/camera_streamer/teleop_camera_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"""

import argparse
import gc
import os
import sys
import time
Expand Down Expand Up @@ -175,8 +174,11 @@ def main():
raise
logger.warning(f"No XR headset connected, retrying in 2s... ({msg})")
del app
gc.collect()
time.sleep(2.0)
# Re-exec for a clean process — in-process GC cannot break the
# C++ shared_ptr cycles holding the OpenXR instance alive.
logger.info("Re-executing for clean XR state...")
os.execv(sys.executable, [sys.executable, *sys.argv])

logger.info("Shutdown complete")
# Required to avoid GIL crash.
Expand Down