Closed Bug 27616 Opened 25 years ago Closed 24 years ago

Bad mathml causes crash

Categories

(Core :: MathML, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: gartside, Assigned: rbs)

References

()

Details

(Keywords: crash)

This page http://www.maths.ox.ac.uk/~gartside/mozBugs/genfn.xml loads ok.

This page http://www.maths.ox.ac.uk/~gartside/mozBugs/badgenfn.xml causes a

crash on my linux mathml M13 build (due to Dawn Endico).



The problem seems to be line 429 and following.

I have snipped out this section and put in

http://www.maths.ox/~gartside/mozBugs/mathmlBug.xml



Strangely, this does not cause a crash. -But gives a blank screen. (My apologies

fr not pinning this down more\carefully.)

The mathml in badgenfn (produced by tex4ht) is clearly bad, but a full scale

crash is disappointing!
Minor error (cough!)

The third url is http://www.maths.ox.ac.uk/~gartside/mozBugs/mathmlBug.xml

The problem is that <msup> expects the 'base' and the 'superscript'.

But only the base is provided in the second erroneous <msup>, and the

code encounters a null pointer:



<p>

<math

class="inline"><msub><mi>&lambda;</mi><mrow><mi>&Upsilon;</mi></mrow></msub>



<msup><mrow><mi>&Omega;</mi></mrow></msup>



</math>

</p>



The markup is bad and we don't do validation. But in general, the code

must be updated to check for such null pointers.




Status: NEW → ASSIGNED
Severity: normal → critical
Keywords: crash
Fixed in my tree. I will land the fix in my next check-in.
Rather than crashing, a feedback is now provided to the user.
By default the user will see the Unicode REPLACEMENT CHAR U+FFFD
at the spot where a bad markup was encountered. (If there is no font 
with U+FFFD, the user will see the question mark '?' --outcome of 
the work done for 6585).
I guess you havent put your fix in, as I still get a crash (Friday 17th build).

But I look forward to testing your fix soon!

No I haven't yet landed the fix(es). I am currently re-working the architecture
of stretchy chars to support arbitrary fonts (TeX, MT Extra, Mathematica, etc). 
The initial code was just a prototype. I am also bringing remaining Shyjan's TeX
rendering rules in line with the overall MathML architecture and the bounding 
metrics APIs. My tree is in a major state of flux as a result of all these
changes. So you might have to wait a little while to see the fix(es). Hopefully, 
M16 will feature a much improved MathML renderer, with the remaining TeX
alignment rules and in which the font problems that we having now will be 
considerably reduced.
Fixed now. Should this not have its status changed to `resolved'.
Rendering of bad mathml is mis-aligned. The formatting is interrupted abruptly
when bad markup is detected, and the placements are left incomplete. But I am
changing the status to resolved since it doesn't crash anymore.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
VERIFIED using Windows 2000 Mozilla bits 2000090706-MathML-SVG.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.