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

Can't re-enter immersive mode from home screen after using palm gesture #26179

Closed
jdm opened this issue Apr 13, 2020 · 7 comments
Closed

Can't re-enter immersive mode from home screen after using palm gesture #26179

jdm opened this issue Apr 13, 2020 · 7 comments
Labels
Projects

Comments

@jdm
Copy link
Member

@jdm jdm commented Apr 13, 2020

STR:

Expected:

  • immersive mode is automatically entered

Actual:

  • often, immersive mode is not entered and the page shows "Exit VR", so there's no way to re-enter immersive mode
  • reloading the page via the Reload button works, but still can't enter immersive mode
@jdm jdm added the A-xr-zomg label Apr 13, 2020
@jdm
Copy link
Member Author

@jdm jdm commented Apr 13, 2020

When I use the palm gesture and exit immersive mode in a debug build, I see this output:

RUST: WARN - webxr_api::session - Device stopped providing frames, exiting
The thread 0xaa0 has exited with code 0 (0x0).
ERROR (OpenXR) : Invalid XrSpace handle with value '24'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDF58.
ERROR (OpenXR) : Invalid XrSpace handle with value '28'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDF38.
ERROR (OpenXR) : Invalid XrAction handle with value '27'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE18.
ERROR (OpenXR) : Invalid XrSpace handle with value '30'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDF38.
ERROR (OpenXR) : Invalid XrAction handle with value '29'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE18.
ERROR (OpenXR) : Invalid XrAction handle with value '31'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE58.
ERROR (OpenXR) : Invalid XrAction handle with value '32'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE58.
ERROR (OpenXR) : Invalid XrSpace handle with value '34'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDF38.
ERROR (OpenXR) : Invalid XrAction handle with value '33'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE18.
ERROR (OpenXR) : Invalid XrSpace handle with value '36'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDF38.
ERROR (OpenXR) : Invalid XrAction handle with value '35'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE18.
ERROR (OpenXR) : Invalid XrAction handle with value '37'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE58.
ERROR (OpenXR) : Invalid XrAction handle with value '38'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDE58.
ERROR (OpenXR) : Invalid XrActionSet handle with value '26'. Handle has already been destroyed.
Exception thrown at 0x00007FF98F139B4C in ServoApp.exe: Microsoft C++ exception: wxr::XrResultException at memory location 0x000000BDB1DFDD58.

This makes me wonder if we're brekaing something internally.

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Apr 13, 2020

Yeah I saw those as well, it's probably because we're manually destroying the session and instance. I was told that it is okay to destroy them manually.

Might be worth trying to:

  • comment out the session destroy code in the impl of Drop for OpenXRDevice
  • comment out the entire Drop impl (last i checked this breaks session exiting)
@jdm
Copy link
Member Author

@jdm jdm commented Apr 13, 2020

Commenting out https://github.com/servo/webxr/blob/0d9c83f333920b98d95adf9666b0a365258990a3/webxr/openxr/mod.rs#L98 did not change either the error output, or the weird state.

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Apr 13, 2020

What about both? if exiting works with both removed we should get rid of the Drop impl anyway

@jdm
Copy link
Member Author

@jdm jdm commented Apr 13, 2020

Actually it looks like commenting it out (or both) puts us in a weird exiting state when the content disappears, then I need to use the home button to actually get back to the home screen.

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Apr 13, 2020

@jdm yeah that's what i expected. are the console errors still appearing?

Basically, you need to destroy the instance/session to exit. However, the instance doesn't seem to get destroyed manually (it's reference counted in openxrs, a reference is being held somewhere) so you get the weird exiting state. We're now dropping it, but we're dropping it before any of the other subfields of OpenXRDevice get dropped, which is probably what's spawning those errors. But i was told this would be okay.

Ideally we can find out why the destructor never gets called. this might involve finding the extra references. by patching openxrs.

@atouchet atouchet added this to To do in HoloLens Apr 14, 2020
@jdm
Copy link
Member Author

@jdm jdm commented Jul 20, 2020

This was fixede.

@jdm jdm closed this Jul 20, 2020
@atouchet atouchet moved this from To do to Done in HoloLens Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
HoloLens
  
Done
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.