James Tauber

journeyman of some

blog > 2006 > 03 > 09 >

Crashing Safari

If you download this:

http://jtauber.com/2006/03/crash-safari.html.txt

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?

Categories:
prev « ajax » next
safari » next

Comments (6)

Kæstel on March 27, 2006:

I have the exact same problem. Have you come any closer to finding a solution?

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?

Add a Comment

Created: March 9, 2006
Last Modified: March 9, 2006
Author: James Tauber