mIRC Homepage

mIRC Enourmous 7.25 memory leak

Posted By: T4K

mIRC Enourmous 7.25 memory leak - 01/09/12 10:17 PM



I'm running a few scripts on it. Since 7.25 came out... I upgraded and the ram spike is huge. Why is that? I've woken up sometimes in the morning and it's around 1.7Gigs usage. I mean the computer I'm running it on has 24 gigs of ram. But regardless that's a lot. If you need any information I'll be glad to provide anything you guys ask.
Posted By: drum

Re: mIRC Enourmous 7.25 memory leak - 01/09/12 10:26 PM

Please type the following in mIRC and copy the results here:

//echo -a $os $version $md5($mircexe,2) $file($mircexe).sig $script(0) $dll(0) $com(0)
Posted By: T4K

Re: mIRC Enourmous 7.25 memory leak - 01/09/12 10:40 PM

2008R2 7.25 cfd7965dd048060f4dfbd49cf5a8a16b ok 23 0 0
Posted By: drum

Re: mIRC Enourmous 7.25 memory leak - 01/09/12 10:51 PM

You have quite a few scripts loaded. We can't really tell if it's the script(s) that have the memory leak or mIRC itself. Try turning scripts off (by typing /remote off), restart mIRC, then see if the memory usage still grows. You can type /remote on to enable them again later.
Posted By: T4K

Re: mIRC Enourmous 7.25 memory leak - 01/09/12 11:54 PM

That irc client serves as a bot. I can unload the ones that I don't use which I have and it still has a memory leak of some sort. I got it all the way down to about 8 scripts.
Posted By: argv0

Re: mIRC Enourmous 7.25 memory leak - 01/09/12 11:57 PM

Well, unload all the scripts and confirm that mIRC is not spiking to that much RAM usage without your bot. Then you can be sure that it's the bot that is faulty, and inform the author to look at it.
Posted By: tontito

Re: mIRC Enourmous 7.25 memory leak - 03/09/12 10:46 AM

I will also upgrade by bot to see it i notice something spiking
Posted By: pball

Re: mIRC Enourmous 7.25 memory leak - 03/09/12 12:54 PM

Just chiming in with my experience. I have two 7.25 mircs running one with 27 and the other 42 scripts. The first being my personal and the second a channel bot. Both have been running for 3wks 13hrs 12mins and are using 34MB and 64MB respectively.

So I'd have to agree with someone else it's probably a script causing the leak.
Posted By: KindOne

Re: mIRC Enourmous 7.25 memory leak - 03/09/12 09:42 PM

Lets try to narrow down this issue.

Check for hash tables.
//var %x $hget(0) | while %x { echo -ag $hget(%x) $hget(%x,0).item - $hget(%x).size | dec %x }

Uptime.
//echo -ag mIRC: $uptime(mirc,2) - Computer: $uptime(system,2)


Tools -> Options -> Other -> Windows buffer: ???? lines.
What is the number?
Posted By: Riamus2

Re: mIRC Enourmous 7.25 memory leak - 04/09/12 02:00 AM

Uptime shouldn't be the cause, but just shows how long whatever is causing the problem has had to increase memory usage. Under normal circumstances, memory usage shouldn't change no matter how long mIRC's running. I've left mIRC running for just short of 8 weeks without the memory usage ever hitting 100MB, let alone over a GB. And that's while running Invision, which is a pretty big script.

The most likely causes are hash tables, sockets, and perhaps window buffers. DLLs and COM can also cause this, but the pasted results show that there are 0 of both of those items in use.

In the end, the most likely cause is a script that is not properly closing *something* and is opening many of that *something* until a lot of memory is being used.
Posted By: koitsu

Re: mIRC Enourmous 7.25 memory leak - 04/09/12 03:34 AM

I would strongly suggest using VMMap.exe from SysInternals/Microsoft, pick your existing/running mirc32.exe process (when its bloated), and provide a screenshot of the results. Please be sure to resize the window horizontally so that all the columns in the top section of the program (e.g. Type, Size, Committed, etc.) are visible.

The answer as to what's allocated all the memory may or may not be easily determined from use of this program, however. Heap and stack allocations are "vague", meaning there is no easy way to say "this specific script/yadda yadda is causing this allocation problem". However, if your scripts rely on DLLs, there is a good chance that DLL will show up in the list of allocations near the bottom under "Details" (have fun scrolling through all the data).
Posted By: argv0

Re: mIRC Enourmous 7.25 memory leak - 04/09/12 06:59 AM

Originally Posted By: Riamus2
Uptime shouldn't be the cause,


I don't think anyone was suggesting that uptime was the cause, but if the script is leaking data as was suggested, uptime is definitely going to be a factor. It's therefore useful to show uptime for reference. If the footprint is 800mb only 30 minutes into running the program, the behaviour might be a feature of the script rather than a bug (i.e. it loads some large database into memory instead of reading off disk). If it takes a week to get to that point, the script is likely storing more data into memory over time at a fast rate, and it's possible that the author didn't take into account long running processes or clearing out old memory.

Memory usage shouldn't change no matter how long mIRC is running, but a script can easily make memory usage increase over time. Consider a script that logs every line of text to a hash table-- eventually you will grow a large memory footprint, though it would likely be on the order of years, not months. Now imagine a poorly written script that stores that same line 5 times in different tables, or has some kind of exponential data growth. Now we're talking weeks/months instead of years.

By the way, just as a note, we shouldn't rule out a leak in mIRC. It's completely possible that some obscure order of commands could cause mIRC to allocate memory and lose it rather than free it when the script ends; this bug could have been exposed by the script.
Posted By: tontito

Re: mIRC Enourmous 7.25 memory leak - 05/09/12 01:16 PM

No memory leaks here in more then 2 days running (using 42MB).
© 2021 mIRC Discussion Forums