Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

unloadAndStop() freezing / crashing flash ?

Guest
Jul 24, 2009 Jul 24, 2009

I have been using the new unloadAndStop() function to unload some loaded SWFs after they are no longer needed. This has been working fine whilst testing in flash, and when I have tested it using firefox. However, to my utter horror and despair unloadAndStop() seems to be crashing safari and IE8. I haven't tried IE7.

After replacing unloadAndStop() with the old unload() the crashing stopped. So I am certain this is the problem. unloadAndStop(false) also caused flash to crash. No error was displayed.

This project has been 7 months in the making and involved a lot of hard work in the evening and weekends. I noticed that it was starting to lag after being in use for a while because SWFs weren't being released from memory. When I say lag as well, It's not like normal frame rate slowing down lag, the whole application will simply freeze up for a couple seconds, and the freezing lasts longer the longer the app has been running. I have gone through and made sure to null almost every variable myself, and null any variable in the loading swf that points to anything in the loaded SWF. It appears to be working now using the old unload() function, but will need more testing to be sure because the lagging only turns up after the application has been running for about 45 minutes and has loaded and unloaded several SWFs.

Anyway, is there anything that I can do about this or am I missing something obvious? I haven't found any other posts about this, has anyone else had this problem? Why does god hate me so much?

Sort it out please Adobe, I really don't think it should be this hard to get rid of a loaded SWF. If you were in front of me right I would be screaming at you.

TOPICS
ActionScript
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 28, 2009 Jul 28, 2009

I would try loading an empty swf and then unloading using unloadAndStop.  If it doesn't crash, you know it's a problem with the swf that's being loaded.  If it does still crash, it's likely an issue with the swf that's doing the loading.  I've used unloadAndStop without any issue so it's likely not a player bug.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 29, 2009 Jul 29, 2009

I've used unloadAndStop() successfully in the past as well. But as I said there is more to it in this case, as it doesn't have this problem in the testing environment, and in firefox. It's only with IE8 and safari that it crashes. In addition, the problem goes away if I use a normal unload(). So the question is, is there something I'm missing about unloadAndStop(), something I need to do before I call the function perhaps? or is it just buggy?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 30, 2009 Jul 30, 2009
LATEST

I think I may have found some references to variables in the loaded SWF within the loading SWF. Which, I understand may stop the SWF from being released from memory (http://www.gskinner.com/blog/archives/2008/07/additional_info.html). I have set these to null now and the freezing appears to have stopped in IE8. Although I think IE8 may have updated itself between now and when I lasted tested. The freezing still occurs in safari now though. So.... now its just unloadAndStop() freezing in safari.

I understand that you need to get rid of references to the loaded SWF from the loading SWF, but my understanding is this would just keep the loaded SWF in RAM, not crash flash. It's crashing in a very strange way as well, where some of the animations keep running, others stop, and the none of the UI responds at all.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines