JQuery & IE8 crash detection
Asked Answered
R

3

11

I was recently asked to help debug an issue with a website that caused IE8 to crash under certain conditions. The company that owns the website was unable to reproduce the problem, but they were receiving many reports from affected users.

I was able to reproduce the problem, and eventually found that it was being caused by this jQuery/IE 8 issue. The problem occurs when a background image is applied to the body tag using CSS, and jQuery is loaded. A post on the jQuery bug ticket comments provided this jsFiddle example, which, for me at least, reproduces the problem consistently.

The problem I have is reproducing this reliably in a test environment. Can anyone suggest methods to test for this sort of thing? Despite copying the exact code used by the jsFiddle example, I am unable to consistently reproduce the problem locally - it may rely on particular timing, but I'm not sure. I would like to add something to the automated test suite that checks for this problem (the jQuery fix had been applied previously, and accidentally removed in a later version).

How can I test for browser crashes? The site is written in Perl, and some automated tests are carried out using Selenium and WWW::Mechanize.

Note: I considered posting this on Pro Webmasters, but having read the FAQ, I think it is more suited to SO.

Rentier answered 24/8, 2011 at 7:21 Comment(1)
I think it's directly halfway between webmasters and SO. The line between SE sites is incredibly vague sometimes.Warp
W
7

I don't think you can do anything other than run both unit tests and stress tests with as wide a variety of combinations of factors as possible.

This is the nature of so-called "Mandelbugs".

Warp answered 5/9, 2011 at 17:12 Comment(0)
F
1

Given that the only consistent thing appears to be that there's not a problem if you load JQ before the style declaration, I would try setting the JQ to load at different intervals after the CSS declaration/linked CSS file loads.

From immediately after the style is established to well after DOM ready. My guess would be that JQ references something IE8 has made accessible that it wasn't ready to share just yet as a result of something really silly going on in its DOM-loading process.

I've seen multiple incidents of developer tools crashing permanently in IE8 even after you re-open the app. If not for that I'd consider such bugs unlikely.

Edit: To be fair, JQ is probably doing something odd in 1.62 or this bug would be more well-known in general. IE8 has been out a few years now.

Fellmonger answered 13/9, 2011 at 0:27 Comment(0)
E
0

You can try testing with some of SauceLabs offerings which provide cross-platform, cross-browser testing capabilities.

Eductive answered 9/9, 2011 at 18:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.