Flex :: Spark VideoDisplay In Popup Causes Memory Leak

Jun 3, 2010

I'm currently building an air app with FB 4.

I have a custom control that contains a VideoDisplay control, and which loaded using the PopupManager.

Using the profiler, i've noticed that every time the my popup is loaded the memory for it gets allocated, but when it's closed the memory is never recovered.

There's nothing else holding a reference to the popup. And if I don't set the source of the VideoDisplay object, then there is no leak - but as soon as the source is set I get a leak.

I can't see any method to force close the stream or anything on the spark VideoDisplay control.

EDIT: I have tried setting the source to null before closing the popup but that doesn't change anything.

Also, I'm not holding any event listener to the video.

Edit 2: It doesn't happen if I replace the spark VideoDisplay with an mx VideoDisplay. Bug in the spark component?

View 1 Replies


Similar Posts:


Flex :: Spark Combox Memory Leak?

Feb 12, 2011

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.

// Application.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code]....

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.

View 2 Replies

Flex :: Adobe - Take Screenshots Of A Spark VideoDisplay?

Mar 2, 2010

I want to build a component, where the user can play a video in a Flex Spark VideoDisplay. There will be a button and whenever the button is pressed, I want to save the current time of the VideoDisplay plus a screenshot. The screenshot needs to be someway saved, because I want to display all times and screenshots in a DataGrid (screenshots should appear when the user hovers a time in the DataGrid). So, how can I take screenshots of the Spark VideoDisplay and save/display them?

View 2 Replies

Flex :: Restore Spark VideoDisplay Stream?

Dec 8, 2011

how to receive an event when the streams disconnects that would be great.

The documentation for this control is simply horrible. I have an application that will have a live video stream and I'm looking for a way to make the VideoDisplay control restore its connection in case of the occurrence of any of these specific scenarios:

The application starts and the stream is not online yet. The application is streaming and the user is disconnected from the internet. The application is streaming and the video server crashes and reboots.

I'm using Wowza Media Server and Wirecast to test this. 1 and 3 don't work, I'm not sure number 2 does. I made number 1 work by adding this very questionable piece of code:

[Code]....

View 2 Replies

Flex :: Attach Camera To Spark.components.VideoDisplay?

Nov 14, 2010

I'm using Flash Builder and created a spark-application Flex project that will stream video from the local camera. If I use mx.controls.VideoDisplay; there is no problem since it has attachCamera(camera) method. But Spark's VideoDisplay component does not have that method. I know I can use mx controls inside a Spark app but I want to know:

