IE9 preloader freezes (testcase+fix)

Bug #1019768 reported by Jan Niestadt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jeash
Fix Committed
Undecided
Unassigned

Bug Description

Preloading 20+ images fails in IE9. See attached FlashDevelop project to reproduce.

While debugging, I've found that for some images the "load" event isn't firing. The preloader is then stuck and the application doesn't start. The images do load if you look at the Network tab in the IE9 debugger.

I've also found two strange fixes. Both are slight changes to the method BitmapData.jeashLoadFromFile():
- If you add the line "if (image.complete) {}" (or any statement that reads the 'complete' property of the image object) at the very end of the method, that fixes the problem.
- OR, if you use "image.onload = ..." instead of "image.addEventListener('load', ...)", the problem goes away as well.

Why the problem happens, or why these changes fix it, I have no idea. Probably just IE being IE. :-)

Tags: ie9 preloader
Revision history for this message
Jan Niestadt (jan-niestadt) wrote :
Revision history for this message
Jan Niestadt (jan-niestadt) wrote :

Here's a patch for the first suggested fix.

Revision history for this message
Niel Drummond (niel-drummond) wrote :

Hey, thanks for the fix, I've applied it. I couldn't test it unfortunately, but it looks good to me. I had noticed IE9 is pretty weird with regards to img.complete

Changed in jeash:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.