Closed Bug 1630170 Opened 5 years ago Closed 5 years ago

XRWebGLLayer doesn't delete framebuffers when exiting the immersive mode.

Categories

(Core :: WebVR, defect)

defect

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

Details

Attachments

(2 files)

  1. I can see BufferQueue has been abandoned error log when every time exiting immersive mode, WebVR doesn’t see this error. I will cause WebXR can't enter immersive mode after a couple of times. https://immersive-web.github.io/webxr-input-profiles/packages/viewer/dist/index.html

  2. After a couple of times enter/exit the immersive mode, FxR will be have a OOM-like crash. One of the reason is like FrameBuffer doesn't be deleted after XRWebGLLayer is recycled. I noticed mFrameBuffer [1] is always null. After applying my wip patch this problem seems to be better.

  3. When running Jumpy balls in FxR, I can see WebGL context is lost, after recreating it again and again,

THREE.WebGLRenderer: Context Lost.
THREE.WebGLRenderer: Context Restored.
WebGL warning: bindFramebuffer: `fb` is from a different (or lost) WebGL context.

However, Firefox Desktop doesn’t have this error, just can’t enter to the immersive mode.

[1] https://searchfox.org/mozilla-central/rev/72e3388f74458d369af4f6cdbaeaacb719523b8c/dom/canvas/XRWebGLLayer.cpp#50

Assignee: nobody → dmu

I found that the XRWebGLLayer framebuffer is not released when exiting WebXR. I posted a patch to release it as soon as we exit immersive mode, instead of relying on garbage collector which may be delayed if the objects are kept in JS or Gecko.

Pushed by igorostizaga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7694e7a17d0a Delete XRWebGLLayer Framebuffer on XRSession presentation end r=kip,jgilbert,daoshengmu
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Summary: XRWebGLLayer OOM problem → XRWebGLLayer doesn't delete framebuffers when exiting the immersive mode.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: