Closed Bug 667659 Opened 13 years ago Closed 13 years ago

FF 4.01 and 5.0.0 fail to render large (800k) basic HTML

Categories

(Core :: DOM: HTML Parser, defect)

All
Other
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 354161

People

(Reporter: manfred.bartz, Unassigned)

References

Details

(Whiteboard: [dupme])

Attachments

(1 file)

Attached file ErrDoc.autogen.html
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
Build ID: 20110413222027

Steps to reproduce:

Load a web page.


Actual results:

I have a large but fairly basic HTML file which stops being rendered about half way through.  The file renders fine in Chrome and IE.


Expected results:

Complete rendering of file.
Attachment #542314 - Attachment mime type: text/plain → text/html
# 163917 is the last element of the page.
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → parser
Version: 4.0 Branch → Trunk
Yes, 163917 is the last element of the page.
FF 4.0.1 starts to fail at element 9007 and stops rendering completely on element 9014.
this is a duplicate, searching..
Whiteboard: [dupme]
There are hundreds of nested (unclosed) <font>s, similar to bug 660776.
I think it is related to bug 354161
Depends on: 354161
Ok, I am guilty - I wrote the code generator which produced the faulty html and I have fixed it now.
However, there ought to be a way of preventing the FF html parser from running out of resources in the presence of this kind of malformed html.  Forcing a close of the oldest tag once the limit is reached might be a possible solution.  At worst, this could lead to rendering something with the wrong font, but it would still be rendered and give a better clue to the html author.
> Forcing a close of the oldest tag once the limit is reached might be a possible
> solution. 

That doesn't necessarily work if other tags are open under it, because you can't close it without closing those too....
(In reply to comment #5)
> However, there ought to be a way of preventing the FF html parser from
> running out of resources in the presence of this kind of malformed html. 

The parser is protecting layout from running out of stack space. The limit will stay in the parser until layout changes not to have algorithms that recurse along the depth of the DOM.
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: