This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Silly question

Old posts that have not been replied to for several years.
Locked
Z
Zsac
Voice
Posts: 15
Joined: Sun Nov 17, 2002 10:12 pm

Silly question

Post by Zsac »

This might sound silly, but is there a way to induce a memory leak through tcl scripts?

my eggdrop continually consumes memory... and after a good period of time it'll render my machine useless w/o a reboot. i'm just wondering if this could be a problem with my bad scripting habits. thx.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Yes, I have seen this happen with heavy use of arrays in Tcl, especially when the data in the array is shared data (also in a list or separate variables). It seems like a bug in Tcl, as everything in the script was fine.

Of course it never froze my computer. You must be on windows hehe.
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Post by Weirdo »

win(98)drop :)
Z
Zsac
Voice
Posts: 15
Joined: Sun Nov 17, 2002 10:12 pm

Post by Zsac »

thats awful... have you seen better results in the new versions of TCL?

(i'm running my drop on a 2k box)
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

2 questions.

Are you sure it's Tcl? Is it reproducable when Tcl scripts are removed? Can you pin-point it down to one scripts?

Could it be eggdrop? While Tcl could be a legitimate source of the problem, it may well be that eggdrop is infact causing the mem-leak. Have you been able to prove this wrong?
Z
Zsac
Voice
Posts: 15
Joined: Sun Nov 17, 2002 10:12 pm

Post by Zsac »

i'm not sure its TCL, but i am sure its the eggdrop. and i assume its my scripts because i keep my modules and scripts (other than mine) to a minimum... but i do have quite a few scripts of my own. which leads me to think its something that i'm doing. thats why i was wondering if there were any scripting bits that i should know of in trying to prevent my leak.

but yea it could be something else entirely :roll: although i wouldn't know what.

if i were to pinpoint the script how would i go about that? would i just remove it from my conf file and wait a couple days? or is there something a little more to the point?

thxthx
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Basicaly yes.

Though you would have to kill the bot, to make sure that any components of the script being unloaded are banished from memory.

My advice, is to pick on any scripts that involve in reading data from files, or via a HTTP request (web-download).

These are a primary cause of memory-leaks. They occur when data downloaded, data has been read or when a socket/file isn't closed/cleaned up. Memory will continue to be used untill it is freed.
Locked