[Unload SWF] appears in console and hangs app

Occasionally, "[Unload SWF] path:main-debug.swf" appears and
kills any HTTPService calls that are made.
The app behaves as such:
1. About 4 HTTPService calls are made at once, using
different HTTPService instances.
2. Occasionally, in the debug console a "[Unload SWF]..."
appears, showing the path to my app. Sometimes it appears once for
every webservice call that I make.
3. Each webservice that gets the "[Unload SWF]" will never
return and hangs forever.
Sometimes, I'll also see a "[SWF] path:main-debug.swf"
message in the console, at which point the webservices will hang
again. If I click "Cancel" in my app, then try it again, they will
sometimes magically work (and I don't get those [Unload SWF]
messages).
Any help would be greatly appreciated!
-Michael Whitaker:confused;

Unbelievable...
I think I may have found the problem and solution:
The way I was using the HTTPService component was through a
seperate class which itself contained the httpservice that I was
instantiating and calling on a per-need basis. The function I was
using to call my web service needs accepted two function pointers
(or Function types) which were called on a ResultEvent or a
FaultEvent (from the HTTPService). I was using lamba functions
(inline functions) in the method call. That is what seemed to be
the problem. As soon as I moved the lamba functions outside ,into
real functions, and just passed their reference through my method,
everything worked.
I've noticed several problems with lamba functions, all of
which are very unfortunate (because I would use them more, but they
are so buggy):
1. A lamba function sometimes has some weird scope. At times
calling "this.something" fails from within the lamba function as
'this' is null. Ex:
class Bob
public Bob()
this.addEventListener(Event.ENTER_FRAME,
function(e:Event):void { trace("this: " + this.toString()); },
false, 0, true);
(Note: this is 1% psudo code (uncompiled).) "this" will
sometimes be null (depending on where the lamba is used).
2. If, using the above code, you were to instantiate several
Bobs at a time, and add them to the displaylist, sometimes only ONE
of the instances will actually call their lamba function on
enterframe; the others won't. I'm not sure why this happens, but I
think multiple instances of the same class using a lamba function
tends to conflict in memory or something. (or in the special
lamba-scope).
3. At times, as per my problem in this thread, a lamba
function won't even be called. I've solved this by pulling out the
lamba functions and placing them in real functions, then just
passing the pointer across.
I guess the debugger sending [Unload SWF] and [SWF] messages
were just a coincidence (unless they somehow affect lamba
functions). I'm going to continue testing this to verify that the
problem has gone away. If it hasn't, I'll probably start a new
thread.
Thanks for your help mike_morearty!

