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

Fix crash when attempting to create a spatial anchor too early #236

Conversation

dsnopek
Copy link
Collaborator

@dsnopek dsnopek commented Dec 18, 2024

This fixes a crash that happens if you attempt to create a spatial anchor too early (like before the OpenXR session has begun).

This happens because there's two different ways an anchor can fail to create:

  1. If the function call to initiate creation of the anchor (which completes asynchronously) fails immediately, or
  2. The function call to initiate create works, but we're notified asynchronously that the creation of the anchor failed

We're correctly handling case nr 2, but not case nr 1!

In case nr 1, we clean up everything earlier than expected, and get some null pointer exceptions when attempting to use the anchor object when setting up our asynchronous handling.

@dsnopek dsnopek added the bug Something isn't working label Dec 18, 2024
@dsnopek dsnopek added this to the 3.1.0 milestone Dec 18, 2024
@m4gr3d m4gr3d merged commit 6c2a288 into GodotVR:master Dec 19, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants