Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Crash on context lost when in immersive-vr session #277

Closed
hansagames opened this issue Sep 24, 2021 · 0 comments
Closed

Crash on context lost when in immersive-vr session #277

hansagames opened this issue Sep 24, 2021 · 0 comments
Labels
ARCHIVED CLOSED at time of archiving

Comments

@hansagames
Copy link

Hi,

was trying to simulate context lost scenario during immersive-vr mode and got crash in extension code.

VM14:36592 Uncaught TypeError: Cannot read properties of null (reading '0')
    at EmulatedXRDevice.onFrameStart (<anonymous>:36592:59)
    at XRSession$1.<computed>.onDeviceFrame (<anonymous>:1275:46)
    at wrapper ((index):8876)

code to simulate context lost scenario

gl.getExtension("WEBGL_lose_context").loseContext();

// I add 1 sec between these calls to simulate real context switch
gl.getExtension("WEBGL_lose_context").restoreContext();

I dont have real device at the moment so can not say what will happen there, will try to check next week.
But as I know its possible to lose webgl context during vr so should be handled on app side and restore game / end session when that happens.

there is check

Anyone have experience with this ?

thank you

@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving
Projects
None yet
Development

No branches or pull requests

2 participants