Closed Bug 671385 Opened 13 years ago Closed 13 years ago

ASSERTION: no font metrics

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: stechz, Assigned: jfkthame)

References

Details

(Keywords: regression)

Attachments

(1 file)

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).
Component: Layout → Layout: Text
QA Contact: layout → layout.fonts-and-text
Benjamin, if this is a regression that needs to be tracked for 8, please mark it so?
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
Well, as long as you remember to add the tracking flag if this is still open when 8 merges to aurora....
I hope so, because I can't get work done until this is fixed. :)

Who could help me out with this?
I'm guessing this was fixed by bug 668758, comment 10.
OS: All → Android
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
When did it _start_ crashing? Can you identify a regression range?
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.
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?
(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...)
OK, I think I'll leave it to the experts then, and just re-enable Pango. :)
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
Attachment #546315 - Flags: review?(jdaggett) → review+
http://hg.mozilla.org/mozilla-central/rev/6f72420d9852
Status: NEW → RESOLVED
Closed: 13 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.

Attachment

General

Created:
Updated:
Size: