Closed Bug 1677301 Opened 4 years ago Closed 3 years ago

Crash in [@ memcpy | mozilla::gfx::RecordedFontData::FontDataProc]

Categories

(Core :: Graphics: Text, defect)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox-esr78 --- wontfix
firefox83 --- wontfix
firefox84 --- wontfix
firefox85 --- fixed

People

(Reporter: aryx, Assigned: lsalzman)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

Not a new crash. Evenly split between Windows 7 & 10 and x86 & x64.

Crash report: https://crash-stats.mozilla.org/report/index/2fb4342e-c6fb-4b10-9b48-900c80201114

Reason: EXCEPTION_IN_PAGE_ERROR_READ / STATUS_DEVICE_DATA_ERROR

Top 10 frames of crashing thread:

0 vcruntime140.dll memcpy d:\agent\_work\8\s\src\vctools\crt\vcruntime\src\string\amd64\memcpy.asm:541
1 xul.dll static mozilla::gfx::RecordedFontData::FontDataProc gfx/2d/RecordedEventImpl.h:1183
2 xul.dll mozilla::gfx::UnscaledFontDWrite::GetFontFileData gfx/2d/ScaledFontDWrite.cpp:315
3 xul.dll mozilla::gfx::RecordedFontData::RecordedFontData gfx/2d/RecordedEventImpl.h:1191
4 xul.dll mozilla::gfx::DrawTargetRecording::FillGlyphs gfx/2d/DrawTargetRecording.cpp:264
5 xul.dll gfxFont::RenderColorGlyph const gfx/thebes/gfxFont.cpp:2405
6 xul.dll gfxFont::DrawOneGlyph<gfxFont::FontComplexityT::ComplexFont> gfx/thebes/gfxFont.cpp:1919
7 xul.dll gfxFont::DrawGlyphs<gfxFont::FontComplexityT::ComplexFont, gfxFont::SpacingT::NoSpacing> gfx/thebes/gfxFont.cpp:1817
8 xul.dll gfxFont::Draw gfx/thebes/gfxFont.cpp:2274
9 xul.dll gfxTextRun::DrawGlyphs const gfx/thebes/gfxTextRun.cpp:433
Severity: -- → S3
Blocks: gfx-triage

This looks like the usual IO fault when reading a font with DirectWrite. I think we might have tried to deal with this kind of thing in the past. Maybe jfkthame remembers.

Flags: needinfo?(jfkthame)

We've wrapped a bunch of calls to DirectWrite APIs that read font data with MOZ_SEH_TRY ... MOZ_SEH_EXCEPT (see a number of examples in gfxDWriteFontList.cpp) in order to catch exceptions like this and fail more gracefully. Presumably we can do the same thing in UnscaledFontDWrite::GetFontFileData here, and let it return false on failure.

Flags: needinfo?(jfkthame)
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Pushed by lsalzman@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/562e910531db
try to catch exceptions while reading font file data in ScaledFontDWrite. r=jfkthame
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
No longer blocks: gfx-triage

Looks like this fix is working well on Beta. Should we consider uplifting this to ESR also?

Flags: needinfo?(lsalzman)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #6)

Looks like this fix is working well on Beta. Should we consider uplifting this to ESR also?

I don't believe WR is widely deployed on ESR, and the crash volume there is low enough, that just waiting for 91 ESR to come around I think is okay.

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

Attachment

General

Created:
Updated:
Size: