Windows 10 crash in CheckIfRenderTargetViewNeedsRecreating(ID3D11Device*)

RESOLVED FIXED in Firefox 43

Status

()

defect
--
critical
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dmajor, Assigned: jrmuizel)

Tracking

({crash})

41 Branch
mozilla43
x86
Windows NT
Points:
---

Firefox Tracking Flags

(firefox43 fixed)

Details

(crash signature)

Attachments

(2 attachments)

Reporter

Description

4 years ago
This bug was filed from the Socorro interface and is 
report bp-4125aab0-60a6-4978-9ba2-bf5942150808.
=============================================================

0 	xul.dll 	CheckIfRenderTargetViewNeedsRecreating(ID3D11Device*) 	gfx/thebes/gfxWindowsPlatform.cpp
1 	xul.dll 	gfxWindowsPlatform::AttemptD3D11DeviceCreation() 	gfx/thebes/gfxWindowsPlatform.cpp
2 	xul.dll 	gfxWindowsPlatform::InitializeD3D11() 	gfx/thebes/gfxWindowsPlatform.cpp
3 	xul.dll 	gfxWindowsPlatform::InitializeDevices() 	gfx/thebes/gfxWindowsPlatform.cpp
4 	xul.dll 	gfxWindowsPlatform::gfxWindowsPlatform() 	gfx/thebes/gfxWindowsPlatform.cpp
5 	xul.dll 	gfxPlatform::Init() 	gfx/thebes/gfxPlatform.cpp
6 	xul.dll 	gfxPlatform::GetPlatform() 	gfx/thebes/gfxPlatform.cpp
7 	xul.dll 	mozilla::widget::GfxInfo::GetD2DEnabled(bool*) 	widget/windows/GfxInfo.cpp
8 	xul.dll 	NS_InvokeByIndex 	xpcom/reflect/xptcall/md/win32/xptcinvoke.cpp
Reporter

Comment 1

4 years ago
This has kind of risen in volume lately, but not really with a clear date. I think more likely it's related to Windows 10 adoption than a specific code change.

Rank 	Platform version 	Count 	%
1 	10.0.10240 	89 	95.70 %

Rank 	Adapter driver version 	Count 	%
1 	10.18.13.5560 	64 	68.82 %
2 	10.18.13.5354 	15 	16.13 %
3 	10.18.13.5362 	8 	8.60 %

Rank 	Adapter vendor id 	Count 	%
1 	0x10de 	90 	96.77 %

Rank 	Adapter subsys id 	Count 	%
1 	37913842 	82 	88.17 %
2 	366a1458 	7 	7.53 %

Rank 	Adapter device id 	Count 	%
1 	0x100c 	82 	88.17 %
2 	0x13c2 	7 	7.53 %
Summary: crash in CheckIfRenderTargetViewNeedsRecreating(ID3D11Device*) → Windows 10 crash in CheckIfRenderTargetViewNeedsRecreating(ID3D11Device*)
Reporter

Comment 2

4 years ago
    D3D11_MAPPED_SUBRESOURCE mapped;
    deviceContext->Map(cpuTexture, 0, D3D11_MAP_READ, 0, &mapped);
    int resultColor = *(int*)mapped.pData;

mapped.pData is null. Should there be an hr check on Map()?
Flags: needinfo?(jmuizelaar)
Assignee

Comment 3

4 years ago
Yeah, I'm planing on fixing this.
Flags: needinfo?(jmuizelaar)
Assignee

Comment 4

4 years ago
Attachment #8653769 - Flags: review?(bas)
Comment on attachment 8653769 [details] [diff] [review]
Check for errors more

Review of attachment 8653769 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/thebes/gfxWindowsPlatform.cpp
@@ +1735,2 @@
>  {
> +    bool result = false;

This variable is aliased by your HRESULT below, r+ with that fixed.
Attachment #8653769 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/14d6579a997d
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Reporter

Comment 8

4 years ago
I notice that there's still no hr check on the deviceContext->Map() call which was the point where we crashed. Is that intentional? Perhaps the previous hr checks further up will prevent the null pointer situation?

(Nit: Does...Needs)
Flags: needinfo?(jmuizelaar)
Assignee

Comment 9

4 years ago
(In reply to David Major [:dmajor] from comment #8)
> I notice that there's still no hr check on the deviceContext->Map() call
> which was the point where we crashed. Is that intentional? Perhaps the
> previous hr checks further up will prevent the null pointer situation?

Not particularly intentional. I'm sort of curious to see how the crash changes with the existing patch. I agree we should further robustify before shipping.
Status: RESOLVED → REOPENED
Flags: needinfo?(jmuizelaar)
Resolution: FIXED → ---
Assignee

Comment 10

4 years ago
Posted patch Check mapSplinter Review
Attachment #8659293 - Flags: review?(bas)
Attachment #8659293 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/b9a6ff137c7b
Status: REOPENED → RESOLVED
Last Resolved: 4 years ago4 years ago
Resolution: --- → FIXED
Assignee

Updated

4 years ago
Duplicate of this bug: 1203564
You need to log in before you can comment on or make changes to this bug.