Closed Bug 1505966 Opened 3 years ago Closed 3 years ago

Crash in gfxDWriteFontList::GetFontsFromCollection

Categories

(Core :: Graphics: Text, defect)

x86
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox-esr60 --- unaffected
firefox63 --- unaffected
firefox64 --- unaffected
firefox65 --- fixed

People

(Reporter: mccr8, Assigned: jfkthame)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is
report bp-ca987d44-51ed-4fac-a33b-49ab10181107.
=============================================================

Top 10 frames of crashing thread:

0 xul.dll void gfxDWriteFontList::GetFontsFromCollection gfx/thebes/gfxDWriteFontList.cpp:1231
1 xul.dll gfxDWriteFontList::InitFontListForPlatform gfx/thebes/gfxDWriteFontList.cpp:1083
2 xul.dll gfxPlatformFontList::InitFontList gfx/thebes/gfxPlatformFontList.cpp:363
3 xul.dll gfxWindowsPlatform::CreatePlatformFontList gfx/thebes/gfxWindowsPlatform.cpp:685
4 xul.dll gfxPlatform::Init gfx/thebes/gfxPlatform.cpp:913
5 xul.dll static void CreateVsyncRefreshTimer layout/base/nsRefreshDriver.cpp:1016
6 xul.dll nsRefreshDriver::ChooseTimer layout/base/nsRefreshDriver.cpp:1105
7 xul.dll nsRefreshDriver::EnsureTimerStarted layout/base/nsRefreshDriver.cpp:1359
8 xul.dll nsIPresShell::DoObserveStyleFlushes layout/base/PresShell.cpp:9495
9 xul.dll nsPresContext::CompatibilityModeChanged layout/base/nsPresContext.cpp:1123

=============================================================

22 crashes on the 11-7 Nightly, from around 5 installations.

Looking at the stack, maybe mSystemFonts is null.
Ah, missed something in bug 1455848, I think: it looks like we should change the check at https://searchfox.org/mozilla-central/rev/17f55aee76b7c4610a974cffd3453454e0c8de7b/gfx/thebes/gfxDWriteFontList.cpp#1075 to do

    if (!mSystemFonts) {
        return NS_ERROR_FAILURE;
    }

in place of

    if (FAILED(hr)) ...

as we're no longer getting a fresh HRESULT here, so that check is pointless.

(If we return a failure from here, the gfxWindowsPlatform code ought to disable D2D and fall back to the GDI font code, which would be better than crashing.)
Blocks: 1455848
Attachment #9023822 - Flags: review?(lsalzman) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bc98d56f87c1
Bail out of using DWrite fonts if we failed to get the system collection. r=lsalzman
Sorry - just realized I pushed this with the wrong r=... tag on the commit message; it should've been r=jrmuizel.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/bc98d56f87c1
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.