Closed Bug 1454094 Opened 6 years ago Closed 6 years ago

Nightly crashing when loading Variable Fonts

Categories

(Core :: Layout, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla61
Tracking Status
firefox-esr52 --- unaffected
firefox59 --- unaffected
firefox60 --- unaffected
firefox61 blocking verified

People

(Reporter: jensimmons, Assigned: jfkthame)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

I'm attempting to make a video about the Variable Fonts tooling, but when I load pages that use Variable Fonts in Firefox Nightly, I keep crashing the tabs. Especially these two sites:
1) https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts/
2) https://v-fonts.com/

The Microsoft site crashes after you've scrolled the page for a bit. The V-Fonts site crashes immediately on page load. Seems like perhaps it's a volume thing? Lots of fonts == crash-o-rama.

https://crash-stats.mozilla.com/report/index/5195a681-45da-4554-93de-048a30180413
https://crash-stats.mozilla.com/report/index/18901d10-d154-45c2-a7cb-ccad40180413

My copy of Nightly is up to date. I have the Variable Fonts tooling panel enabled.
This seems....worrying. It reminds me of bug 1450209, but this time the crash is happening within Core Text code called from Skia, so it's perhaps not as easy for us to work around.

Markus, could you please see if this reproduces for you on 10.13? On my machine (running 10.12.6) both the Microsoft and v-fonts.com sites load perfectly reliably, without crashes; I can scroll around, play with font settings, all that kind of thing, and they just work.
Flags: needinfo?(mstange)
I can reproduce this with 10.13 pretty reliably after certain moment...

My crash report looks like bp-0a1a3414-aabc-4a9c-9b6f-e16230180416
Crash Signature: [@ create_from_CTFontRef]
Keywords: crash, regression
Adding another signature since they are crashing with https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts/.
Crash Signature: [@ create_from_CTFontRef] → [@ create_from_CTFontRef] [@ _createFieldInfoFromChild ]
(In reply to Jonathan Kew (:jfkthame) from comment #1)
> Markus, could you please see if this reproduces for you on 10.13? On my
> machine (running 10.12.6) both the Microsoft and v-fonts.com sites load
> perfectly reliably, without crashes; I can scroll around, play with font
> settings, all that kind of thing, and they just work.

I haven't gotten a chance to try yet, but it sounds like we have enough evidence to conclude that is a real and serious problem.
Flags: needinfo?(mstange)
I cannot reproduce using 10.13.5 Beta (17F35e) on the latest nightly. Jen mentions she has the "Variable Fonts tooling panel enabled," but I am not sure where to get that.
(In reply to Marcia Knous [:marcia - needinfo? me] from comment #6)
> Jen
> mentions she has the "Variable Fonts tooling panel enabled," but I am not
> sure where to get that.

Set devtools.inspector.fonteditor.enabled to true; and then to access the panel, click the little [Aa] icon that appears at the bottom right of each rules block in the element inspector (although I believe the UI is about to change...)

(I don't think that is relevant to the crash, though; AFAICS it happens (on affected systems) simply when rendering certain variation fonts.)
FYI (for those following this bug and the feature): We're making a go/no-go decision on shipping Variable Fonts in Fx 61 at the end of this week.  This bug needs to be fixed before we ship the feature (regardless of the release version the feature ships in).
Assignee: nobody → jfkthame
Priority: -- → P1
(In reply to Marcia Knous [:marcia - needinfo? me] from comment #6)
> I cannot reproduce using 10.13.5 Beta (17F35e) on the latest nightly. Jen
> mentions she has the "Variable Fonts tooling panel enabled," but I am not
> sure where to get that.

I just updated my machine to 10.13.5 Beta (17F35e), and unfortunately the crashes here _do_ reproduce for me. :\
The problem here seems to arise with (some) CTFont instances where we explicitly copied variation settings over from the platform CGFont, which we had to do because on 10.12, CTFontCreateWithGraphicsFont fails to preserve variations. However, on 10.13 it looks like CTFontCreateWithGraphicsFont has been fixed, and will preserve the variations from the original CGFont automatically. Thus, we can skip the extra work of reading the variations from the CGFont and setting up a descriptor to apply them to the new CTFont.
Attachment #8968884 - Flags: review?(lsalzman)
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=afa7e21a0987dcd045f0caf6c8324b29931d384b

With this, I'm not seeing any crashiness on v-fonts.com or other demo sites any longer.
Oops, now without a typo in the try syntax, so it'll actually build something...

https://treeherder.mozilla.org/#/jobs?repo=try&revision=1588a7d6c42824c969fd57dc5952dae6d7e568c9
Adding another signature crashing on https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts/.
Crash Signature: [@ create_from_CTFontRef] [@ _createFieldInfoFromChild ] → [@ create_from_CTFontRef] [@ _createFieldInfoFromChild ] [@ Inspector::InjectedScript::evaluateOnCallFrame ]
Attachment #8968884 - Flags: review?(lsalzman) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f93b12264c70
Explicitly copy font variation settings from CGFont when creating a CTFont only on macOS Sierra; on HighSierra, rely on Core Text to automatically propagate the required settings. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/f93b12264c70
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Depends on: 1455569
Depends on: 1455494
No crashes on trunk since this landed.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.