Closed Bug 1305378 Opened 7 years ago Closed 7 years ago

Crash in mozilla::layers::CompositingRenderTargetD3D9::CompositingRenderTargetD3D9

Categories

(Core :: Graphics: Layers, defect, P1)

46 Branch
x86
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox49 --- wontfix
firefox50 --- fixed
firefox51 --- fixed
firefox52 --- fixed

People

(Reporter: philipp, Assigned: pchang)

Details

(Keywords: crash, regression, Whiteboard: [gfx-noted])

Crash Data

Attachments

(1 file, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-95f33fc4-9254-4083-a8dc-194372160926.
=============================================================
Crashing Thread (22)
Frame 	Module 	Signature 	Source
0 	xul.dll 	mozilla::layers::CompositingRenderTargetD3D9::CompositingRenderTargetD3D9(IDirect3DTexture9*, mozilla::layers::SurfaceInitMode, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) 	gfx/layers/d3d9/TextureD3D9.cpp:121
1 	xul.dll 	mozilla::layers::CompositorD3D9::CreateRenderTargetFromSource(mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&, mozilla::layers::CompositingRenderTarget const*, mozilla::gfx::IntPointTyped<mozilla::gfx::UnknownUnits> const&) 	gfx/layers/d3d9/CompositorD3D9.cpp:200
2 	xul.dll 	mozilla::layers::CreateTemporaryTargetAndCopyFromBackground<mozilla::layers::RefLayerComposite>(mozilla::layers::RefLayerComposite*, mozilla::layers::LayerManagerComposite*) 	gfx/layers/composite/ContainerLayerComposite.cpp:718
3 	xul.dll 	mozilla::layers::ContainerRender<mozilla::layers::ContainerLayerComposite>(mozilla::layers::ContainerLayerComposite*, mozilla::layers::LayerManagerComposite*, mozilla::gfx::IntRectTyped<mozilla::gfx::UnknownUnits> const&) 	gfx/layers/composite/ContainerLayerComposite.cpp:760

this graphics related signature is regressing in crash data since firefox 46. it's happening predominantly on windows xp (>90%) and intel graphics hardware (>95%). overall it's rather low volume though...
There was one error from the crash report.

|[0][GFX1-]: (LF) CompositorD3D9::CreateRenderTargetFromSource: Failed to create texture Error code: 2289435004 (t=984286) 

The error code "2289435004" means D3DERR_OUTOFVIDEOMEMORY when calling D3D9 createTexture.
I think we should check the return value[1] for CreateTexutre before using it.

https://dxr.mozilla.org/mozilla-central/source/gfx/layers/d3d9/CompositorD3D9.cpp#199
Assignee: nobody → howareyou322
Whiteboard: [gfx-noted]
Priority: -- → P1
This need to go all the way to beta.

Early return null if the texture is null rather than attempt to create a CompositingRenderRendertagetD3D9. Other backends already make CreateRenderTargetFromSource fallible and callers (LayerManagerComposite) handle that.
Assignee: howareyou322 → nical.bugzilla
Attachment #8796484 - Flags: review?(bas)
Comment on attachment 8796484 [details] [diff] [review]
Null-check before calling CompositingRenderTarget's constructor

Oops there was a race, I didn't notice this bug was taken since yesterday.
Attachment #8796484 - Attachment is obsolete: true
Attachment #8796484 - Flags: review?(bas)
Assignee: nical.bugzilla → howareyou322
Wontfix for 49, please request uplift once this lands and has a few days on nightly. Is this something we can verify?
Comment on attachment 8796481 [details]
Bug 1305378 - Check texture is valid before creating a render target,

https://reviewboard.mozilla.org/r/82334/#review81238
Attachment #8796481 - Flags: review?(mtseng) → review+
Attachment #8796481 - Flags: review?(jgilbert)
Comment on attachment 8796481 [details]
Bug 1305378 - Check texture is valid before creating a render target,

https://reviewboard.mozilla.org/r/82334/#review82348

This looks fine, but it's not really my code to review. Previous reviewers were jrmuizel and mattwoodrow.
Attachment #8796481 - Flags: review?(jgilbert)
Attachment #8796481 - Flags: review?(matt.woodrow)
Comment on attachment 8796481 [details]
Bug 1305378 - Check texture is valid before creating a render target,

https://reviewboard.mozilla.org/r/82334/#review82352
Attachment #8796481 - Flags: review?(matt.woodrow) → review+
Pushed by pchang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/800c4a33c285
Check texture is valid before creating a render target, r=mattwoodrow,mtseng
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #6)
> Wontfix for 49, please request uplift once this lands and has a few days on
> nightly. Is this something we can verify?

I will request uplift to aurora and beta soon when fixed is landed.
https://hg.mozilla.org/mozilla-central/rev/800c4a33c285
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment on attachment 8796481 [details]
Bug 1305378 - Check texture is valid before creating a render target,

Approval Request Comment
[Feature/regressing bug #]:none
[User impact if declined]: Hit crash during composition with D3D9 backend
[Describe test coverage new/current, TreeHerder]: pass treeherder tests
[Risks and why]: low risk because gecko do nothing when createTexture is failed. 
[String/UUID change made/needed]:none
Attachment #8796481 - Flags: approval-mozilla-beta?
Attachment #8796481 - Flags: approval-mozilla-aurora?
Comment on attachment 8796481 [details]
Bug 1305378 - Check texture is valid before creating a render target,

Since the fix landed in nightly there are no more crash reports which is a positive sign, Aurora51+, Beta50+
Attachment #8796481 - Flags: approval-mozilla-beta?
Attachment #8796481 - Flags: approval-mozilla-beta+
Attachment #8796481 - Flags: approval-mozilla-aurora?
Attachment #8796481 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.