mIRC Homepage
Posted By: vaag GDI resource leak - 21/11/04 03:13 PM
It kinda surprised me noone else has ever noticed this, but i couldn't find any other reports about this in the forum, so here goes nothing:

I noticed that my mirc got laggier and laggier every day it was running (uninterrupted by restarts). After a while of experimenting i discovered the following:

1) Open up an application to measure the number of GDI objects used per application - For example TaskInfo2003 or the windows taskmanager (you'll have to enable showing GDi-objects first in the view -> column menu)

2) Go to your mirc (i've been testing on the latest mirc version, clean install)

3) Copy some text from a status/channel window to your clipboard (you have to copy from a channel/pm/whatever window by selecting the text and releasing your mouse... copying from for example the editbox wont do)

--> every time you copy a piece of text mirc creates a new GDI object which never get destroyed untill the window you've copied from is closed!

This might seem like a stupid small bug to some people, but if you're running mirc 24/7, on a bit older computer, you will start to notice this pretty fast


I haven't been able to figure out the exact source, but I'm suspecting this isnt the only part of Mirc leaking GDI objects.. if I let mirc run for a few days, then close all opened networks/windows/etc, the number of GDI objects used is always alot higher then after a fresh start.

I hope you people can do something with this report.. and thanks in advance for fixing this in feature versions smile
Posted By: qwerty Re: GDI resource leak - 21/11/04 04:18 PM
Confirmed on Win XP Pro SP2.
Posted By: Mentality Re: GDI resource leak - 21/11/04 05:15 PM
There have actually been a number of posts regarding mIRC getting "laggier" or freezing when left to run for long periods of time. A cure/reason hadn't been found, but perhaps you've found out why it occurs smile

Also confirmed, XP Home SP2.

Regards,
Posted By: Aeron Re: GDI resource leak - 21/11/04 10:20 PM
Confirmed WinXP-Home SP1
Posted By: zack Re: GDI resource leak - 22/11/04 12:37 AM
Definitely reproduced here. And god darn it, I have this habit of randomly copying text from the buffer when I'm bored... no wonder my mIRC has been running excessively slow over time.

Thanks for this!

Edit: Win XP Home SP2
Posted By: HorseC Re: GDI resource leak - 22/11/04 05:24 AM
great find!!!

"never get destroyed untill the window you've copied from is closed!"

If its a channel window, would a periodic /hop $chan clean up the mess? (have not tested) but this might be a work around till a fix comes out.
Posted By: Armada Re: GDI resource leak - 22/11/04 07:34 AM
Confirmed
XP Home SP1
XP Home SP2
XP Pro SP1
XP Pro SP2 (Different See Below)
Windows Server 2003 Standard
Sorry bordem and access to all that might as well I thought


:Below
I started at "94" I copied all that was in the window of a chat room(no color codes this try) and it went to 97. 2 seconds later drop back to 94. Then when I tried color codes it jumped to 99 and about 2 seconds later dropped off to 97.
Posted By: tontito Re: GDI resource leak - 22/11/04 02:49 PM
good job and excelent bug report m8!
Posted By: Debug Re: GDI resource leak - 22/11/04 04:03 PM
Confirmed here.

Windows XP SP1
Windows XP SP2
Windows ME
Posted By: burek Re: GDI resource leak - 24/11/04 07:42 AM
Quote:
great find!!!

"never get destroyed untill the window you've copied from is closed!"

If its a channel window, would a periodic /hop $chan clean up the mess? (have not tested) but this might be a work around till a fix comes out.


/hop won't change anything..
I've tried.. Just closing the window does the job..
Posted By: zeroz Re: GDI resource leak - 18/02/05 03:50 AM
Yes, great find indeed. I run a bit older machine and over time I've noticed it to lag horridly and slow down... this is most likely why.. hopefully a new version will come out soon and fix these leaks.
Posted By: mavhc Re: GDI resource leak - 10/06/05 01:26 PM
Excellent find, probably the most important bug for people who run mirc 24/7, I've been running it for 84 days now. Incredibly stable.

GDI objects are the bane of the power user, stupid Windows (probably pre) 3.0 limitation that's never been fixed. Maybe apps for Longhorn will help.
Posted By: ChosenOne Re: GDI resource leak - 20/11/05 11:52 AM
Quote:
I have this habit of randomly copying text from the buffer when I'm bored...

Same goes for me smile
Posted By: qwerty Re: GDI resource leak - 20/11/05 01:18 PM
I can already see dictionaries pointing at this post for the updated definition of "WTF"
Posted By: zeroz Re: GDI resource leak - 04/04/06 12:14 PM
It's been a little over a year and a new mIRC version has been released, inside the release notes Khaled mentions:

51.Fixed mark/copy clipboard memory leak bugs.

Cheers, it looks like my mIRC will no longer hog all my resources within 2 weeks smile
© mIRC Discussion Forums