The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla14

Status

()

Core
MathML
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Jesse Ruderman, Assigned: jfkthame)

Tracking

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

Trunk
mozilla14
x86_64
All
assertion, regression, testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox14-)

Details

Attachments

(4 attachments)

(Reporter)

Description

5 years ago
Created attachment 606329 [details]
testcase

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

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:
http://hg.mozilla.org/mozilla-central/annotate/f6d38b80417c/layout/mathml/nsMathMLmfencedFrame.cpp#l255

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.
(Reporter)

Comment 3

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

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 http://hg.mozilla.org/mozilla-central/rev/edc0871b4e5b
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.
(Assignee)

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+
(Assignee)

Comment 10

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/d19b20df7e70
Target Milestone: --- → mozilla14
(Reporter)

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?
http://hg.mozilla.org/mozilla-central/rev/d19b20df7e70
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

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