mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
for over a month i have been trying to find the reason my new script locked up the entire windows menu system at apparent random time periods.
checking memory usage for mirc i noticed that every time i used the nick menu the memory use went up, and didnt drop.
running a clean install of mIRC6.03 I used the nick menu and had the following stats for memory usage :-
7,768k, 7808k, 7824k, 7840k, 7880k, 7888k, 7892k, 7900k, 7924k, 7928k, 7932k, 7952k, 8024k
another run produced :-
10,048k, 10,076k, 10,108k, 10,112k, 10,116k, 10,120k......11,068k still climbing
while not a huge climb the trend is to use more and more ram without releasing it.
could this be what is causing a total lockup of mirc menus and the entire xp menu system, up to task manager being unavailable, closing mIRC resolves the problem and the pc functions normally untill mIRC is used again.
any ideas/help on this one would be appreciated, its been driving me crazy

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Do you have any custom popups for the nick menu? And if you do, can you include them here? Using the standard popups that are included with mIRC, I can't reproduce the memory leak.

Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
the figures above were with a clean install of mirc6.03 running under XP Pro + SP1
several other people have reproduced the same thing both in plain mirc and other scripts.


Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I was using mIRC 6.03 on XP Pro and I also tried it on XP Home, and I just now tried it on ME. Works fine for me.

Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
glad it works for you, however that doesnt help me one bit.

as i said the figures above are from a fresh instal of 6.03, several other people have reproduced it. the ram usage speaks for itself.

i am not saying its a mirc problem, could well be a XP problem, but only mirc cuases it and closing mirc resolves it.

apart from stating these facts i am no further ahead in working out why than i was a month ago. confused

Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
further to previous postings, minimising mIRC6.03 causes a huge chunk of ram to be freed.

maybe this will give a pointer shocked

Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Did you think that purhaps it could be because the buffer is increasing while you're testing for what you think is a nicklist bug? This would cause the memory usage to increase and keep on increasing while you're testing for something else... Try joining a channel where you are the only person, do not join any other channels or open any query windows, etc. etc., then see if it happens. Just an idea...


- Jason
Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
thanks lammkott,

tried what you suggested and got these results

on a empty chan with no other windows open (other than status), using the nick menu gives 5,452k, 5,636k, 5,760k, 5,892k, 5,988k, 6,124k, 6,428k, 6,700k ............... 7,608k, then the menu system in mIRC 6.03 and the entire XP menu system locks up until mIRC is closed.

think i'll go back to 6.01 for now, this is driving me even more nuts than normal.

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
If all menus in XP lock up, then the problem is not in mIRC, because mIRC can't control that. If mIRC did something that would effect other programs like that, Windows would promptly terminate mIRC, so if mIRC continues to run, it means the problem most likely lies in Windows. The only suggestions I can think of are first of all, are you using something like StyleXP or some other 3rd party theme engine for XP? Then that particular program might have a bug, try disabling it and see if it still happens. Also, you may be experiencing the now infamous XP SP1 performance hits. Not much you can do about that though since MS refuses to admit the problem even exists. They have fixed some causes of it, but not all. I'd recommend you go to Windowsupdate and download all updates that are available if you haven't already.

Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
no themes or theme managers and i already have all the updates.

if it is an XP error (a def. possibility) only mirc 6.03 reacts to it, no other program i have tried reproduces the error on either my pc or various friends, which would suggest an incompatability with mirc and xp.

you cant expect MS to write operating systems to suite programes written by other people, it works the other way around grin

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yeah of course it works the other way around, problem is MS likes to "hide" Windows "features" from programmers so that we never know quite what is gonna happen when we write a program smile

Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I have a laptop with XP Home and a desktop with XP Professional. mIRC doesn't freeze menus or anything else in either version on my network. Win 2000 Professional and Win 2000 Server are a safe bet too, once again no problems. There must be something unique about your install that is causing the problem. Perhaps a hard disc with errors or a corrupt install of XP.

Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
Hello, when you are using a clean mirc's install do you load any menu addon dll based?
Dlls do that, not mirc.
I don't have any mem increase when using the nick menu.

Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
nope, no addons or dlls, it wouldnt be a clean install then

Joined: Aug 2003
Posts: 1
B
Mostly harmless
Offline
Mostly harmless
B
Joined: Aug 2003
Posts: 1
I am here to add more information on this memory leak. Build one damn near industry standard computer and install Windows XP SP1. Install a clean version of mIRC. Then load a couple very large popup files that run from the *remote* section. I used 3 mrc files that were about 20k each. I used nicklist popups to produce this memory leak, but it seems that menu-bar popups will also do the same. Once you have the pop-ups installed and running from the remote directory, right click back and forth from the channel window to the nicklist while watching the memory usage through the Windows XP Task Manager. In my case the memory usage was jumping about 100k for every click on the nick list. It may take a while for this error to occur but it will happen within about 40 clicks.

My system:
Abit KX-7R motherboard with an AthlonXP 1900++
512MB RAM
Geforce TI 4200 w/ detonator 41.09 drivers
Soundblaster Audigy (newest drivers)
Generic Ethernet Card (windows WHQL drivers)
Windows XP SP1, no prior updates