Similar Messages

  • Loader, Unload SWF and Warning: Ignoring 'secure' attribute........

    Hey all
    I was just simply trying to load one swf into another.  in my document class I have the following line of code in my constructor.
    var loadBoard:LoadBoard = new LoadBoard("Directory.swf");
    in my LoadBoard class:
    package com.myproject
         import flash.display.Loader;
         import flash.display.MovieClip;
         import flash.net.URLRequest;
         public class LoadBoard extends MovieClip
              public function LoadBoard(nameOfBoard:String)
                   var boardLoader:Loader = new Loader();
                   addChild(boardLoader);
                   boardLoader.load(new URLRequest(nameOfBoard));
                   trace("swf should be loaded");
    In my console I get the following when I debug"
    [SWF] U:\fullPath\Directory.swf - 69,058 bytes after decompression
    [SWF] U:\fullPath\Directory.swf - 2,067 bytes after decompression
    [SWF] U:\fullPath\Directory.swf - 322,606 bytes after decompression
    [SWF] U:\fullPath\Directory.swf - 112,558 bytes after decompression
    [Unload SWF] U:\fullPath\Directory.swf
    Warning: Ignoring 'secure' attribute in policy file from http://fpdownload.adobe.com/pub/swz/crossdomain.xml.  The 'secure' attribute is only permitted in HTTPS and socket policy files.  See http://www.adobe.com/go/strict_policy_files for details.
    Not sure why I am getting this warning, when I googled it, the erro has to do with trying to load a file from another domain. My Directory.swf file is in the same location as my main swf, the bin-debug folder.  Also the Directory.swf does not seem to load into my main swf as I don't see it show up in the flash player when i run my app.   I am also a little confused on the [Unload SWF], I am not doing anything to tell it to Unload my swf.
    I am using FB to do all my coding and debugging if that matters.
    Does anyone have any ideas.
    thanks,

    Apparently I was, so I changed it to classic text in my Directory.fla and that seemed to remove the weird error.  However it seem that my swf is still not loading.  any Ideas why that might be?
    [EDIT]  Ok, my Directory swf is defenatly loading. but not showing up in the display list. I updated my LoadBoard to the following.
    package com.aces
         import flash.display.Loader;
         import flash.display.MovieClip;
         import flash.events.Event;
         import flash.net.URLRequest;
         public class LoadBoard extends MovieClip
              public function LoadBoard(nameOfBoard:String)
                   var boardLoader:Loader = new Loader();
                   boardLoader.load(new URLRequest(nameOfBoard));
                   boardLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishLoading);
              public function finishLoading(loadEvent:Event):void
                   addChild(loadEvent.currentTarget.content);
                   trace("swf should be loaded");
    any Ideas?
    Thanks,

  • SWFLoader.unloadAndStop() - does it unload swf and release memory?

    Hi all,
    Do SWFLoader FP10 unloadAndStop() and GC really unload swf?
    I have simpliest test case possible when parent app creates new SWFLoader, loads sub app and then unloads it.
    Every time when it does it I see memory grows. The sub app is tiny:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Label id="idLabel" color="blue" text="This is embedded application."/>   
    </mx:Application>
    The parent application is also simple
    public function loadSwf(name:String):void
      loader.addEventListener(Event.COMPLETE, completeHandle, false, 0, true);   
      loader.showBusyCursor = true;
      loader.scaleContent = true;
      loader.source=name;     // name is subappswf.swf the
      loader.load();
    private function completeHandle(event:Event):void
      loader.removeEventListener(Event.COMPLETE, completeHandle);
      loader.unloadAndStop(true);
    Profiler shows decent Peak Memory and even Cumulative Memory does not seem horrible. There are no objects hanging in sub-application except SystemManager. But Google Chrom Task Manager shows the real picture:  Shockwave Flash memory grows and as soon it reaches threshold ~0.5 GB, application becomes unresponsive and eventually FP crashes.
    What else should be done to free up memory?
    Regards,
    Ilya

    This is iInteresting...
    /*** Unloads an image or SWF file. After this method returns the
    * <code>source</code> property will be null. This is only supported
    * if the host Flash Player is version 10 or greater. If the host Flash
    * Player is less than version 10, then this method will unload the
    * content the same way as if <code>source</code> was set to null.
    * This method attempts to unload SWF files by removing references to
    * EventDispatcher, NetConnection, Timer, Sound, or Video objects of the
    * child SWF file. As a result, the following occurs for the child SWF file
    * and the child SWF file's display list:
    * <ul>
    * <li>Sounds are stopped.</li>
    * <li>Stage event listeners are removed.</li>
    * <li>Event listeners for <code>enterFrame</code>,
    * <code>frameConstructed</code>, <code>exitFrame</code>,
    * <code>activate</code> and <code>deactivate</code> are removed.</li>
    * <li>Timers are stopped.</li>
    * <li>Camera and Microphone instances are detached</li>
    * <li>Movie clips are stopped.</li>
    * </ul>
    * @param invokeGarbageCollector Provides a hint to the garbage collector to run
    * on the child SWF objects (<code>true</code>) or not (<code>false</code>).
    * If you are unloading many objects asynchronously, setting the
    * <code>gc</code> parameter to <code>false</code> might improve application
    * performance. However, if the parameter is set to <code>false</code>, media
    * and display objects of the child SWF file might persist in memory after
    * the child SWF has been unloaded.
    public function unloadAndStop(invokeGarbageCollector:Boolean = true):void
    useUnloadAndStop =
    true;unloadAndStopGC = invokeGarbageCollector;
    source =
    null; // this will cause an unload unless autoload is true
    if (!autoLoad)load(
    null);}
    It means that if autoload is true (default) unload will not happen and sub-app
    will persist in memory.
    Regards,
    Ilya

  • Hello, my iphone 5s fell, thereafter i tried taking a picture, the camera app just shows a black screen and hangs, the front camera works on other apps but the rear camera is not working, all other apps work perfectly well, how do i resolve this

    Hello, my iphone 5s fell, thereafter i tried taking a picture, the camera app just shows a black screen and hangs, the front camera works on other apps (such as facetime and skype) but the rear camera is not working, all other apps work perfectly well, how do i resolve this

    Double tap Home button and delete Camera app from multitask-list.
    Do a
    Reset: Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Note: You will not lose any data
    If problem persist, make an appointment with genius bar for evaluation.

  • Agent not installing correctly and host not appearing in console

    Hi,
    I encounter troubles with agents on some servers running Red Hat Enterprise Linux ES release 4 (Nahant Update 5).
    *1)* The install script doesn't run correctly. It hangs after some times
    install.log :
    11-21-2007 17:37:05> check rpm with rpm -q rpm
    11-21-2007 17:37:05> Checking if user is root
    11-21-2007 17:37:05> Checking UCE upgrade
    11-21-2007 17:37:05> rpm -q sun-uce-agent
    11-21-2007 17:37:05> CMD: rpm -q director-agent
    11-21-2007 17:37:05> checking /opt/local/uce/agent//bin/.uce.rc
    11-21-2007 17:37:05> /opt/local/uce/agent//bin/.uce.rc was not found
    If I install the rpm manually, the packages is successfully installed. I then just copy the .uce.rc file at the correct location.
    *2)* On those servers when the agent it running, it fails to connect to the SDS with this error in the error.log :
    29739:2007-11-21_17:01:13 ERROR [ default_logger: source_unavailable: #0 ] 17236224 Failed to initialize application. Check that you entered passwords and keys correctly.
    Any idea of what could be done ?
    Best regards,
    Fred. Oger

    Hi,
    Still don't know why the agent installer doesn't work correctly, but I found the reason of the host not appearing in console :
    The uce.public file had to be installed in /opt/local:uce/agent/bin

  • G5 pauses for 2 minutes while booting, and message appears in console

    So my G5 has developed a new habit - pausing for two minutes post grey Apple logo/gear but before blue background appears. Eventually, the boot process ends with a desktop and seems to function normally. I booted onto the Leopard install CD and ran the repair disk and repair permissions utilities. I installed the TechTool Deluxe software from my Applecare package (of course my Apple Care plan expired last month) and ran all the tests and everything passes. I ran the "periodic daily weekly monthly" script in terminal.
    I checked in console and found this:
    4/8/08 3:04:23 PM com.apple.launchd[1] (com.WD.WDDriveServices[946]) posix_spawnp("/usr/bin/WDDrvSvc", ...): No such file or directory
    4/8/08 3:04:23 PM com.apple.launchd[1] (com.WD.WDDriveServices[946]) Exited with exit code: 1
    4/8/08 3:04:23 PM com.apple.launchd[1] (com.WD.WDDriveServices) Throttling respawn: Will start in 10 seconds
    this sequence of 3 lines repeats every 10 seconds.
    Does anyone have any thoughts as to what this is, why it's happening, how to make it stop and if it has anything to do with the lovely new 2 minute pause at boot?
    Thanks in advance!

    Ok, so I unplugged the external WD hard drive, restarted, same thing.
    I used OnyX to clear out caches. Restarted, the two minute delay went away. Yay! And the ole G5 seems a bit perkier. But the 3 lines cycling through console are still there.
    I went into Terminal (I'm not really a novice) because I found something in console during the boot process referring to a WDNotifier.app. I mvved it into a folder (directory) called oldstartupitems and restarted. Same three things cycle through console.

  • [SWF] and [Unload SWF] in Debug mode

    I am debugging my application and I am noticing some strange output in my console window.
    I will get the same line duplicated, it looks like this:
    [SWF] C:\Users\Me\Desktop\Development\flash\bin-debug\main.swf
    [SWF] C:\Users\Me\Desktop\Development\flash\bin-debug\main.swf
    [SWF] C:\Users\Me\Desktop\Development\flash\bin-debug\main.swf
    Then at a later state in the application I see this:
    [Unload SWF] C:\Users\ Me\Desktop\Development\flash\bin-debug\main.swf
    [Unload SWF] C:\Users\ Me\Desktop\Development\flash\bin-debug\main.swf
    [Unload SWF] C:\Users\ Me\Desktop\Development\flash\bin-debug\main.swf
    Can someone exaplain to me what this means, and why I see duplicates of the exact same lines?

    I would like to add a question to this topic, but instead of describing it, I would like to refer to this forum, where it was described very good: http://www.gotoandlearnforum.com/viewtopic.php?f=33&t=28730
    In short:
    When the loader object is only referenced by a local variable within a method and there's no other reference to the loader, other than the EventListener, the loaded SWF file is being sporadically unloaded (by the GC perhaps) before I am able to access the loader.content! That's kind of a bug, I guess and not acceptable!
    So any help would be much appreciated!
    Regards,
    Matthias

  • Why? after home hang and resume, APP play more smooth on ipad/iphone

    On ipad/iph.
    Start app,
    load and play swf,
    Sounds bad, choppy!
    Start app, then use Home button, hang and resume app,
    load and play the swf
    Sounds well,smooth!
    Why?
    I guess that hanging load all air native machine to Ram,
    So resume play smooth
    who know how to use the trick?

    who know how to preload air native machine to Ram?

  • I have had an iPod Touch 3rd Gen for two years and the apps have worked fine in the past. Suddenly the apps will not launch, they appear to start then just exit. Is there a reason why it is doing this?

     I have had an iPod Touch 3rd Gen for two years pretty much and the apps have worked fine. Suddenly when I go on an app it appears to launch then just exits. I tried turning the iPod off and on again, but that made all my apps behave like that. Settings and those things work fine still. Should this suddenly happen? I dont want to lose all 204 apps.

    - First try resetting the iPod. Nothing will be lost.
    Reset iPod touch:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - Next try downloading/installing a new app
    - Restore from backup
    - Last, resore to factory defaults/new iPod.  this is last result since you will lose app data.

  • Hi, i'm new using numbers, and when I try to open a excel file don't let me do it, instead appears a box whit a error and close app,  any help?

    Hi, i'm new using numbers, and when I try to open a excel file don't let me do it, instead appears a box whit a error and close app,  any help?

    What does the error say?
    A couple of thoughts: the file is corrupted or is password-protected. Corruption is more likely to cause Numbers to crash & Numbers cannot open password-protected Excel files. Try using one of the free Office clones & see what happens.

  • HT203421 I have recently purchased some apps from the app store and after downloading them, the icon that appears in the dock changes to a different icon. It is now the same icon appearing on all newly downloaded apps.  Does anyone know what is happening

    I have recently purchased some apps from the app store and after downloading them, the icon that appears in the dock changes to a different icon. It is now the same icon appearing on all newly downloaded apps.  Does anyone know what is happening here? Even updating an older game app resulted in the original game icon changing to the new identical icon that all new apps are appearing with.  This new icon is like a page with a ruler, pencil and paintbrush. Any tips on how to stop this or how to revert to the icon as it appears on the app store would be appreciated.

    https://discussions.apple.com/thread/6132949?tstart=0

  • Loading and unloading swf

    I am making a site and I want each button to load an swf,
    which would be the content of each page. When I click on each
    button the swf will load, however, the old swf will not go away.
    how does one do this. Thanks.

    It looks like you are adding the newly loaded swf, but not
    removing the old one. So, maybe this change would help:
    function about_CLICK(myevent:MouseEvent):void{
    var loadMain:Loader = new Loader();
    loadMain.load(new URLRequest("clip0.swf"));
    // if there is a child on the display list remove it
    if (getChildAt(0) !=null) removeChildAt(0);
    stage.addChild(loadMain);
    I should mention, however, that there is a bug in Flash 9
    related to unloading swfs:
    http://www.gskinner.com/blog/archives/2008/04/failure_to_unlo.html
    However, I don't think this is affecting your visible
    behavior.

  • Redirect [SWF] and [Unload SWF] trace?

    Hi all!
    I was wondering if there is a way to redirect or disable
    [SWF] and [Unload SWF] based messages when working with external
    SWFS.
    Ideally I would like to redirect trace statements, but I
    doubt that's possible.
    Thanks!

    I would like to add a question to this topic, but instead of describing it, I would like to refer to this forum, where it was described very good: http://www.gotoandlearnforum.com/viewtopic.php?f=33&t=28730
    In short:
    When the loader object is only referenced by a local variable within a method and there's no other reference to the loader, other than the EventListener, the loaded SWF file is being sporadically unloaded (by the GC perhaps) before I am able to access the loader.content! That's kind of a bug, I guess and not acceptable!
    So any help would be much appreciated!
    Regards,
    Matthias

  • HT4623 Ater installing IOS 6 for my iphone 4,some apps are hang sometimes and Mail apps totally hang ,tried to reset again and again but still hang

    Ater installing IOS 6 for my iphone 4,some apps are hang sometimes and Mail apps totally hang ,tried to reset again and again but still hang.How to solve this problem??

    well in thatcase, i need another help .
    thanks for your instant reply.
    i have currently bought a new laptop (windows 8) and my iphone is not being recognized by itunes.
    because i have no backup on my previous laptop, i downloaded touchcopy but even touch copy is not recognizing my iphone.

  • Why does the new photo app not allow all the photos on my iMac to appear on iPhone and iPad?

    Imac with OS X Yosemite 10.10.3
    New Photo App has over 9000 photos but only 180 or so appear on iPhone and iPad. Why. I have sufficient iCloud storage.

    How did you import the photos?
    Are the missing photos perhaps referenced? Then they cannot upload to iCloud.
    You can check with a smart album, if you have any photos in the library, that cannot upload to iCloud.

Maybe you are looking for