mIRC Home    About    Download    Register    News    Help

Print Thread
GDI resource leak #103478 21/11/04 03:13 PM
Joined: Nov 2004
Posts: 1
V
vaag Offline OP
Mostly harmless
OP Offline
Mostly harmless
V
Joined: Nov 2004
Posts: 1
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

Re: GDI resource leak #103479 21/11/04 04:18 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Confirmed on Win XP Pro SP2.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: GDI resource leak #103480 21/11/04 05:15 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
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,


Mentality/Chris
Re: GDI resource leak #103481 21/11/04 10:20 PM
Joined: Dec 2003
Posts: 61
A
Aeron Offline
Babel fish
Offline
Babel fish
A
Joined: Dec 2003
Posts: 61
Confirmed WinXP-Home SP1

Re: GDI resource leak #103482 22/11/04 12:37 AM
Joined: Dec 2002
Posts: 266
Z
zack Offline
Fjord artisan
Offline
Fjord artisan
Z
Joined: Dec 2002
Posts: 266
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

Last edited by zack; 22/11/04 12:37 AM.

You won't like it when I get angry.
Re: GDI resource leak #103483 22/11/04 05:24 AM
Joined: Mar 2004
Posts: 526
HorseC Offline
Fjord artisan
Offline
Fjord artisan
Joined: Mar 2004
Posts: 526
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.

Re: GDI resource leak #103484 22/11/04 07:34 AM
Joined: Mar 2004
Posts: 540
A
Armada Offline
Fjord artisan
Offline
Fjord artisan
A
Joined: Mar 2004
Posts: 540
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.

Last edited by Armada; 22/11/04 07:45 AM.
Re: GDI resource leak #103485 22/11/04 02:49 PM
Joined: Feb 2003
Posts: 307
T
tontito Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
good job and excelent bug report m8!

Re: GDI resource leak #103486 22/11/04 04:03 PM
Joined: Jul 2004
Posts: 150
D
Debug Offline
Vogon poet
Offline
Vogon poet
D
Joined: Jul 2004
Posts: 150
Confirmed here.

Windows XP SP1
Windows XP SP2
Windows ME

Re: GDI resource leak #103487 24/11/04 07:42 AM
Joined: Oct 2004
Posts: 32
burek Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2004
Posts: 32
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..

Re: GDI resource leak #103488 18/02/05 03:50 AM
Joined: Feb 2005
Posts: 7
Z
zeroz Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Z
Joined: Feb 2005
Posts: 7
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.

Re: GDI resource leak #103489 10/06/05 01:26 PM
Joined: Jun 2005
Posts: 1
M
mavhc Offline
Mostly harmless
Offline
Mostly harmless
M
Joined: Jun 2005
Posts: 1
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.

Re: GDI resource leak #103490 20/11/05 11:52 AM
Joined: Aug 2003
Posts: 44
C
ChosenOne Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: Aug 2003
Posts: 44
Quote:
I have this habit of randomly copying text from the buffer when I'm bored...

Same goes for me smile

Re: GDI resource leak #103491 20/11/05 01:18 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
I can already see dictionaries pointing at this post for the updated definition of "WTF"


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: GDI resource leak #103492 04/04/06 12:14 PM
Joined: Feb 2005
Posts: 7
Z
zeroz Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Z
Joined: Feb 2005
Posts: 7
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