Open Bug 1870545 Opened 1 year ago Updated 8 months ago

Crash in [@ mozilla::wr::RenderCompositorLayersSWGL::AttachExternalImage]

Categories

(Core :: Graphics, defect, P3)

x86
Windows
defect

Tracking

()

REOPENED
Tracking Status
firefox122 --- affected
firefox128 --- affected

People

(Reporter: release-mgmt-account-bot, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

Crash Data

Crash report: https://crash-stats.mozilla.org/report/index/922b4d8e-8bf6-4013-a81a-9b0010231213

MOZ_CRASH Reason: MOZ_RELEASE_ASSERT(image->AsRenderDXGITextureHost() || image->AsRenderDXGIYCbCrTextureHost())

Top 10 frames of crashing thread:

0  xul.dll  mozilla::wr::RenderCompositorLayersSWGL::AttachExternalImage  gfx/webrender_bindings/RenderCompositorLayersSWGL.cpp:282
1  xul.dll  webrender::compositor::sw_compositor::impl$13::attach_external_image  gfx/wr/webrender/src/compositor/sw_compositor.rs:1288
2  xul.dll  webrender::renderer::Renderer::update_native_surfaces  gfx/wr/webrender/src/renderer/mod.rs:4442
3  xul.dll  webrender::renderer::Renderer::render_impl  gfx/wr/webrender/src/renderer/mod.rs:1479
4  xul.dll  webrender::renderer::Renderer::render  gfx/wr/webrender/src/renderer/mod.rs:1235
5  xul.dll  webrender_bindings::bindings::wr_renderer_render  gfx/webrender_bindings/src/bindings.rs:619
6  xul.dll  mozilla::wr::RendererOGL::UpdateAndRender  gfx/webrender_bindings/RendererOGL.cpp:190
6  xul.dll  mozilla::wr::RenderThread::UpdateAndRender  gfx/webrender_bindings/RenderThread.cpp:781
7  xul.dll  mozilla::wr::RenderThread::HandleFrameOneDocInner  gfx/webrender_bindings/RenderThread.cpp:624
8  xul.dll  mozilla::wr::RenderThread::HandleFrameOneDoc  gfx/webrender_bindings/RenderThread.cpp:573

By querying Nightly crashes reported within the last 2 months, here are some insights about the signature:

  • First crash report: 2023-10-21
  • Process type: Multiple distinct types
  • Is startup crash: No
  • Has user comments: No
  • Is null crash: No

The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: General → Graphics

Lee, we're hitting this image host type assertion. Would you please take a look?

Severity: -- → S3
Flags: needinfo?(lsalzman)
Priority: -- → P3

Closing because no crashes reported for 12 weeks.

Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → WORKSFORME

Sotaro, ideas?

Flags: needinfo?(lsalzman) → needinfo?(sotaro.ikeda.g)

(In reply to Chris Peterson [:cpeterson] from comment #4)

I hit this MOZ_RELEASE_ASSERT (once) while watching Netflix with gfx.webrender.software = true.

In this case, WebRender (Software D3D11) seemed to be used for compositing.

On Windows with DRM content, GMP allocates SharedPlanarYCbCrImage for video by ChromiumCDMParent::CreateVideoFrame() And VideoData::CreateAndCopyData().

SharedPlanarYCbCrImage allocates YCbCr BufferTextureData. Its data is uploaded to D3D11Texture2D of TextureHostWrapperD3D11 at WebRenderImageHost::GetAsTextureHostForComposite() if compositor supports D3D11.

TextureHostWrapperD3D11 wraps DXGITextureHostD3D11. And DXGITextureHostD3D11 creates RenderDXGITextureHost. DXGITextureHostD3D11 is used for PushDisplayItems() and PushResourceUpdates(). RenderDXGITextureHost is used for WebRender rendering.

Then if the code works as expected, image->AsRenderDXGITextureHost() should be true.

The following pref change should use same gfx code path from WebRenderImageHost::GetAsTextureHostForComposite() for YouTube video playback.

  • gfx.webrender.software = true.
  • media.hardware-video-decoding.enabled = false.

I failed to reproduce the problem. Then I am not sure how assumption of Comment 6 was broken.

Flags: needinfo?(sotaro.ikeda.g)
You need to log in before you can comment on or make changes to this bug.