Closed Bug 1564203 Opened 5 years ago Closed 5 years ago

No VRDisplay after re-visiting WebVR websites

Categories

(Core :: WebVR, defect, P1)

Unspecified
Windows
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox68 --- unaffected
firefox69 --- verified
firefox70 --- verified

People

(Reporter: daoshengmu, Assigned: daoshengmu)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I have used MOZ-Regression to bisect this regression is between Jun. 29th and Jun. 30th, so it will be very possible to be a regression of Bug 1466702.

STR:

  1. Go to https://webvr.info/samples/XX-vr-controllers.html and enter the immersive mode.
  2. Open an another tab, https://www.wikipedia.org/, then closing the previous WebVR tab.
  3. Wait for about 5 secs until VR process is shutdown, go to https://webvr.info/samples/XX-vr-controllers.html again, it will show WebVR supported but no VRDisplays.

Investigating now, thanks for spotting it!

Perhaps I could implement a "shutdown VR process early" Puppet VR command to enable an automated test for this...

After investigating, it looks like the mExternalShmem didn't be released when the last time VR process was doing shutdown[1]. We should call VRManager::CloseShmem when doing VR process shutdown.

[1] https://searchfox.org/mozilla-central/rev/da3f3eaaacb6fb344fd21ac29ace2da0e33f12d3/gfx/vr/VRManager.cpp#167

This patch should resolve this issue. The root cause is we still use the old mExternalShmem states of the previous VR process even though it has been shutdown. We can just clear it and don't need to create a new one. Waiting for try results and we can start to review.

Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a52b60c33890
Clear VR external shared memory when recreating a new VR process. r=kip
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Assignee: nobody → dmu

Comment on attachment 9076662 [details]
Bug 1564203 - Clear VR external shared memory when recreating a new VR process.

Beta/Release Uplift Approval Request

  • User impact if declined: WebVR will fail to detect vr displays when revisiting WebVR websites.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: I have tested it in local as the steps at Comment 0.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is for fixing a regression of Bug 1466702 that has landed to FF 69. It is minor risky because we just make the memory clean if we already own this shared memory. This regression was caused by some old memory states didn't reset after the VR process be re-created.
  • String changes made/needed:
Attachment #9076662 - Flags: approval-mozilla-beta?

Comment on attachment 9076662 [details]
Bug 1564203 - Clear VR external shared memory when recreating a new VR process.

Fixes a regression in 69 which can cause WebVR displays to not be properly detected. Approved for 69.0b4.

Attachment #9076662 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Flags: needinfo?(cristian.comorasu)
QA Contact: cristian.comorasu
QA Whiteboard: [qa-triaged]

I reproduced this issue on Fx 71.0a1(2019-09-17), using Windows 10 x64 with Oculus Rift.
I can confirm this issue is fixed, I verified on Fx 71.0a1 (2019-10-04) and Fx 70.0b12 on the same environment.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(cristian.comorasu)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: