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.
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".
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With