What is the real difference between spark.components.VideoDisplay and mx.controls.VideoDisplay?How do I attach camera to spark. components.VideoDisplay?Is there any advantages if I go with spark (since it's newer to mx library)?

EDIT: In the documentation this is mentioned: "Starting with Flex 4.0, Adobe recommends that you use the spark.components.VideoPlayer class as an alternative to this class. (mx.controls.VideoDisplay)"

View 4 Replies

Flex :: Spark VideoDisplay - Telling Whether The Video Is Currently Playing?

Jan 26, 2011

I'm writing a Flex video player with a "slow advance" button, and my first approach is to simply toggle between play() and pause() on a timer. I'd like to say something like

if (video.isPlaying) {
video.pause();
} else {
video.play();
}

But I can't find anything like an 'isPlaying' property.

View 2 Replies

Flex :: Find Where Is Memory Leak In Application?

Sep 7, 2010

How to find where is memory leak in a flex application?

Are there some tools to catch and analyze this problem?

View 2 Replies

Flex :: Memory Leak When Using SWFLoader In Adobe AIR

Aug 11, 2011

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.

View 2 Replies

Flex - Can't Find Huge Memory Leak In A Flex 4.6 Web Application?

Mar 16, 2012

I have a Flex 4.6 web game which displays 2 Lists with virtual layouts with 2 custom item renderers. The renderers consist mainly of BitmapImages displaying user avatars + few Labels.

The Lists are being updated often over TCP socket with gzipped JSON data. I merge that data into 2 ArrayCollections serving as dataProviders for the Lists. This seems to work well, the Lists do not flicker and are updated correctly (I've monitored debug traces a lot to get it right).

[Code]...

View 1 Replies

Flex :: Spark VideoDisplay With Long Wait High CPU Usage In Google Chrome (and Opera)

Sep 6, 2011

I've created a Flex website that plays a video using the Spark VideoDisplay component. When selected, the VideoDisplay loads in the PopUpManager.

This works fine in all the browsers, except Google Chrome take significantly longer to start playing, during which the CPU usage peaks, then goes back down once video starts playing.

I've traced the player states it goes through and they are as follows:

Loading ready (hangs for ages with high cpu) buffering playing (immediately after buffering, CPU usage goes down, video plays smoothly)

What could be causing this to temporarily hang for so much longer in Chrome? I thought I could expect the same functionality and behaviour throughout all the browsers, as Flash is simply a plugin that runs as a separate process?

Edit: It seems that it's the same in Opera too. Is there any commonality between the two that would explain this behaviour?

[Code]....

View 1 Replies

Flex :: ModuleLoader Component Causing Memory Leak. How Can I Unload Modules Properly?

Jul 27, 2011

The application is too big to describe here, but I can tell you I have up to 20 modules or more that the client can use at any time. And if I go on loading screen after screen, my application can ocuppy 500MB and more.The script that I use to load and unload modules is:

public function createModule(modulo:String):void {
if(moduleLoader != null){
moduleLoader.unloadModule();[code]..............

View 2 Replies

Flex :: BitmapData Heavy Usage - Memory Disaster (Spark / FB4)

Apr 12, 2010

I've got a flex component which works pretty well but unfortunately turns into a disaster once used in a datagroup item renderer of about 40-50 items. Essentially it uses bitmapdata to take screenshot of a fully-rendered webpage in mx:HTML (this version of webkit rocks btw, miles better than flex 3). The code is pretty self-explanatory I think. [URL]. I've optimized it all I could, browsed, search for answers and already trimmed it down a lot, I'm desparate to reduce the memory usage (about 600mb after 100 draw). The Garbage collector has little effect.

View 3 Replies

Flex :: Spark Datagrid Memory Usage With Dynamic Columns?

Jun 4, 2011

I have a question about the Spark DataGrid and how it works in terms of garbage collection. What I'm finding is that if I dynamically add and remove columns from the DataGrid at runtime, the GridColumns and ItemRenderers never get freed from memory.

For instance, if I have a list with 10 items and I create 10 columns, there will be 100 ItemRenderers and 10 GridColumns. If I remove all of the columns, they are still there.

[Code]...

View 2 Replies

Flex :: VideoDisplay Child Always To Be Same Size As VideoDisplay

Sep 9, 2009

i have a VideoDisplay [code]and i want to make the child inside VideoDisplay to resize with him to make his size 100%/100% (size of the child)cuz video.height and width accept only integers and ican't put % in there

View 1 Replies

Memory Leak In My Shooter Game?

Oct 20, 2011

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.

View 3 Replies

ActionScript 3.0 :: Memory Leak During CopyPixels?

Mar 1, 2012

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.

View 3 Replies

Flash :: Memory Leak Of Image?

Dec 9, 2010

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?

View 1 Replies

Flash - Memory Leak When Loading SWF?

Jun 13, 2011

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.

View 5 Replies

ActionScript 3.0 :: Stopping The Memory Leak?

Apr 28, 2010

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.

View 3 Replies

ActionScript 3.0 :: Memory Leak In Project?

Mar 31, 2011

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

[Code]...

View 1 Replies

ActionScript 3.0 :: Loader Memory Leak?

Nov 20, 2009

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

View 4 Replies

ActionScript 2.0 :: Identify Memory Leak On Swf?

Feb 9, 2011

i saw that my app after some time, it becomes slow.. so i guess i have a memory leak? How could i be sure about that and track it down?

View 2 Replies

ActionScript 2.0 :: Memory Leak In The New Loader Class?

Aug 3, 2006

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()

[code]....

View 1 Replies

ActionScript 3.0 :: Memory Leak - Each Time My Swf Gets Reloaded?

Mar 24, 2009

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]......

View 2 Replies

ActionScript 1/2 :: FLVPlayback Memory Leak In Flash CS3

Mar 31, 2010

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]

View 2 Replies

ActionScript 3.0 :: Memory Leak With Large Movieclip?

May 26, 2011

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.

View 2 Replies

ActionScript 3.0 :: Memory Leak On Timer Event?

Aug 16, 2011

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?

View 11 Replies

Flash :: Memory Leak With The SuperPanel Class?

Feb 10, 2010

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.

View 1 Replies

ActionScript 3.0 :: Application That Is Showing A Memory Leak

Jul 10, 2009

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?

View 1 Replies

ActionScript 2.0 :: Memory Leak With Video Player?

Sep 6, 2009

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);

[code]......

View 0 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved