Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenXR: Unable to update the swapchain [ XR_ERROR_HANDLE_INVALID ] #92024

Closed
0xtito opened this issue May 16, 2024 · 3 comments · Fixed by #92137
Closed

OpenXR: Unable to update the swapchain [ XR_ERROR_HANDLE_INVALID ] #92024

0xtito opened this issue May 16, 2024 · 3 comments · Fixed by #92137
Assignees
Milestone

Comments

@0xtito
Copy link

0xtito commented May 16, 2024

Tested versions

  • Reproducible in 4.3.dev6, 4.2.stable

System information

Tested in two environments: 1. Godot v4.3.dev6 - macOS 14.4.1 - GLES3 (Compatibility) - Apple M2 - Apple M2 (8 Threads) | 2. Godot v4.3.dev6 - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4070 (NVIDIA; 31.0.15.5176) - Intel(R) Core(TM) i7-9700k CPU @ 3.60GHz (8 Threads)

Issue description

I have been trying to spin up a simple XR application (similar to the one from Mux's videos). However, I keep encountering the following error:

OpenXR: Unable to update the swapchain [ XR_ERROR_HANDLE_INVALID ]

I expect the application to run without this swapchain error, similar to my previous experiences with other engines.

Steps Taken to Resolve

  1. Updated/reinstalled:
    • openjdk@17
    • Android Studio and all its components outlined in the docs
    • Godot v4.3dev6
  2. Tried running the application on both macOS Sonoma 14.4.1 and Windows PC, encountering the same error on both platforms.

Environment

  • Target Device: Meta Quest 3 (standalone)
  • Plugins: Godot Vendors Plugin v3.0.0 beta 1
  • Meta Quest 3:
    • Developer mode enabled
    • Previously used successfully with three.js (WebXR) and Bevy game engine without swapchain issues.

Logs

Uninstalling previous version: Oculus Quest 3
Installing to device (please wait...): Oculus Quest 3
Device API >= 21; debugging over USB
--- DEVICE API >= 21; DEBUGGING OVER USB ---
Reverse result: 0
Godot Engine v4.3.dev6.official.89850d553 - https://godotengine.org
OpenXR: Running on OpenXR runtime: Oculus
OpenGL API OpenGL ES 3.2 V@0707.0 (Git@b0ed28cdeb, 1709271149) (Date:02/29/24) - Compatibility - Using Device: Qualcomm - Adreno (TM) 740
OpenXR: Requested OpenGL version exceeds the maximum version this runtime has been tested on and is known to support.
 - desired_version 3.3.0
 - minApiVersionSupported 3.0.0
 - maxApiVersionSupported 3.2.0
OpenXR initialized successfully
OpenXR: Unable to update the swapchain [ XR_ERROR_HANDLE_INVALID ]
--- Debugging process stopped ---

Steps to reproduce

--- ZIP file was created in MacOS, can create a zip file on my Windows PC if necessary ---

  1. Download the zip below
  2. Make sure you followed the steps in Exporting for Android under v:latest
  3. Create the addons folder
  4. Add the godotopenxrvendors plugin (after extracting) to your addons folder
  5. Go to Project -> Install Android Build Template... and install it
  6. Toggle on Debug -> Deploy with Remote Debug
  7. Launch through Remote Debug -> Meta Quest 3 (Should be possible to replicate in Quest 2...?)

For more details on setting up your Godot environment for XR, follow Setting up XR.

Also here are the two Youtube videos I followed to learn how to set this up (for the purposes of creating a MRP, I did not include anything extra from the videos below - only the setup process)

Minimal reproduction project (MRP)

xr-minimal-gh.zip

Make sure to then download Godot OpenXR Vendors Plugin v3.0.0 beta 1 and then add godotopenxrvendors to addons/

@m4gr3d m4gr3d added this to the 4.3 milestone May 19, 2024
@BastiaanOlij
Copy link
Contributor

Good catch, the error is output from OpenXRFBFoveationExtension::update_profile. I think this is a result of us delaying the creation of the swapchain not on reaching our ready state, but at the start of rendering our frame seeing we allow the image size to be adjusted and as part of the logic to make XR thread safe.

We'll need to introduce a new entry point for our extensions for this.

@0xtito
Copy link
Author

0xtito commented May 20, 2024

Good catch, the error is output from OpenXRFBFoveationExtension::update_profile. I think this is a result of us delaying the creation of the swapchain not on reaching our ready state, but at the start of rendering our frame seeing we allow the image size to be adjusted and as part of the logic to make XR thread safe.

We'll need to introduce a new entry point for our extensions for this.

Great to hear! Out of curiosity, what is the reason this error seems to be inconsistent? For example, in the last video on 4.3 (thank you for that btw!) that error did not pop up for you and I haven't seen others talk about this.

@BastiaanOlij
Copy link
Contributor

Not sure, it's definitely something that was only introduced in the latest build and it will only present itself on Meta headsets as it is in a Meta extension. It may have happened when making my latest video but I didn't notice it and we switch over to the capture of what is happening on the headset before it showed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants