ASSERTION: no font metrics

RESOLVED FIXED in mozilla8

Status

()

Core
Layout
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: stechz, Assigned: jfkthame)

Tracking

({regression})

Trunk
mozilla8
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Fennec crashes on startup with these errors:

    WARNING: Subdocument container has no content: file /home/ben/projects/mc/layout/base/nsDocumentViewer.cpp, line 2418
    WARNING: Failed to find font entry for font!: file /home/ben/projects/mc/gfx/thebes/gfxFT2Fonts.cpp, line 885
    ###!!! ASSERTION: We need at least one font in a fontgroup: 'mFonts.Length() > 0', file /home/ben/projects/mc/gfx/thebes/gfxFT2Fonts.cpp, line 410
    WARNING: Failed to find font entry for font!: file /home/ben/projects/mc/gfx/thebes/gfxFT2Fonts.cpp, line 885
    ###!!! ASSERTION: We need at least one font in a fontgroup: 'mFonts.Length() > 0', file /home/ben/projects/mc/gfx/thebes/gfxFT2Fonts.cpp, line 410
    ###!!! ASSERTION: font metrics should not be null - bug 136248: 'NS_SUCCEEDED(rv)', file /home/ben/projects/mc/gfx/src/nsDeviceContext.cpp, line 229
    ###!!! ASSERTION: no font metrics: 'nsnull != aFontMetrics', file /home/ben/projects/mc/layout/generic/nsHTMLReflowState.cpp, line 2107 

Pulling right after the mozilla-inbound merge on mozilla-central (http://hg.mozilla.org/mozilla-central/rev/40a1936f6a2d).

Updated

6 years ago
Component: Layout → Layout: Text
QA Contact: layout → layout.fonts-and-text

Comment 1

6 years ago
Benjamin, if this is a regression that needs to be tracked for 8, please mark it so?
(Reporter)

Comment 2

6 years ago
I don't understand. I thought tracking flags were important only if a patch doesn't make it to Aurora or Beta. This is on trunk and doesn't affect Aurora or Beta AFAIK.
Component: Layout: Text → Layout

Comment 3

6 years ago
Well, as long as you remember to add the tracking flag if this is still open when 8 merges to aurora....
(Reporter)

Comment 4

6 years ago
I hope so, because I can't get work done until this is fixed. :)

Who could help me out with this?

Comment 5

6 years ago
I'm guessing this was fixed by bug 668758, comment 10.
OS: All → Android
(Reporter)

Comment 6

6 years ago
Unfortunately not. I pulled today and still crashing. I just noticed I am building with freetype and not pango (to closer match what Android does) so this is probably why.
OS: Android → All
(Assignee)

Comment 7

6 years ago
When did it _start_ crashing? Can you identify a regression range?
(Reporter)

Comment 8

6 years ago
I could spend time bisecting, but I think I'm getting close to the crash problem.

The /families/ parameter to the constructor for gfxFT2FontGroup has an invalid family name:
http://mxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxFT2Fonts.cpp?force=1#363

/families/ contains only "serif", which gets put in the familyArray. However, when it comes to making that font, GetOrMakeFont returns null because there is no font with that name on my system.

That's where I am now. Let me know if any of this is giving you an "aha!" moment.
(Reporter)

Comment 9

6 years ago
A follow up question: do we expect to continue supporting freetype2 on GTK Linux? Are we planning on ever deprecating it in favor of Pango?
(Assignee)

Comment 10

6 years ago
(In reply to comment #8)

> /families/ contains only "serif", which gets put in the familyArray.
> However, when it comes to making that font, GetOrMakeFont returns null
> because there is no font with that name on my system.
> 
> That's where I am now. Let me know if any of this is giving you an "aha!"
> moment.

I'd guess this is a result of bug 668758 not handling this configuration properly. I'll try to look into it tomorrow if time permits (and if you don't get there first...)
(Reporter)

Comment 11

6 years ago
OK, I think I'll leave it to the experts then, and just re-enable Pango. :)
(Assignee)

Comment 12

6 years ago
Yes, confirmed this is a regression (specific to the --disable-pango configuration, and perhaps others that rely on gfxFT2Fonts+fontconfig) from bug 668758. The patch there eliminated a recursive call of gfxFontGroup::ForEachFontInternal as it didn't seem necessary for single font names from prefs, but that was incorrect in this particular case, as we rely on that recursive call to resolve fontconfig generics that are also CSS generics.
Blocks: 668758
Keywords: regression
(Assignee)

Comment 13

6 years ago
Created attachment 546315 [details] [diff] [review]
patch, restore the recursive application of ForEachFontInternal to font names from preferences
Assignee: nobody → jfkthame
Attachment #546315 - Flags: review?(jdaggett)

Updated

6 years ago
Attachment #546315 - Flags: review?(jdaggett) → review+
(Assignee)

Comment 14

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/6f72420d9852
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/6f72420d9852
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.