WR on Android crashes at fivethirtyeight.com (GetScaledFont)
Categories
(Core :: Graphics: WebRender, defect, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox68 | --- | fixed |
People
(Reporter: bholley, Assigned: jnicol)
References
(Blocks 1 open bug)
Details
(Whiteboard: [wr-amvp][wr-q2][wr-april])
Crash Data
Attachments
(1 file)
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 4•6 years ago
|
||
Here is my understanding of the lead up to the crash:
When we are preparing a blob image we call process_fonts(), and process a FontTemplate::Native. So we call AddNativeFontHandle() which constructs an UnscaledFontFreeType using the (const char* aHandle, uint32_t aIndex) constructor, which means mFace is nullptr. And it adds an item to sFontDataTable with mUnscaledFont set rather than mData etc.
Then when rasterizing the blob we call GetScaledFont(). This calls GetUnscaledFont(), which finds the matching item in sFontDataTable. Because mUnscaledFont has been set it simpply returns that (rather than creating a font resource from the data). Then it calls unscaled->CreateScaledFontFromWRFont, which leads to UnscaledFontFreeType::CreateScaledFont(). This returns nullptr because mFace is nullptr.
Lee, where are we going wrong here? I can see that in UnscaledFontFontconfig::CreateScaledFont() we have code that creates the scaled font even if mFace == nullptr. Are we missing an implementation of that for android? Or should we not be getting that far in the first place?
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Theoretically this patch should fix it. Can you test it?
| Assignee | ||
Comment 7•6 years ago
|
||
This fixes it, thanks Lee
Updated•6 years ago
|
Updated•6 years ago
|
Comment 9•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•