Author Topic: Memory leak  (Read 3904 times)

0 Members and 1 Guest are viewing this topic.

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Memory leak
« on: May 27, 2016, 07:06:52 AM »
0
I am curious if anybody else has this issue. When i run a certain lumberjacking script it always causes a memory error about five hours into it. I recently watched the task manager as the script ran and every single time the script recalled the memory for uo.exe usage went up a bit. Is there a way to avoid this slow drainage of memory through the script itself? I paused the script and just let character sit still and well the usage never dropped at all. Does this happen to anyone else and has anyone ever been able to find a way to slow this down?
If this has been posted about before I do apologize...I couldnt seem to find anyone else really having the same issue.

Offline TrailMyx

  • Personal Scripter to Lord British
  • Administrator
  • *
  • *
  • Posts: 13068
  • Activity:
    13.6%
  • Reputation Power: 151
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Jesse
  • Respect: +19
  • Referrals: 30
    • View Profile
    • ScriptUO
Re: Memory leak
« Reply #1 on: May 27, 2016, 08:22:26 AM »
0
Which script are you using?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Memory leak
« Reply #2 on: May 27, 2016, 06:16:57 PM »
0
mwinc lumberjack

Offline TrailMyx

  • Personal Scripter to Lord British
  • Administrator
  • *
  • *
  • Posts: 13068
  • Activity:
    13.6%
  • Reputation Power: 151
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Jesse
  • Respect: +19
  • Referrals: 30
    • View Profile
    • ScriptUO
Re: Memory leak
« Reply #3 on: May 27, 2016, 06:35:33 PM »
0
Right before you start, do a dump of the memory (Tools/VarDump).  Then let it run for a while and check how large the variable list gets.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Memory leak
« Reply #4 on: May 27, 2016, 06:56:42 PM »
0
ok will do...Thanks TM

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Memory leak
« Reply #5 on: May 27, 2016, 07:25:35 PM »
0
Should I post it after? So that you can look at it and maybe tip me off as to what i need to look at? I have some basic abilities and would love to add more...... I want to be a Jedi!

Offline TrailMyx

  • Personal Scripter to Lord British
  • Administrator
  • *
  • *
  • Posts: 13068
  • Activity:
    13.6%
  • Reputation Power: 151
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Jesse
  • Respect: +19
  • Referrals: 30
    • View Profile
    • ScriptUO
Re: Memory leak
« Reply #6 on: May 27, 2016, 07:28:06 PM »
0
Should I post it after? So that you can look at it and maybe tip me off as to what i need to look at? I have some basic abilities and would love to add more...... I want to be a Jedi!

Na, just see if it grows a bunch.  If so, then the leak is due to the script itself.  If it doesn't grow, then the problem is deeper in EUO somewhere.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Memory leak
« Reply #7 on: May 27, 2016, 07:57:50 PM »
0
I assume by grow you mean gets longer?(scroll and scroll and scroll) I never used this feature before...lol

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Memory leak
« Reply #8 on: May 27, 2016, 08:56:20 PM »
0
Well by removing the menu aspect of the script I seemed to have decreased the time it takes to run me out of memory....hardcore run is in order...I did leave the timer part of the menu active just for ease of seeing how long it runs before....DOOM OOM error

Offline Crome969

  • RebirthUO - Developer
  • Elite
  • *
  • *
  • Posts: 2064
  • Activity:
    2.4%
  • Reputation Power: 24
  • Crome969 might someday be someone...Crome969 might someday be someone...Crome969 might someday be someone...Crome969 might someday be someone...
  • Gender: Male
  • StealthUO - Developer
  • Respect: 0
  • Referrals: 9
    • View Profile
    • RebirthUO - UO Freeshard
Re: Memory leak
« Reply #9 on: May 28, 2016, 12:30:21 AM »
0
EasyUO is written in Delphi and delphi has no support of a Garbagecollector. Depending how the datamanagement is solved it can be, that most script data is kept on memory until you restart easyuo.
That ofc means that you can go out of memory the more you script, because the non required data is not flushed.

Offline gruntmanTopic starter

  • Full Member
  • ***
  • Posts: 122
  • Activity:
    0%
  • Reputation Power: 1
  • gruntman has no influence.
  • Gender: Male
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Memory leak
« Reply #10 on: May 28, 2016, 09:21:59 AM »
0
EasyUO is written in Delphi and delphi has no support of a Garbagecollector. Depending how the datamanagement is solved it can be, that most script data is kept on memory until you restart easyuo.
That ofc means that you can go out of memory the more you script, because the non required data is not flushed.

Thanks Crome!!  I think I kind of get it.

Offline Gemviper

  • Sr. Member
  • *
  • Posts: 456
  • Activity:
    3.8%
  • Reputation Power: 0
  • Gemviper hides in shadows.
  • Respect: +1
  • Referrals: 1
    • View Profile
Re: Memory leak
« Reply #11 on: January 20, 2017, 07:38:50 AM »
0
Is there an easy way to do the same var check with Stealth? I've got a similar memory leak issue after a few hours too.

Offline Crome969

  • RebirthUO - Developer
  • Elite
  • *
  • *
  • Posts: 2064
  • Activity:
    2.4%
  • Reputation Power: 24
  • Crome969 might someday be someone...Crome969 might someday be someone...Crome969 might someday be someone...Crome969 might someday be someone...
  • Gender: Male
  • StealthUO - Developer
  • Respect: 0
  • Referrals: 9
    • View Profile
    • RebirthUO - UO Freeshard
Re: Memory leak
« Reply #12 on: January 20, 2017, 08:24:37 AM »
0
Is there an easy way to do the same var check with Stealth? I've got a similar memory leak issue after a few hours too.
Sorry that i did not replied to you before, in Stealth there is no real way to check memoryleaks. But you can avoid leakages on Objects, if you clear the ignorepathlist and the ignoreItem stuff.

Whenever you store data to stealth internals, stealth not frequently delete it. So you can reduce the amount of data by removing those lists yourself. In ScriptSDK i kinda did that automaticly on scanner content. You can define the garbage collector and it will clear some stuff every 15 minutes by default.

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2511
  • Activity:
    2.2%
  • Reputation Power: 31
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +4
  • Referrals: 1
    • View Profile
Re: Memory leak
« Reply #13 on: January 23, 2017, 12:57:55 AM »
0
If your memory leak is in the Client.exe then it shouldn't be an issue with the script itself. In the final generation of the script I had to code in for it to close the client and open a new one every 8 hours. I've seen it last as long as 216 hours straight without crashing. The core of the script is still the same though beyond that modification. Definitely something wonky with scripts that recall at that rate when crossing multiple server lines.
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Tags: