14 Replies Latest reply on Dec 10, 2007 9:14 AM by slinky2000

    MovieClipLoader Crashing IE Browser

      I have an IE window that contains a Flash menu. Each link in the flash menu spawns a new IE popup window that contains a "flash course". This "flash course" uses the MovieClipLoader class to pull down external media assets as the user navigates from page to page within the course.

      If I close this popup window while the MovieClipLoader Class is attempting to request an external media file from the server, all links in the parent window ("flash menu") including html links for that domain stop working. Specifically, if the MovieClipLoader class is trying to get the file but it has not yet started to stream the file down and the browser window is closed, then the user can no longer retrieve any content from that domain. All links are dead, the only resolution is to close the browser window and open an new one.

      This issue apparently causes problems with how IE attempts to retrieve files from the same domain for a specific IE session. Opening a new IE browser instance and navigating to the same site - works, while the original IE browser instance is still dead. You can also navigate from the orginal site to a different domain without a problem. Returning to the domain within the same IE browser instance does not work however.

      I have attempted to abort the movieclip loader with unloadClip and unloadMovie.
      I have attempted to delay the browser window from closing by placing some alert boxes in the "onbeforeunload" of the frameset.
      I have attempted redirecting the popup window to a blank html page before the frameset closes.
      I have attempted to reload the Flash Object in javascript to a "blank.swf" file before the window closes.
      The volume of the media assets coming down does not seem to have a bearing on the problem as I can duplicate this with a single loadClip call for one media asset.
      This also does not seem to be an issue with 2 seperate Flash instances being open as we have replaced the "flash menu" with an "html menu" - with the same results.

      So far all of our attempts to remedy or workaround this issue have not worked. It seems to be entirely dependent on the state of the MovieClipLoader class when you close the browser window. It not only hammers IE but the "flash menu" also is unable to retrieve content from the same domain when this problem happens.

      Any help or thoughts on this problem would be appreciated.

        • 1. Re: MovieClipLoader Crashing IE Browser
          kglad Adobe Community Professional & MVP
          you're using getURL() to open the "popup" and that popup opens a html page that embeds a swf that contains a loadClip statement?
          • 2. Re: MovieClipLoader Crashing IE Browser
            Correct. In the case of the flash menu, a "getURL" is used to trigger a javascript call that performs a "window.open" on the HTML page that contains the SWF with the "loadClip" code.

            And just to give a little more info, we have been able to reproduce this problem in IE 6 and 7 with Flash players 8 and 9 (we haven't tested Flash 7 as it is below our version limit). The swfs are published in Flash 8.

            • 3. Re: MovieClipLoader Crashing IE Browser
              Greg Dove Level 4
              I believe this is at least in part related to the browser limits for the number of simultaneous connections permitted to the same domain. I think, from memory, IE limits this to 2 but other browsers may permit up to 4 for example. There optimal solution is probably to host your assets at another domain.

              I had an example recently where two flvs and a flash clip were all requested from the same domain inside the same page, which blocked the html navigation until the download queue freed up one of the two slots. It would I believe under these circumstances have the same effect on a getURL navigation request to the same domain. I found a way to cancel the MovieClipLoader download which solved the problem:

              I don't if its necessary to do this part, but I kept a reference to the original MovieClipLoader (e.g. mcl)...and called mcl.unloadClip(target_mc); (which you said you had tried)

              Then... I used it to attempt to load a non-existent movie into the same target:


              I called this functionality inside a kilDownload function from javascript via ExternalInterface whenever a nav link in the containing page was pressed (I had to implement something similar for the video players in my scenario to cancel their downloading as well).

              Your problem sounds kind of similar. It might be worth trying this approach.

              • 4. Re: MovieClipLoader Crashing IE Browser
                sdm_allen Level 1
                Thanks for the reply. However, given that we can cause this problem by simply downloading 1 graphic or SWF, I don't believe we're stressing the limits of the browser. Also, if we close the window while the download is in progress, everything shuts down properly and we can re-launch the site without problems. It's when we terminate between the initial "loadClip" request and the "onLoadStart" event that the problem seems to occur. And once it happens, we can't even use javascript in the HTML page to open other HTML documents on the same domain (the popup window opens, but no server communication occurs). We've tried loading an invalid movie into the clip as part of the unloading process, but it doesn't seem to rectify the problem. It's as if Flash can't truly close the connection until it's received it's initial communication (success or failure) from the server regarding the file request. And so if you close the popup window while the MovieClipLoader is in this state, it stay's "stuck" and we have yet to be able to find a way to prevent this or even reset IE's ability to download once the error occurs. I've also tried using our Flash menu (which stays active while the other site runs in the popup window) to attempt a new download after the problem occurs, but it's also unable to download new files (or even re-download the file that caused the problem).

                • 5. Re: MovieClipLoader Crashing IE Browser
                  Greg Dove Level 4
                  Oh.. ok, well your issue might be a little different then, but some of the symptoms are the same.

                  A couple of other questions...
                  Is your loading swf (what you call the "flash course" ) a large file with a long timeline or is it just a small container swf which is supposed to load all the other parts? If its a large file that is still downloading... then that would count as one of the download slots for that domain in IE. If it just requested one other download (e.g. on frame 1) then that would be using both of them.

                  If you want to be sure to eliminate this as the cause... then you could try this:

                  (for diagnostic purposes only - I realise its not a solution).

                  BTW I found that physically closing the window prevented the moviecliploader downloads that were in progress from completing as well (which is good, because you would expect it to ).

                  • 6. Re: MovieClipLoader Crashing IE Browser
                    tcm_allen Level 1
                    The symptoms do sound similar. The theory in this case would be that when the window is closed by the user hitting the browsers X button, Flash/IE never release the download slots appropriately. It seems as if IE is "stuck" because both the IE window and the Flash instance that made the intial media request are gone (closed) and there is nothing left to communicate with.

                    Another interesting result is that after this problem has occurred - the very next request that launches a popup window from the "flash menu" (whether that be an HTML page or another "flash course") produces a 404 error if you wait long enough. The IE status bar on this new popup window does not do anything (no green bars indicating its communicating with the server). It's as if it never even attempts to make the request to the server and simply waits for the client IE browser (itself) to timeout.

                    You make a good point about the download slots although we believe that the first (.swf) file is completely down before we make the media requests. We will extract this code from the larger framework and set up some "demonstration" files. We will wait to ensure that the initial .swf is completely down before it makes a media request so that we are only using 1 download slot. If we can't reproduce the error using only 1 download slot we will then make 2 media requests and see if we can reproduce the error when both download slots are used and the browser is closed.

                    We are hoping to provide a link later.

                    • 7. Re: MovieClipLoader Crashing IE Browser
                      kglad Adobe Community Professional & MVP
                      why are you using getURL() to call a javascript function to open that html. call the html directly from getURL(). does that eliminate the problem?
                      • 8. Re: MovieClipLoader Crashing IE Browser
                        sdm_allen Level 1
                        We're using "getURL" because we need to format the new HTML window that's opening (i.e., set its size, remove the browser controls, etc.).

                        But even if we do away with the flash menu and use simple HTML hyperlinks , the problem still persists.
                        • 9. Re: MovieClipLoader Crashing IE Browser
                          kglad Adobe Community Professional & MVP
                          i can't duplicate that issue.

                          i have main.html that embeds main.swf and main.swf contains two buttons (btn, btn1) and the code:

                          • 10. Re: MovieClipLoader Crashing IE Browser
                            kglad Adobe Community Professional & MVP
                            p.s. i tested in firefox and ie 7.0.5730.11
                            • 11. MovieClipLoader Crashing IE Browser
                              sdm_allen Level 1
                              The test you did is basically what we're attempting to do. I've posted a link of our test site here:


                              This does a very similar thing to your code. The menu.htm document has 2 hyperlinks in it. The top link ("Test 1") opens a popup window that contains a cliploader.swf movie. This clip has three links in it (upper right) that you can click on to start downloading 1, 2 or 3 asset SWFs via the MovieClipLoader class. If you close this window before the download(s) complete, the problem eventually occurs (i.e., server communication with the domain fails).

                              The hard part here is that the issue seems to be, at least in part, timing/performance related. You may need to try this several times before you see the problem (and using a program like NetLimiter to slow the downloads can help). We've had better luck reproducing the error on lower/speed and higher latency connections.

                              If you download all 3 SWFs during each test, eventually you'll use up the browsers maximum connection slots. Raising that limit from 2 (as GWD has pointed out) will delay the problem, but eventually you still run out of open slots and the server communication dies.

                              If you use the second menu hyperlink ("Test 2") and try the same test, the MovieClipLoader aborts successfully and the problem doesn't seem to occur. In the case of this link, the cliploader.swf movie is moved to an "unload" frame (which terminates the clip loaders), and an alert box pops up to ensure that the movie has sufficient time to complete its clean up.

                              So, this takes care of half of the problem. The trickier issue has to do with closing the popup window before the graphics actually begin downloading. If you start one of the downloads, then wait until you see the "start" indicators (beneath the download links) before closing, the unloading/clean-up code fails to rectify the problem and eventually IE stalls. On some occassions we have been able to produce the error in just a couple of attempts. But it can calso take 15 or more "launch & close" sessions before the problem occurs. This might seem somewhat trivial, but in the real site we're using, users may open multiple popup windows over the course of their browsing session, during which hundreds of media assets will be downloaded. So there is a reasonable chance they will encounter the problem.

                              The source code for our little demo can be downloaded from here:


                              Thanks for your time.
                              • 12. Re: MovieClipLoader Crashing IE Browser
                                sdm_allen Level 1
                                As a quick update, it does appear that this problem is less likely to occur on high speed/low latency connections.

                                Also, I have been able to produce the same bug using the standard "loadMovie" method instead of a clip loader, so it's not a problem that's specific to the one class.

                                The demo site has been updated with more directions, as well as an update to the source code to allow up to 3 simultaneous downloads to help increase the chances of the problem occuring.

                                Thanks again to everyone that has spent time looking into this.
                                • 13. Re: MovieClipLoader Crashing IE Browser
                                  Greg Dove Level 4
                                  If its related to the number of simultaneous downloads from the same domain, then the simplest (or perhaps the most complicated in other ways - you need to consider crossdomain permissions etc) fix is to host your media/swf files at another dedicated domain for media. A number of larger sites do this to optimise site performance but also to avoid this type problem (I'm pretty sure I read something about that a couple of months back when I had to deal with the problem I described earlier).
                                  • 14. Re: MovieClipLoader Crashing IE Browser
                                    Did anyone get a solution to this? I'm surrently having the exact same problem with the loadclip calls