Results 1 to 19 of 19

Thread: memory leak

  1. #1
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default memory leak

    now im sure this is not to do with the script, but there is a memory leak, so it could be in smart, simba or reflection (most likely reflection)

    im using Homes Essence Miner
    i have 4GB RAM
    and core i5 processor

    i have been watching the memory and processor usage of simba and during the mining the processor goes up to about 50% (compared to about 15~20% for the rest of the script (this is probably the script fault)) and when it banks the essence the ram usage goes up about 200kB~2MB

    ~shut
    Last edited by Shuttleu; 08-02-2011 at 12:23 PM.

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Could be a reflection problem?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    During just the mining? That pretty much says right there it's a Reflection/Script issue. I haven't seen the script, but I assume it's constantly checking your player's animation while mining? Or does it constantly check your Inventory Count?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  5. #5
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    During just the mining? That pretty much says right there it's a Reflection/Script issue. I haven't seen the script, but I assume it's constantly checking your player's animation while mining? Or does it constantly check your Inventory Count?
    its constantly checking the animation, but what im more worried about is the 200kB~2MB every bank

    ~shut

  6. #6
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    its constantly checking the animation, but what im more worried about is the 200kB~2MB every bank

    ~shut
    I don't quite understand, before you said during the mining is when your memory usage rocketed, but also when you're banking? Which part of the 'banking process' is your memory being used up?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Just noticed that :S Wtf.


    Simba Code:
    procedure MineEss;
    var C: Integer;
      Essence: TRSObject;
    begin
      if not LoggedIn then Exit;
      C := 0;
      R_Flag;
      FindEssence;
      while not R_InvFull do begin
        if not LoggedIn then Exit;
        if not R_WaitToAnimate(2000) then
          if not FindEssence() then Inc(C);
        RRandoms;
        AntiBan;
        if C > 2 then
        begin
          SDebug('    We Have Failed To Find Essence Over 3 Times, Trying To Re-Locate Correct Position');
          if WalkToEss then begin
            SDebug('    Re-Locating Successfull');
            C := 0;
          end;
        end;
        if C > RandomRange(10, 15) then LogOut;
      end;
      SDebug('    Inventory Full');
    end;


    Edit: It's because of R_WaitToAnimate;



    ~Home
    Last edited by Home; 08-02-2011 at 12:14 PM.

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    I don't quite understand, before you said during the mining is when your memory usage rocketed, but also when you're banking? Which part of the 'banking process' is your memory being used up?
    the CPU rockets during mining
    the RAM increases during banking

    i cant tell when now because it seems to have capped itself at aroung 500MB

    ~shut

  9. #9
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Home, place a Wait(16) in that loop. It will ease the processor usage significantly.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  10. #10
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Home, place a Wait(16) in that loop. It will ease the processor usage significantly.
    Ok. Will do thanks for the tip !


    ~Home

  11. #11
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  12. #12
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    the script has finished and smart is closed, but it has not freed the ram back to the system

    ~shut
    Close Simba?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  13. #13
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  14. #14
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    that frees the ram, but it should free it when the objects are destroyed (when the script is stopped or smart is closed)

    ~shut
    I agree with this.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  15. #15
    Join Date
    Oct 2006
    Posts
    1,211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Also makes a difference to know if it's reflection 1 or 2. I assume home's script uses reflection 1 aye?
    Extinct.

    Formally known as Drags111.

  16. #16
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    It's R2.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  17. #17
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    If it is freed when Simba is closed, it could be an issue with Simba not with R2. Perhaps SMART is holding memory "hostage" for lack of a better term until its parent (Simba) frees it.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  18. #18
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    If it is freed when Simba is closed, it could be an issue with Simba not with R2. Perhaps SMART is holding memory "hostage" for lack of a better term until its parent (Simba) frees it.
    my main problem with that is if you are like me where when the script ends you start another script and it creates another smart (assuming you close smart or change world in the script) and uses more ram (whether you close smart or not)

    ~shut

  19. #19
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Shuttleu View Post
    my main problem with that is if you are like me where when the script ends you start another script and it creates another smart (assuming you close smart or change world in the script) and uses more ram (whether you close smart or not)

    ~shut
    same thing i do
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •