Closed Bug 1617520 Opened 11 months ago Closed 2 months ago

Crash in [@ gfxWindowsPlatform::SetupClearTypeParams]

Categories

(Core :: Graphics: Text, defect, P3)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox82 --- wontfix
firefox83 --- wontfix
firefox84 --- fixed

People

(Reporter: gsvelto, Assigned: jfkthame)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug is for crash report bp-ceeaefd9-f81d-406d-9c5f-f75350200221.

Top 10 frames of crashing thread:

0 xul.dll gfxWindowsPlatform::SetupClearTypeParams gfx/thebes/gfxWindowsPlatform.cpp:1106
1 xul.dll gfxWindowsPlatform::InitDWriteSupport gfx/thebes/gfxWindowsPlatform.cpp:370
2 xul.dll gfxWindowsPlatform::InitAcceleration gfx/thebes/gfxWindowsPlatform.cpp:331
3 xul.dll static gfxPlatform::Init gfx/thebes/gfxPlatform.cpp:1009
4 xul.dll static gfxPlatform::InitChild gfx/thebes/gfxPlatform.cpp:517
5 xul.dll mozilla::dom::ContentChild::RecvSetXPCOMProcessAttributes dom/ipc/ContentChild.cpp:629
6 xul.dll mozilla::dom::PContentChild::OnMessageReceived ipc/ipdl/PContentChild.cpp:11014
7 xul.dll mozilla::ipc::MessageChannel::DispatchMessage ipc/glue/MessageChannel.cpp:2137
8 xul.dll nsThread::ProcessNextEvent xpcom/threads/nsThread.cpp:1220
9 xul.dll NS_ProcessNextEvent xpcom/threads/nsThreadUtils.cpp:481

Not a new crash since I could find crashes with the same stack going back all the way to ESR68. This is a simple NULL-pointer dereference. We're not checking the HRESULT value returned by IDWriteFactory::CreateRenderingParams() before accessing the pointer it returns so we're probably getting a NULL pointer there.

Flags: needinfo?(jmuizelaar)
Priority: -- → P3
Component: Graphics → Graphics: Text
Flags: needinfo?(jmuizelaar)

25 crashes on a single installation in the November 11 Nightlies.

bp-53125d2e-8c48-4013-b0f2-0d3530201111

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

The MSDN doc doesn't give any hint as to why IDWriteFactory::CreateRenderingParams() might fail, but given that it returns an HRESULT we really ought to check it. And then subsequent code will need to be prepared to deal with the params not being available, and gfxWindowsPlatform::GetRenderingParams potentially returning null. This will eventually lead to setting a null textRenderingParams in DrawTargetD2D1::FillGlyphs, but that should be OK according to the docs.

(I'm suspicious that if CreateRenderingParams fails, it could indicate something is pretty broken in the dwrite world, and maybe we're doomed to crash or render garbage or something anyhow. But perhaps that's overly pessimistic. In principle we should be able to proceed without having rendering-params instances, and just get default text-rendering behavior.)

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ca28b160dbfc
Check for failure when creating default dwrite rendering params. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch
You need to log in before you can comment on or make changes to this bug.