9 Replies Latest reply on Nov 29, 2011 11:06 AM by Flex harUI

    Adobe: Please reopen this bug SDK-30917

    RandomReado Level 1

      Currently in Flex 4.5.1 if you set the VideoDisplay source over and over, each time the memory usage of the runtime (e.g. ADL.exe) increases. After a while the memory usage drops to about 50MB or so and starts increasing again. However, this time when the memory drops, the runtime stops responding. Other people have confirmed this behaviour.

       

      Bill has provided some links to other tickets regarding the same issue, one of which I reported ages ago. The fix suggested here is to set the VideoDisplay source to null before setting the source to something else. This should free up memory. However the "null" workaround that used to work no longer works.

       

      Can you reopen this ticket please and let me know what's happening about fixing this bug?

       

      https://bugs.adobe.com/jira/browse/SDK-30917

        • 1. Re: Adobe: Please reopen this bug SDK-30917
          Flex harUI Adobe Employee

          Looks like Bill is watching the bug.  Attach your simple test case and ask him to verify on 4.5.1

          • 2. Re: Adobe: Please reopen this bug SDK-30917
            S_Aleksey Level 1

            I am having exactly the same issue. Here is simple test case:

            <?xml version="1.0" encoding="utf-8"?>

            <s:WindowedApplication creationComplete="creationComplete(event)" xmlns:fx="http://ns.adobe.com/mxml/2009"

                                                                 xmlns:s="library://ns.adobe.com/flex/spark"

                                                                 xmlns:mx="library://ns.adobe.com/flex/mx">

                      <fx:Script>

                                <![CDATA[

                                          import mx.events.FlexEvent;

             

             

                                          protected function creationComplete(event:FlexEvent):void

                                          {

                                                    var timer:Timer = new Timer(1000);

                                                    timer.addEventListener(TimerEvent.TIMER, onTimer);

                                                    timer.start();

                                          }

             

                                          private function onTimer(event:Event):void

                                          {

                                                    videoDisplay.source = null;

                                                    videoDisplay.source = "file:///D:\\test.flv";

                                          }

             

                                ]]>

                      </fx:Script>

                      <s:VideoDisplay id="videoDisplay"/>

            </s:WindowedApplication>

             

             

              The only workaround which works for me is to call System.gc() in the onTimer function. So it seems like for some reason garbage collector can't determine automatically that app runs out of memory.

             

            Best Regards, Aleksey

            1 person found this helpful
            • 3. Re: Adobe: Please reopen this bug SDK-30917
              Flex harUI Adobe Employee

              If system.gc() prevents the app from running out of memory, then it isn’t a memory leak, it means you are creating more allocations than the collector can collect.  The GC is not a separate process/thread.  It runs on occasion and can fall behind.

              • 4. Re: Adobe: Please reopen this bug SDK-30917
                S_Aleksey Level 1

                The problem  is that  I set source property not in loop but on timer with interval. I tried to set large  interval like 20 seconds and still for some reason garbage collector can't find time to collect memory.

                 

                Best Regards, Aleksey

                • 5. Re: Adobe: Please reopen this bug SDK-30917
                  Flex harUI Adobe Employee

                  Make sure you update the bug with your test case and latest findings.

                  • 6. Re: Adobe: Please reopen this bug SDK-30917
                    RandomReado Level 1

                    My test case was an example of a playlist - like on YouTube you can flick from video to video, typically this was doing the same thing. Setting the Interval to something higher produces the same result.

                     

                    In my real-life application, users open the application and play a video (20 minutes long or so), then another (same length), and another, etc... A few hours later the application crashes and according to Task Manager the application is "not responding" and is using over 1GB of memory at that point in time.

                    • 7. Re: Adobe: Please reopen this bug SDK-30917
                      RandomReado Level 1

                      Alex, I commented on the bug closure over 2 weeks ago but the bug remains closed. So I created a cloned bug thinking it was being ignored but nothing's been posted on that bug either. Can you find out if anything is being done about this please?

                       

                      The cloned bug is here: https://bugs.adobe.com/jira/browse/SDK-31483. I have cross referenced this thread in the comments.

                      • 8. Re: Adobe: Please reopen this bug SDK-30917
                        Jens Chr Level 1

                        I can confirm that this bug exists. Had to replace all instances of the video component with a custom AS3 class. Now all my apps will run reliably...

                        • 9. Re: Adobe: Please reopen this bug SDK-30917
                          Flex harUI Adobe Employee

                          This is supposedly fixed in 4.6, which should go live sometime before the end of the day on the west coast.