The memory leak eventually reaches a point where windows GUI interface no longer allows new windows to be created. Certain windows that have been cached don't seem to be effected (example: If the task manager was running and minimized prior to the GUI lockup, it will still restore, in the same light, the root of the start menu will open *occasionaly*)

The only current workaround that I have been able to come up with is to run most, if not all, of the pop-ups from the actuall pop-up section as opposed to the remote section. I imagine that if only a small amount of the popups were run from the remotes section the leak would be so small it could easily go by undetected.

I also noticed that the amount of memory used by mIRC fluctates greatly when minimized and restored. I imagine this is some sort of feature in Windows or mIRC. I have not determined whether minimizing and restoring clears the memory previously leaked or not. If it works that way the leak would be even harder to detect considering most people minimize programs all the time.

If you made it this far in my enormous post I thank you. Enjoy your day and I hope this sheds more light on how this error was reproduced. IcE^MaN

Joined: Dec 2002
Posts: 17
KyD Offline
Pikka bird
Offline
Pikka bird
Joined: Dec 2002
Posts: 17
the problem is in the way mirc creates/destroys overlapping popups.

put the following in a remote:
Code:
menu nicklist {
  a
}
menu nicklist {
  a
  .a
  ..a
  ...a
  ....a
  .....a : b
}


when a popup is destroyed mirc only releases the submenu's visible from where the menu is first declared. later (dynamically) added submenu's are not cleaned up.

after a few hundred clicks (depending on the number of uncleaned submenu's per click) the popup will not show up anymore. window creation will fail etc.

one can see why. popupmenus/windows require user objects. in winxp/nt/2k, adjust the task manager so that it shows the user objects used by processes. note that the number of user objects in use by mirc increases by 5 (the number of not-destroyed submenus) every time you click the nicklist with the popup menu above.

there is no work around other than not to use dynamic popups, that is, don't add entries to the same submenu multiple times. just to clarify:

the following popup has a memory leak:
Code:
menu nicklist {
  a
  .b : c
  d
}
menu nicklist {
  a
  .g : h
}

because the menu 'a' was declared before.

whereas the following popup works fine:
Code:
menu nicklist {
  a
  .b : c
}
menu nicklist {
  b
  .a : c
}

because it adds entries to a new menu 'b'.

Joined: Jul 2003
Posts: 37
P
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jul 2003
Posts: 37
thats kind of what i figured (not so technically tho cool)

i moved all menu structures from the remotes to the popups, which means theres no more dynamic meus, only one defined for each popup section.

everything ran fine all day when i hardly used it, this evening when i started using menus it locked up as before.

so not using dynamic popups doesnt appear to have helped.

any further ideas qould be gratfully received (PLEASE) confused

Joined: Aug 2003
Posts: 16
A
Pikka bird
Offline
Pikka bird
A
Joined: Aug 2003
Posts: 16
Finally!!!!
An answer that makes sense.
It may be that use of complex custom dialogs may also exhibit the same memory leakage, due to the way mirc creates/destroys windows.
I just looked at my running mirc (6.03) and it has 336 "USER Objects" in Task Manager (Windows 2000 SP4).
I right click in a channel to get the popup menu, and it jumps to 407 objects, clicking off the menu, it drops back down to 336.
Selecting one of the items to open my "complex dialog", it jumps to 574 USER Objects.
Now I look at ram usage....
I minimize mirc, then restore it, then wait for it to settle out.
(changes by less than 15K/sec, due to being on multiple networks and multiple channels)......
Right click in channel to get menu, Ram usage goes up 1 meg.
Right click off to make the menu go away..... Ram Usage does not recover.
Right click on channel to get menu, negligible change in Ram, select item to open my dialog.... Ram Usage goes up 4 megs
Close dialog, ram usage does not recover, even though the USER Objects returns to 336 as before.
Subsequent opening of my dialog cause Ram usage to go up 200K each time, which does not recover until I minimize mirc.
Using other software (TaskInfo 2003), I see that "In Ram KB" is reduced when you minimize mirc, but "Private KB" does not change one bit.
Bottom line, something in mirc causes it to use more ram when you open menus and dialogs, and this ram is not being released when those items are closed.
Good job on your explanation.

Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ive noticed another memory related issue ..... following along with thipopup menus... ever click of a menu increases my memory usage by atleast 25k ..... and it never releases that memory. im not too worried about memory usage as i have xp pro 1.65ghtz cpu with 1024mb of ram ... also doubled the paging file memory on a secondary drive. ive also tested this on a totally clean mirc install. it does release the memory used when u minimize the case of mirc your running. I would have to say the only workaround that can be thought of is when your not actively chatting and just sitting idle it would be wise to minimize mirc. on my tested mirc i used an instance that was up not minimized for over 6 hours then started clicking on menus and opening dialogs..... till it reached 15mb of memory usage. let it sit there for an hour and it climbed minimally while idle... then minimized it and it freed its usage to only using 3 mb. maximixed it and it was utilizing slightly over 5. hopefully this can help work some thoughts and ideas about as to how to find and debug


D3m0nnet.com

Link Copied to Clipboard