-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Crash when exiting VR on Master Branch #0fe1f286 #5137
Comments
Chrome WebXR support on desktop has had a lot quirks since transition to OpenXR. It would be worth trying on Quest / Oculus browser and see it the issue reproduces consistently. |
I was able to exit VR on the Quest 2 without any fatal crash on both the standalone Quest browser and via a desktop link. I also reconfirmed the issue still persists for the Vive in Chrome version 107.0.5304.88 |
Chrome WebXR on desktop has a lot of quirks. Might want to read #4709 and add your experience if not covered. Not sure if there's anything to be done on A-Frame side. Don't have a Windows machine to test out. If you can reproduce consistently a little debugging will be appreciated. It looks like the error happens at the THREE level. Can set a breakpoint before the error occurs and inspect the variables. |
I have narrowed down the introduction of the bug to between c937479 and d8de409. The only code changes between these two builds appear to be: I am also confirming that the error still persists in version 1.4.0 running Chrome 108.0.5359.125 (Official Build) (64-bit)/Steam VR beta 1.25.2 I did notice that even in older versions, the relaunched game is a little twitchy, but I suspect it's unrelated to the bug at hand. |
I remember I saw this error on Quest 1 Meta browser sometimes while I was developing. I didn't really care at that time because I just refreshed the page between each VR test. So I don't know if the page was also unresponsive or not in my case. |
My guess is there may be a race condition between the threejs cleanup and aframe cleanup. That's why I don't always see this error. |
aframe/src/core/scene/a-scene.js Lines 405 to 407 in fbfb4de
session is set to null after the
It seems the issue will trigger if But if |
…g session to null in its onSessionEnd listener (fix aframevr#5137)
…ting VR, threejs is already setting session to null in its onSessionEnd listener (fix aframevr#5137)
I found it, in three r132 aframe 1.3.0 was using r137 so the issue is not new. |
Thanks @wyzwon for the extra info. it was really helpful |
Odd, I consistently only get the error report and complete freeze post 1.3.0, though I guess if the THREE update weighted the race condition enough that could work out. I will certainly test it post fix though. Thanks for all your work! |
The error is not showing up in 1.4.1 👍 I am still getting a warning (twice each time the XR session ends), but it's clearly a different issue, so I will try to get a new issue report up for it. Successive relaunches are also still more and more jittery until the scene stops redrawing entirely, but this appears to be true for ImmersiveWeb demos as well so I suspect it's at least outside the scope of AFrame. |
Description:
Upon exiting VR, I get the following error in the browser console:
Uncaught TypeError: Cannot read properties of null (reading 'removeEventListener') at XRSession.onSessionEnd (three.js:18792:1)
This error leaves the page entirely unresponsive and does not show up in release 1.3.0
Enter VR mode then hit Esc to exit VR. The scene should then become un-responsive.
Any A-frame scene using build #0fe1f286. Such as from:
The text was updated successfully, but these errors were encountered: