Crashing Safari
If you download this:
and open it in Safari, it will cause a crash (you have been warned!). In Firefox, it works exactly as expected.
I can't work out whether I'm doing anything wrong. The problem occurs specifically doing a lot of .tagName or .nodeName accesses on an XML element (see the comment in the javascript indicating the location the crash occurs).
The report includes the following:
... Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x000001b8
Thread 0 Crashed: 0 com.apple.WebCore 0x95994984 DOM::DocumentImpl::tagName(unsigned) const + 36 ...
Any ideas?
Comments (6)
James Tauber on March 30, 2006:
I filed a bug with Apple on 2006/03/10 but it's still open and awaiting verification.
Kæstel on March 31, 2006:
I found simple way around it ... not perfect but it works.
I simply transfer the xml object to a html object. I get my original xml object from a xmlHttpRequest and in the case of Safari I just innerHTML the responseText to a div element.
if(safari()){
container = document.createElement("div");
container.innerHTML = response.responseText;
}else{
container = response.responseXML;
}
martin at think dot dk
Jonathan on July 27, 2006:
I ve got the same problem and I use the property responseText
maclikestohack on Jan. 3, 2007:
i'll crash your mom's safari any day.
maclikestohack on Jan. 3, 2007:
in other words, i guess a patch fixed it, pretty nifty tho. I like hack and slash RPG's, do you?
Last Modified: March 9, 2006
Author: James Tauber
Kæstel on March 27, 2006:
I have the exact same problem. Have you come any closer to finding a solution?