The default bug view has changed. See this FAQ.

"ASSERTION: unexpected state" with MathML, astral font name

RESOLVED FIXED in mozilla14



5 years ago
5 years ago


(Reporter: Jesse Ruderman, Assigned: jfkthame)


(Blocks: 1 bug, {assertion, regression, testcase})

assertion, regression, testcase
Dependency tree / graph

Firefox Tracking Flags




(4 attachments)



5 years ago
Created attachment 606329 [details]

###!!! ASSERTION: unexpected state: 'aRenderingContext.FontMetrics()->Font(). Equals(aFontMetrics->Font())', file layout/mathml/nsMathMLFrame.cpp, line 338

Comment 1

5 years ago
Created attachment 606330 [details]
stack trace
I haven't managed to reproduce on Linux x86_64.

The stack doesn't seem to quite line up with the assertion.  If the stack is off by one frame and one line, then that would locate the GetAxisHeight call here:

Given the rendContext->SetFont(fm) immediately prior, I would expect rendContext->FontMetrics() to return fm.

I don't see any obvious problem with nsFont::Equals.

Comment 3

5 years ago
I can reproduce on Linux x86_64, even with an empty profile.

Comment 4

5 years ago
Created attachment 611107 [details]
stack trace from linux

Is this more helpful?
That trace confirms the GetAxisHeight call in comment 2, thanks.
I can reproduce now.  Seems that this is regression since 7e158ac25de3.
Will narrow down further.
tracking-firefox14: --- → ?
Keywords: regression
OS: Mac OS X → All
Regression from
Blocks: 210501

Comment 7

5 years ago
Other than this being a regression, what's the justification for tracking this bug? Will this be a common error for MathML users? In what state is the user left when they run into this?
The bug doesn't affect this MathML testcase adversely (from a user perspective).

What the assertion is highlighting is that, for string |a|, a.Equals(a) is false (perhaps only for a certain comparator), which is likely to have wider ranging affects.  Perhaps the problem is only for non-BMP characters, but a problem with surrogates may be a problem with array index counting.

Comment 9

5 years ago
Created attachment 612457 [details] [diff] [review]
patch, fix surrogate handling during string compare

Argh - silly typo!
Assignee: nobody → jfkthame
Attachment #612457 - Flags: review?(smontagu)
Attachment #612457 - Flags: review?(smontagu) → review+

Comment 10

5 years ago
Target Milestone: --- → mozilla14

Comment 11

5 years ago
It's kinda scary that it took an obscure feature (fonts in MathML) to uncover a unicharutil bug. How can that be remedied?
Last Resolved: 5 years ago
Resolution: --- → FIXED


5 years ago
tracking-firefox14: ? → -
You need to log in before you can comment on or make changes to this bug.