4 Replies Latest reply on Jun 18, 2010 11:31 PM by Flex harUI

    Zero object reference paths in profiler

    Aaronius9er9er Level 1

      I'm cleaning up some memory leak issues in our app.  Essentially when the user goes to section B of the app it loads up quite a few heavy sprites and related objects.  When the user leaves section B of the app we're trying to clean up the objects from memory.  We did have a easily identifiable memory leak which we fixed, however now when we look at the object references to the objects they show "0 paths".

       

      I read this post by Alex: http://www.cflex.net/flexcoders.cfm?Message=msg135275.html but it doesn't get me any farther.  There are a lot of children and related objects and any of them I pull up in the profiler show 0 paths.  Why does the profiler cut out circular references in the first place?  Couldn't it just denote [circular] in the view or something instead of cutting out the path completely?  At this point the profiler is useless for me.  How do I find what's referencing it when it shows 0 paths?

       

      As a side note of frustration, I can go hardly 5 minutes in the profiler without a Java heap error.  I've tried modifying my eclipse.ini to no avail.

       

      Aaron

        • 1. Re: Zero object reference paths in profiler
          Flex harUI Adobe Employee

          The Flex 3 profiler showed circular references, although it didn't mark

          them.  In many cases the number of paths it could show you were

          overwhelming, and by the time you dug down far enough, you were lost as to

          where you were.  Still, it might be worth an enhancement request.

           

          Very large apps do seem to blow up the Profiler.  Hopefully you've used best

          practices and modularized the app so you can easily disable code not needed

          to investigate this particular leak.  That will reduce the amount of data

          the Profiler has to consume and it will be more stable and fast.

           

          By disabling code, you will hopefully be able to narrow down the candidates

          to a few and inspect them more carefully.

           

          Also, if you are using AIR, it has a bug where it does not show listeners to

          some flash.desktop class instances.

          • 2. Re: Zero object reference paths in profiler
            Aaronius9er9er Level 1

            Thanks for the tip on FB3.  I loaded it up in FB3 and indeed it does show some recursion action going on.  Everything it shows in the references to UIPage should be contained within the UIPage and therefore they should all be gc'd together.  I've looked through a number of the children and related objects but see nothing outside of the UIPage (the parent wrapper) that is touching anything inside UIPage or its children.  Removing/commenting out portions of UIPage to pinpoint the problem is quite difficult and frankly may not be worth our time.  Pointers on where to go next would be much appreciated, but I understand there isn't much to go off of.

             

            (BTW, is it just me or is FB3's profiler faster and more stable? No java heap errors.)

            • 3. Re: Zero object reference paths in profiler
              Aaronius9er9er Level 1

              [removed comment]

               

              Message was edited by: Aaronius9er9er

              • 4. Re: Zero object reference paths in profiler
                Flex harUI Adobe Employee

                FB3 profiler uses less heap and responds faster because it isn't trying to

                find circular paths, but FB4 saves me more time because I don't have to look

                at those circular paths.

                 

                The screen shot shows that there are lots of paths to investigate.  One

                trick you might try is calling removeAllChildren when you're done with a

                UIPage and see if the UIPage then goes away.  If it does, then it is one of

                the children.  If not, start looking at the non-children sub-objects.