Uploadify and Google Chrome “Aw, Snap” crash page

I was having this issues the other day when i would open up a Fancybox popup and a Chrome crash page (Aw, Snap) like the one below would open up. The behavior was pretty random but it happened pretty often.

google-chrome-aw-snap

Upon further digging i found out that the crash page only shows up for popups using jQuery Uploadify plugin. Next thing i did was to see if Uploadify was being initialized correctly. Everything seemed fine there which left me only one choice. And that was Google 🙂

So upon some research i found out that it was a Chrome memory leak issue and usually happened when a script would cross a certain memory usage limit. One of the Stackoverflow questions mentioned uploadify in relation to this issue and i found my answer there.

All i had to do was to enclose the uploadify init method within setTimeout() function like so:

And the crash page never appeared again. It’s probably because of certain Google Chrome race conditions as mentioned in this SO post :http://stackoverflow.com/a/25135325/833811

alexey

alexey

Application developer, movie buff, occasional reader and a huge Manchester United fan.
alexey
  • Salah Ud Din

    Thank you bro. It works

  • Diogo Barreiros

    Works like a charm. Thanks!