Closed Bug 1296446 Opened 4 years ago Closed 3 years ago

Crash in mozilla::ipc::FatalError | mozilla::gfx::PVRLayerParent::OnMessageReceived

Categories

(Core :: Graphics, defect, critical)

Unspecified
Windows 10
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: mccr8, Assigned: kip)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is 
report bp-7cf74ab4-6451-4fb0-818b-6e03b2160818.
=============================================================

I see 13 of these crashes on Nightly, which isn't a ton, but given that I don't imagine there are so many people using VR, I figured Kip might be interested.

The "graphics critical error" field for almost all of these is "Attempt to remove a texture from a CompositableForwarder." which was added in bug 1276811. The IPC fatal error message for all of them is "Error deserializing 'PTextureParent'".
Flags: needinfo?(kgilbert)
Thanks, I will take this bug and investigate.  I have managed to reproduce this after hearing reports from WebVR developers in our WebVR Slack channel.

Bug 1295951 has landed in inbound, which should help with some crashes, but is not confirmed to be the cause of all of these.
Assignee: nobody → kgilbert
Flags: needinfo?(kgilbert)
See Also: → 1295951
Entering VR mode on the "monoscopic rendering" WebVR demo consistently crashes:

https://toji.github.io/webvr-samples/XX-monoscopic-rendering.html

This may be the same issue or have the same root.

This is now my front-burner task.  I'll investigate further.
The attached patch may also fix Bug 1300972.
See Also: → 1300972
Attachment #8789110 - Flags: review?(jgilbert)
Comment on attachment 8789110 [details]
Bug 1296446 - Do not render VR frames until a WebGLContext has returned a mirroring layer

https://reviewboard.mozilla.org/r/77346/#review76014

::: dom/canvas/WebGLContext.cpp:134
(Diff revision 2)
>      mGeneration = 0;
>      mInvalidated = false;
>      mCapturedFrameInvalidated = false;
>      mShouldPresent = true;
>      mResetLayer = true;
> +    mLayerIsMirror = false;

Prefer setting in the initializer list.

::: dom/canvas/WebGLContext.cpp:1341
(Diff revision 2)
>      if (IsContextLost())
>          return nullptr;
>  
>      if (!mResetLayer && oldLayer &&
>          oldLayer->HasUserData(aMirror ? &gWebGLMirrorLayerUserData : &gWebGLLayerUserData)) {
>          RefPtr<layers::Layer> ret = oldLayer;

[1]

::: dom/canvas/WebGLContext.cpp:1387
(Diff revision 2)
>      uint32_t flags = gl->Caps().alpha ? 0 : Layer::CONTENT_OPAQUE;
>      canvasLayer->SetContentFlags(flags);
>      canvasLayer->Updated();
>  
>      mResetLayer = false;
> +    mLayerIsMirror = aMirror;

This doesn't seem to handle the layer caching mechanism above.[1] If intentional, leave a comment there.

::: dom/canvas/WebGLContext.cpp:2360
(Diff revision 2)
> +      /**
> +       * Do not allow VR frame submission until a mirroring canvas layer has
> +       * been returned by GetCanvasLayer
> +       */
> +      return nullptr;

4-space please.
(In reply to Jeff Gilbert [:jgilbert] from comment #6)
> Comment on attachment 8789110 [details]
> Bug 1296446 - Do not render VR frames until a WebGLContext has returned a
> mirroring layer
> 
> https://reviewboard.mozilla.org/r/77346/#review76014
> 
> ::: dom/canvas/WebGLContext.cpp:134
> (Diff revision 2)
> >      mGeneration = 0;
> >      mInvalidated = false;
> >      mCapturedFrameInvalidated = false;
> >      mShouldPresent = true;
> >      mResetLayer = true;
> > +    mLayerIsMirror = false;
> 
> Prefer setting in the initializer list.
> 
> ::: dom/canvas/WebGLContext.cpp:1341
> (Diff revision 2)
> >      if (IsContextLost())
> >          return nullptr;
> >  
> >      if (!mResetLayer && oldLayer &&
> >          oldLayer->HasUserData(aMirror ? &gWebGLMirrorLayerUserData : &gWebGLLayerUserData)) {
> >          RefPtr<layers::Layer> ret = oldLayer;
> 
> [1]
> 
> ::: dom/canvas/WebGLContext.cpp:1387
> (Diff revision 2)
> >      uint32_t flags = gl->Caps().alpha ? 0 : Layer::CONTENT_OPAQUE;
> >      canvasLayer->SetContentFlags(flags);
> >      canvasLayer->Updated();
> >  
> >      mResetLayer = false;
> > +    mLayerIsMirror = aMirror;
> 
> This doesn't seem to handle the layer caching mechanism above.[1] If
> intentional, leave a comment there.
> 
> ::: dom/canvas/WebGLContext.cpp:2360
> (Diff revision 2)
> > +      /**
> > +       * Do not allow VR frame submission until a mirroring canvas layer has
> > +       * been returned by GetCanvasLayer
> > +       */
> > +      return nullptr;
> 
> 4-space please.

Thanks for the review!

I have updated the patch with your feedback.
Comment on attachment 8789110 [details]
Bug 1296446 - Do not render VR frames until a WebGLContext has returned a mirroring layer

https://reviewboard.mozilla.org/r/77346/#review76036
Attachment #8789110 - Flags: review?(jgilbert) → review+
I'm doing a sanity check try build, then will commit this change.
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1abd03e07bf5
Do not render VR frames until a WebGLContext has returned a mirroring layer r=jgilbert
https://hg.mozilla.org/mozilla-central/rev/1abd03e07bf5
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.