###!!! ASSERTION: invalid default font returned by GetDefaultFont: 'defaultFont'

RESOLVED FIXED in Firefox 14

Status

()

Core
Graphics: Text
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: blassey, Assigned: jfkthame)

Tracking

unspecified
mozilla16
ARM
Android
Points:
---

Firefox Tracking Flags

(firefox14 fixed, firefox15 fixed, blocking-fennec1.0 .N+, fennec14+)

Details

Attachments

(1 attachment)

I'm seeing this assertion very often on Android. If it really is an error condition, we should fix it. If it is not, we should remove the assertion.
Is this a bad assertion?
https://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxFont.cpp#2953
tracking-fennec: ? → 14+
blocking-fennec1.0: ? → .N+
(Assignee)

Comment 3

5 years ago
It's not a bad assertion, in that we really really expect that GetDefaultFont() will return something usable, to avoid the risk of ending up with a fontGroup that has no actual fonts at all, leading to all kinds of sadness when we ask for metrics, etc.

Hmm... on Android, gfxFT2FontList::GetDefaultFont() is hardcoded to look for Droid Sans. That's probably not a good thing on ICS, where I believe it has been replaced by Roboto. I'll post a patch...
(Assignee)

Comment 4

5 years ago
Created attachment 635027 [details] [diff] [review]
patch, try Roboto as well as Droid Sans for Android default font

I think this should help, if I'm understanding the cause correctly.
Assignee: nobody → jfkthame
Attachment #635027 - Flags: review?(blassey.bugs)
Comment on attachment 635027 [details] [diff] [review]
patch, try Roboto as well as Droid Sans for Android default font

Review of attachment 635027 [details] [diff] [review]:
-----------------------------------------------------------------

nit, reverse the order of Droid Sans and Roboto. If both happen to be on a device, I think we'd rather have Roboto
Attachment #635027 - Flags: review?(blassey.bugs) → review+
(Assignee)

Comment 6

5 years ago
Pushed to inbound, rearranged to try Roboto first, then Droid Sans.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e24a42876bc5

I'm assuming this will stop these assertions on ICS devices, but don't have one on hand for testing; please re-open if it doesn't solve the problem.
Target Milestone: --- → mozilla16

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/e24a42876bc5
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 8

5 years ago
Brad, does this fix the assertions you were seeing?
Comment on attachment 635027 [details] [diff] [review]
patch, try Roboto as well as Droid Sans for Android default font

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed (on m-c, etc.): 
Risk to taking this patch (and alternatives if risky): 
String or UUID changes made by this patch:
Attachment #635027 - Flags: approval-mozilla-beta?
Attachment #635027 - Flags: approval-mozilla-aurora?
Comment on attachment 635027 [details] [diff] [review]
patch, try Roboto as well as Droid Sans for Android default font

so tiny and low risk it's not worth an approval request form completion, eh? :)
Attachment #635027 - Flags: approval-mozilla-beta?
Attachment #635027 - Flags: approval-mozilla-beta+
Attachment #635027 - Flags: approval-mozilla-aurora?
Attachment #635027 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 11

5 years ago
Pushed to Aurora (15) and Beta (14):
https://hg.mozilla.org/releases/mozilla-aurora/rev/abb6f9e021dd
https://hg.mozilla.org/releases/mozilla-beta/rev/94b04b595448
status-firefox14: --- → fixed
status-firefox15: --- → fixed
You need to log in before you can comment on or make changes to this bug.