Flash :: Builder 4.5 Profiler Not Finding Memory Leak?
Oct 11, 2011
I'm working with a large modular app, and most of the swfs were made in Flash Professional. When I load the app in the Flash Builder Profiler, the memory usage appropriately goes up and down as I add and remove modules. When I flip between two modules many times, I end up with the current memory in the Profiler more or less where I started at around 2 megs. System.totalMemory, however, shows that the flash player has only been allocating memory and is currently using 106 megs. Is there a certain bug known to do this, or is there a better way to detect memory leaks? I'm using the latest flash player debug version.
Note: The SWF modules are all permitting debugging, and the Profiler picks up objects in them.
I was using a trial edition of flash builder 4 professional and I figured before it ran out I would test the profiler. What shocked me was the number of objects that were left resident in memory. After seeing that I decided to set up a small test and had very bad luck. I was hoping someone can look at the following and tell me assumption i have that is just wrong.
I'm currently hunting a memory leak related to XML objects. FDT's profiler shows results that match my expectations while Adobe's profiler doesn't show any XML objects at all.
Are there any differences between Adobe's profiler that comes with Flash Builder and FDT's profiler or is that a configuration issue?
I'm using Adobe Flash CS 4 and would like to know are there any profiler or memory analysis tools available for it ? (actionscript 3). I know there are available tools for Flex, but are there for Flash CS 4 instead?
I'm trying to use the Profiler for the first time so I don't know much about it. But it doesn't seem to work.I run my project under profiler, it says it is running, but no window shows up. Nothing. I can see the project's icon down there but I see no window at all.Can this be cause by the fact that I'm using Flex 4.5? You can the app in the dock and it shows its live objects, but I don't see the apps' window and cannot interact with it. The app is just a simple 400x400 window with some black shapes in it.
I'm making a photo browser. I load 15 photos as Images and add these Images to HGroup every time. When user presses 'next page', I first unload the existing Images by 'Image.unloadAndStop()' and 'Image.source=null', and then load new photos. However, it seems that the GC never works. The task monitor shows that the memory use of my AIR reaches as much as 1.2G! Some people said it's a bug of Image when you load a picture larger than 1.5M. Is it true?
I have a loader SWF that runs some code in the background and loads other SWFs. Using this code:
private function loadScreensaver():void { screensaverSWF = new Loader(); var req:URLRequest; switch(areaNumber){
[code]....
I load the screensaver and add it to the stage. Using MonsterDebugger I can see that memory steadily rises from around 80mb upwards until the application exits (Im using windows projector). What I can't work out is why, there is no code attached to the screensaver SWF, just some timeline animations of things fading in and out.
EDIT:I've kept testing and found where I have an image that starts of stage then tweens on and off and is removed. When it loops it adds to memory again, as if the first image is still kept. This is all done on the timeline.
I' making a flash file with AS2 in Flash CS3. I put a FlVPlayback in stage and let it load a couple of FLV files from my local HDD and playing continuously. I use "addEventListener" to check the current running flash movie is completed. After complete event occur, I load another flv movie to paly again.Here, I noticed that memory usage is increasing every time a new flv file is loaded and played. I heard "addEventListener" in CS3 is causing the memory leak and not being detected by GC. [code]
I have got a memory leak problem in the example below(u can download the code from the link) http:[url]......
Running in Profiler:- What I am trying to do is creating new panels by selecting the Add new panel button.I am selecting option allow Close (check box).(After creating few panels and closing these panels i could find there is memory leak with the SuperPanel class) how to resolve this memory leak.I tried by changing optional parameters in addEventListener, but that didn't work.
We are working on a project where Flash application should read in a constant loop variables from php script and then properly react. Everything works fine execpt after a memory usage start to grow at 1Mb/min, more or less... it varies from time to time. Our browser works then very slow (Mozilla Firefox, Opera, Mozilla Firefox and Mozilla for Linux) Our code:
We are working on a project where Flash application should read in a constant loop variables from php script and then properly react.Everything works fine execpt after a memory usage start to grow at 1Mb/min, more or less... it varies from time to time. Our browser works then very slow (Mozilla Firefox, Opera, Mozilla Firefox and Mozilla for Linux)
Our code:
_root.onEnterFrame = function() { load_lv = new LoadVars();[code]...
We also tried with function LoadVariables but we got the same results (MEMORY LEAK).Is this a bug in a Flash or we are missing something?Is there any other possible way to read variables from php script. (10 times/sec).We have also tested an AMFPHP example found on the [url]... and if you click on search button very often and fast for a while you also get memory leak.
We find a problem about STANDARD FLASHPLAYER PLATFORM,memory leaking on new flashplayer version(10.1.82.72 or newer) happens while testing the flashplayer in live mode connected to the standard FMS in a period of more than 24 hours.the Phenomenon is as follows,the player screen seems suddenly fixed after some time and the memory start to increase ,the peak of virtual memory consumption is up to 1.3 G(2.0G of physical memory),and a moment later,white screen happens with a exclamation point.
1. test aim test the stability of STANDARD FLASHPLAYER FLATFORM in a long period
2. test environment SERVER STREAMING SERVER: ADOBE FMS 3.5.1 CODEC SERVER : ADOBE FME 2.5 OPERATIONG SYSTEM: WINDOWS 2003 PROFESSIONAL CAPTURE CARD: OSPREY530(720*576)
I have a large sprite...and I'm splitting it into several smaller ones with function bellow. The function works great but the memory usage of my .swf grows dramatically.
private function split_sprite(sp:Sprite,the_parrent:Sprite) { var region:Rectangle = new Rectangle(); region = sp.getBounds(the_parrent);
I'm quite confused on what differences there can be between different versions of the flash player. Since I started coding my last game I've been testing it on chrome and firefox with good results (flash player 10.3.xxx). The memory needed to run it is always around 20 MB and also the cpu usage is pretty low. Also with the player 11 beta on ie the memory needed is around 50 Mb. But when i try to test it on the flash player 10 something is not working, the memory used by the game keeps growing and the garbage collection seems to be in holiday. Can this be related to the fact i'm coding it with the last cs5 (in as2)? Or since it's a board game i needed some listeners that could create this problem?
I have an AIR/Flex app I made, I have a few people testing it and everyone is reporting that after leaving it running for a while, it is making all there machines run very slow. It runs fine at first so this must be a memory leak somewhere. I used the profiler on this and the only thing that shows as using a substantial amount of memory is MethodQueueElement which is not a class I wrote, and I have no idea what it does, I am assuming its part of the Flex framework. I am not familiar with using a profiler so I am not sure what all I shuld be looking at, that was the only class that was high on "memory" and it said it had over 100,000 instances. If this is my problem what can I do to fix it?
I'm very new to flash,and have been digging through google and this site for information on how to piece together an AS2 shooter game.Its going well enough, but I'm having slowdown issues the longer the games runs, and I was hoping someone here could point me in the right direction.To paste an enemy movie clip on the screen, i'm using this:
Code: var spawn =_root.attachMovie("monster1","monster1"+_root.getNextHighestDepth(),_root.getNextHighestDepth())[code]........
I need them stored in an array so that the player's shots can test weather or not they've hit any monster on the bullet's enter frame function, then call that monster's movie clip's take damage function. I'm using a for loop to do this:
Code: for(var i in _root.player.foes){ if (this.hitTest(_root.player.foes[i])){ _root.player.foes[i].takedamage();} }
I think the problem with the slowdown is that each time I place an enemy on the screen the array gets bigger and bigger. The slowdown only happens while the player is shooting, and I suspect the ever longer for loop with the hit testing is causing it.
I'm already removing the monster's movie clips as they get killed or exit the screen, I guess what I need is a way to reduce the size of the array at the same time, or at least tell the for loop not to do a hit test unless the monster is still alive.
I am making a custom renderer using the copyPixels function for my Haxe/Flash game. So I have this kind of code :
buffer.bitmapData.copyPixels(m_CurrentSkin, RECT3, POINT, null, null,true);
where :
-buffer is the bitmap where all my scene's objects are drawn
-m_CurrentSkinis the BitmapData that contains the current frame of the object to be drawn
Every time m_CurrentSkin contains a BitmapData that have never been drawn (the first time that an animation frame is drawn for example),I have a memory leak that is not garbage. However if m_CurrentSkin contains a BitmapData that have already been drawn (when the animation is played a second time for example), there isn't any memory leak.If I comment this line there is no leak so the problem comes from there.It seems that a copy of the BitmapData is cached in memory but I have checked in my code and there is no cacheAsBitmap explicitely set to true.
I am trying to find out how to stop the memory leaks that I seem to get when making up dynamically loading picture slideshows. It is difficult to try and give a perfect example of this so I would rater try and show it in action. Here are 2 separate tutorials on how to build a slideshow, though they are slightly different I think this will illustrate my point, there is one problem and that is that the only browser I know of that will show this correctly is Safari,[code]....
Ok now in safari open up your Activity window and take a look at how these 2 different slideshows seem to operate, Link 1 seems to have a memory leak,because each time the picture loads a new instance of it, if this were automated it would be a far bigger issue, like the second url of Link 1.Now when I make my own slideshows I find that mine are also like the first and second links and not like the third.
i am working on this project wherein i instantiate an flvplayback at stage and let it play ,, after playing i instantiate 1-4 flvplaybacks on stage and the user kan nove choose a new film to watch .. but each time i instantiate the flvplayback(s) the project gets slower and slower .. the video gets bugggy and the sound is out of sync ..if anyone can see something wrong with the way i do it i would be ever so happy
While tracking down the source of a memory leak, I stumbled upon a strange issue with AS 3.0 and loading external flash movies. From what I can tell this somehow related to the custom classes stored inside the loaded movie. I have two versions of a basic file that contains one image on the stage (I also tried this with vector graphics with the same effect). One version has a custom document class (just a simple extends MovieClip with no additional code) and the other has no document class.
The graph below depicts the memory usage from loading the file without a document class.It performs the garbage collection as you would expect after each unload operation.However when I try to load and unload the same file with a document class, I get the following memory usage graph. As you can see, memory usage is slowly creeping up with each load operation.It almost seems that Flash is caching the class files, so I tried changing the application domain for the loaded content without success. Even if Flash was caching the class files I would assume that it would be able to detect that it had already cached the document class and simply re-load the cached version
I am making an application where I load a picture from the web at a rate of once per second. When I load a new picture I unload the old one the problem is that the old pictures are never completely erased from memory and the application keeps on consuming more and more memory until I'm guessing it eats all the memory in the cache (I haven't run it for that long yet :))
here is the code: what this does is load a picture when you click the screen, then unloads it when you click the picture. do it a few times and notice that the numbers (which show System.totalMemory) only go up but never go down to their original amount...
Code:
var url:String = "http://www.memorycity.com/shop/MBB/images/GIGABYTE_memory.jpg"; stage.addEventListener(MouseEvent.CLICK,onclick) var txt:TextField = new TextField()
I'm experiencing a few memory leaks each time my swf gets reloaded. I have closed the netstream, removed the listeners and the container, tried UnloadAndStop(); but in the end I'm still missing someting as some Mb leak anyways...Here goes my child swf source code:
Code: ////////// UrbanRevolution :MoD ////////// Built on "Video player a la Hulu" by Chris Brimelow http://chrisbrimelow.com ////////// FS function by noponies http://www.noponies.com/dev/as3_fsresize/[code]......
I'm having what strikes me as a stupid problem, but I can't figure it out myself... it could be a subtle nuance of Flash or just some knowledge I don't have, anyway... I'm making a Flash game with a main menu and multiple levels. We didn't organize our project right (just self-taught college students doing it in our free time) so we made a level before the main menu. I ended up putting the entire level, code and all, into a MovieClip. It creates an instance of that MC when you start a level (I'm sure this was a terrible idea).
But it leaks when I delete the MovieClip and create a new one (i.e. quit the level to the main menu and then start it again). It originally leaked ~6MB each time you quit and started it again, but I've tightened it up to ~1MB, but I'd still like to fix that.
I know to Garbage Collect something you have to remove references, so I've Blanked all arraysNulled all referencesRemove all MCs dynamically added to the stage and any associated eventsRemoved every single MovieClip from the entire stage, including ones that weren't added dynamicallyNulled practically every object and variable I've only used weak-referenced events, and I've removed all of them anyway, but it's still leaking. There's way too much code for me to post all of it, so I guess I'm just wondering if anyone has any general ideas I haven't thought of.
I have create a simple timer with repeat count of 0, so it loops unlimited times.The timer repeats a function which calls for a PHP and displays data on the screen, so the data can be refreshed automatically.What I noticed though, is that the whenever the timer starts, it creats a memory leak on the system which makes the application memory usage to always go up.Is there any way to fix this?
I have a simple, reproducable memory leak associated with the Spark Combo box, however I'm convinced it must be something I'm doing wrong, rather than an SDK bug.
Note - this doesn't occur when the application is compiled against Flex Hero.It appears as though this is a bug, but I cannot believe that the ComboBox has a memory leak -- surely this would've been fixed before 4.1 was shipped? Update I've done further investigation into this, and believe the issue lies in a problem with the RichEditableText component that the ComboBoxSkin uses.
I'm trying to load windowed sub-application in another windowed application, The requirement is to replace one loaded application with another on user action.
I tried the documented method of unloadAndStop() on the swfLoader in the main windowed application, but somehow during memory profiling I could see the instances of those applications were maintained in the memory even after explicitly running garbage collection.
Where as If I make those windowed application as modules, and then try to load them using the Moduleloader things work smoothly and unloaded modules are removed from memory.
Iam trying to debug someone elses AS3 application that is showing a memory leak. The application is built with PureMVC.I have managed to locate the place where the memory leak seems to start. There is a button that causes the application to launch a slideshow. This draws a new graph every 8 seconds or so by creating a Timer. In the Timer handle function the code uses sendNotifaction() to set off series of events which basically boil down to getting information from a server and drawing a new graph.Now if I comment out the sendNotification() the memory leak stops, but if I leave the senNotification() in but comment out the code that subsribes to it the memory usage starts to build up.So my question is can simply firing off a sendNotification() every 8 secs in PureMVC cause a memory leak, even if not other code runs from this?
I have an old project in AS2 with a video player that plays mp4s. I've noticed that FF tends to continue to eat up memory even after the video has stopped or has finished loading. I also am noticing jerky playback which I think has something to do with the memory leak.
ActionScript Code: var server_nc:NetConnection = new NetConnection(); server_nc.connect(null);