Opened 8 years ago

Closed 3 years ago

#13718 closed defect (patchwelcome)

Internet explorer 8 hangs up at page reload

Reported by: attmag Owned by: Eugene Lazutkin
Priority: blocker Milestone: 1.13
Component: HTML Version: 1.6.1
Keywords: IE hangsup Cc:
Blocked By: Blocking:

Description

Issue description

I have a main page (main.html) which has a content pane, and a iframe (iframesrc.html) inside the content pane. The iframe contains a content pane with a ValidationTextBox. When press F5 to reload the main page the IE will stop responding.

What steps will reproduce the problem?

Open the attached the main.html in internet explorer and press F5 to reload the page.

What is the expected output? What do you see instead?

The browser is expected to reload the page, but IE stops responding for a while and later offers to kill the running javascript.

What version of the product are you using? On what operating system?

Dojo 1.6.1, on Windows 7 or Windows XP

Additonal information

If you replace the ValidationTextBox to DateTextBox in the iframe the problem remains the same, but with TextBox it is working fine. If the ValidationTextBox has the focus, it will work fine as well.

Attachments (2)

main.html (585 bytes) - added by attmag 8 years ago.
iframesrc.html (755 bytes) - added by attmag 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by attmag

Attachment: main.html added

Changed 8 years ago by attmag

Attachment: iframesrc.html added

comment:1 Changed 8 years ago by attmag

The following for loop never returns in the html.js:

d.empty =

>>excludeStart("webkitMobile", kwArgs.webkitMobile); d.isIE ? function(node){

node = byId(node); for(var c; c = node.lastChild;){ intentional assignment

console.log( "NODE: " + c ); d.destroy(c);

}

} : >>excludeEnd("webkitMobile"); function(node){

byId(node).innerHTML = "";

};

comment:2 Changed 8 years ago by bill

Component: GeneralDijit - Form
Owner: set to Douglas Hays

comment:3 in reply to:  1 Changed 8 years ago by Eugene Lazutkin

Replying to attmag:

The following for loop never returns in the html.js:

I don't see how it never returns. Do you have a repro case, or was it purely theoretical observation?

comment:4 Changed 8 years ago by Douglas Hays

Component: Dijit - FormHTML
Owner: changed from Douglas Hays to Eugene Lazutkin
Priority: normalhigh

This fails in 1.7 trunk as well. Dojo is loaded in both the main page AND the iframe and both have widgets that are correctly cleaning up but the main page has no mechanism to wait for the iframe to finish being destroyed first. I think this is causing a race condition. The empty method is checking node.lastChild (a text node) and then calling destroy that throws an exception on removeChild (which is squelched) and then returns to empty who again checks that the same text node is still the lastChild and forever loops and calls destroy again, and so forth.

comment:5 Changed 7 years ago by Colin Snover

Priority: highblocker

Bulk update of open ticket priorities.

comment:6 Changed 7 years ago by Eugene Lazutkin

I cannot reproduce the problem using the trunk on WinXP/IE8. Please recheck.

comment:7 in reply to:  4 Changed 7 years ago by Eugene Lazutkin

Replying to doughays:

This fails in 1.7 trunk as well. Dojo is loaded in both the main page AND the iframe and both have widgets that are correctly cleaning up but the main page has no mechanism to wait for the iframe to finish being destroyed first.

Shouldn't dijit take care of cleanup supplanting whatever we have now when dijits (and associated iframes) are present? In any case we should have a good story on what to do when somebody decided to use iframes extensively with and without dijits.

In any case it appears that managing iframes is a high-level functionality, which should not be done silently and implicitly, and probably should be a part of Dojo Base.

What is your opinion?

I think this is causing a race condition. The empty method is checking node.lastChild (a text node) and then calling destroy that throws an exception on removeChild (which is squelched) and then returns to empty who again checks that the same text node is still the lastChild and forever loops and calls destroy again, and so forth.

This is really really strange. A text node has parentNode defined and can be removed using removeChild(). It works on IE8 too (I just double-checked). No exceptions are thrown. And calling dojo.empty() on a node chock-full of text nodes works fine.

Or did you mean node in node.lastChild is a text node => it cannot have children => that expression throws an exception. In this case we should investigate who calls dojo.empty() on a text node.

comment:8 Changed 3 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 4+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.