PDA

View Full Version : Memory Leck On Win 2K



davepermen
03-27-2001, 05:38 AM
every time i run an opengl application ( not important what one ) it takes me away bout 20mb ram.. no problem so far.. but when i close the program it just gives 16mb ram free again, so i'm loosing every time i run an opengl application 4mb ( 3.8 for more info http://www.opengl.org/discussion_boards/ubb/smile.gif )

i thought its my app.. but it isnt.. ( even q3 looses this damn 3.8.. )

i thought it is the driver.. but not important wich one i install ( official det3 or even 11.01.. ), no difference..

i thought it whas some setting in the driver, so i dis/enabled everything i got there in the driver settings.. no difference

so, what is left is the win2k, cause on win98 i hadn't the problem..

its terrible somehow to work with it.. cause when i code, i recompile and start my program bout every minute.. and even if i have 1024mb free virtual ram.. when i have filled up my real ram ( 128mb, 65 filled after booting.. ), i have to reboot cause nothing works anymore..

you can calculate yourself how much i have to reboot..

i'm happy for every idea to stopp the bug..

beavis
03-27-2001, 06:08 AM
bear in mind, that when your app runs and
accesses filesystem, the system will increase the file cache which isnt released when your app terminates. this memory is not lost; the system will reclaim it later if more physical memory is needed for apps. this is not a leak, just a normal behavior of the virtual memory manager...

davepermen
03-27-2001, 06:15 AM
i LOOOSE the mem, it dont come back after, and at the moment i have "filled" 128mb ram ( with taskmanager visible.. ), my hd is running fulltime cause it does not have any free ram anymore.. AND I SAID EVERY OPENGLPROGRAM, means i can use glut and just init it and close it and i loosed 3.8mb WICH I NEVER GET BACK!.. i can do a simple Win32 App with a wglMakeCurrent and this.. and i loose 3.8mb


EVERY TIME

and not just my app's, as described.. its just the most stressing there cause while coding i start my app very, very often..

beavis
03-27-2001, 06:17 AM
oops, didnt read till the end of your message; so basically, after running
your app many times in a row, the system
starts running very low on virtual mem?
maybe opengl/driver is not cleaning
up properly...

davepermen
03-27-2001, 06:18 AM
yeah, but its EVERY driver! ( i tried bout 10 yet.. officials leaked and betas, whatever.. dont work with any.. every time the same problems.. )

LordKronos
03-27-2001, 07:36 AM
This does sound strange. If I am reading the first post right, then you are saying if you run your program enough, it will fill all 1024MB of your swap file? If so, thats strange....

Did you run a virus check? In the Task Manager, on the "Performance" tab does your thread count or process count increase after every time you run the program? On the "Processes" tab, do you see the same exe listed 50 times? The symptoms are really indicitive of another process spawning in the background.

If no, look again in the "Processes" tab and see if any process has an incredibly high "Mem Usage".

davepermen
03-27-2001, 08:17 AM
just one time.. should i post some pics? somehow bad, cause to do so, i have to go near a crash http://www.opengl.org/discussion_boards/ubb/smile.gif

no, cronos.. it does not filll the virtual mem, just the real one ( 128mb ) and then win2k gets really instable and i normaly have to reboot..

what you mean, no the count of prozesses/threads whatever http://www.opengl.org/discussion_boards/ubb/smile.gif is always the same.. when i start, inc one, when i finish it, dec one.. when i start inc one when i finish dec one.. and just one time the exe

its a free installed win2k and i didnt did anything but starting an opengl app.. i dont think its a virus cause since i have win2k i had several reinstalls and always the same happens..

except if you say win2k is a virus, then yes, i have one http://www.opengl.org/discussion_boards/ubb/smile.gif

hm its really weird.. i cant see it, cause i can do a program wich dont use opengl wich allocates thousands of giga ram every second without deleting it and after closing the app it all gets free.. ( 3dsmax, for example, when i dont have opengl enabled http://www.opengl.org/discussion_boards/ubb/smile.gif ).. even when it crashes http://www.opengl.org/discussion_boards/ubb/smile.gif

just when i enable and disable opengl it eats up this little chunk ( not so little.. sometimes i have to reeboot every 15minutes.. when i have stress with registercombiners and i dont know why it looks like it has to i start my program bout 5 times a minute... and this no good.. )

its ****ing hell to work like that ...

hm i can try a new thing, perhaps it works even like this:

EnableGL( ){ .. wglMakeCurrent... etc ... }
DisableGL( ){ .. wglMakeCurrent(0,0) .. etc .. }

and then doing it in a loop.. 5 times.. should then have a memoryleck of 5*3.8 ~= 20 mb..

dslater
03-27-2001, 10:58 AM
Have you tried installing Win2K Service Pack 1?

davepermen
03-27-2001, 11:28 AM
yes, no difference..

Korval
03-27-2001, 12:25 PM
First of all, how long has this problem been going on? Is it recent?

You said that you were using a "free installed win2K". Did you mean 'fresh', as in a recent reinstall, or 'free', as in pirated? If the latter, there may be a virus in the copy of Win2K you have (some pirates have been known to do that).

Has anyone else using Win2K run into this problem? I'm using Win98, so I can't tell.

zed
03-27-2001, 01:26 PM
are you sure the programs have closed fully (look in task manager) sometimes i have this problem with win2000. the app closes, its not visable on the taskbar yet it hasnt closed fully. i then have to kill the process myself. also perhaps you need to update your motherboards drivers/bios. eg via boards have had problems in the past with agp cards

LordKronos
03-27-2001, 01:53 PM
Originally posted by Korval:
Has anyone else using Win2K run into this problem?

Nope, I've been running Win2K since the day it came out, and its been rock solid. I havent reinstalled it once, and in that whole time I've only been able to crash the OS twice. I've NEVER had to reboot midday for any reason other than installing software. I do shut it off each night, so its not like its been up for a year straight, but still...thats not too shabby.

Anyway, I have a Geforce2 GTS 64MB with the 6.18 drivers, and not a single problem. I just ran my own openGL app 15 times in a row, and each time I closed the app, my memory went back to within 1/2 MB of the what it was before the first time I ran it.

davepermen
03-28-2001, 02:01 AM
hm.. damn.. i try this 6.18, too http://www.opengl.org/discussion_boards/ubb/smile.gif but i somehow dont think it is this..

result later..

Jorrit
03-28-2001, 02:18 AM
My experience is that the 6.31 drivers are the only released drivers that seem to be stable under W2K. Don't know about the 10.x drivers since I've not tried them out.

zed
03-28-2001, 04:11 AM
( yes i backup 6.31 (or was it 6.34) very stable the latest official (6.50) are crap with win2000 crash,crash,crash . have you tryed paul nettles memory manager pogram (ive found it to be excellant, bar one error) it should track down any leaks in your program.

davepermen
03-28-2001, 08:39 AM
cool, where do i get paul whatevers memory manager?

LordKronos
03-28-2001, 12:52 PM
Originally posted by davepermen:
cool, where do i get paul whatevers memory manager?

Just to be clear, its not like a windows memory manager, so it wont help your problem. What it is is code that you compile into your projects. It basically replaces new and delete with its own version. The advantages are that it can do a lot of cool things, like track each allocation and give you a list of which ones were never released (ie: leaks). It can do things like detect when you go beyond the bounds of an array, or when you allocate memory that you never use (like if you allocate a 1MB block, and only use 1/2 MB, it can detect that and alert you that you arent using memory efficiently).

That being said, you can get it from here:

http://www.flipcode.com/cgi-bin/msg.cgi?...um=askmid&id=-1 (http://www.flipcode.com/cgi-bin/msg.cgi?showThread=12September2000-PresentingAMemoryManager&forum=askmid&id=-1)

The link is at the bottom of the article (but before the reader comments).

Korval
03-28-2001, 04:44 PM
As nice as that window manager might be, if it is happening on all his OpenGL programs, even commercially avaliable ones, then I doubt it will be helpful.

I can't see how it could be anything other than either his drivers or an insidious virus.

davepermen
03-29-2001, 03:52 AM
a virus it cant be somehow cause i had several times completely removed everything from my pc.. with formatc.. between i for example played with linux around, with BeOS and even reinstalled win98.. ( win98 dont have lecks.. but it likes to crash.. one time win2k..never go back http://www.opengl.org/discussion_boards/ubb/smile.gif )

so.. the driver.. letz test my newest driver downloads if they have the leck, too.. but its just somehow on win2k.. thats what iritates me really.. letz see..

LordKronos
03-29-2001, 06:27 AM
Viruses can hide themselves in the MBR, and format C: wont get rid of those nasty ones. I cant remember how to clean those. Is it something like "sys /MBR" ?

Asshen Shugar
03-29-2001, 11:55 PM
I think your problem is more C++ related !
Do you use linked lists ? If so, do you free them afterwards, etc...

Think more in this direction

stephenwilley
03-30-2001, 12:25 AM
Smells like a re-install. SP1 might help, but this sounds like a larger problem.

Just to let you know; currently the most stable/best performing drivers are the 7.68s

Stephen

davepermen
03-30-2001, 09:03 AM
hm guys, dont you read my ****!?!

I SAID ITS NOT MY APP BUT EVERY APP WICH USE OPENGL, LIKE QUAKE3 AND THE NEHE TUTS, TOO

AND I HAVE REINSTALLED SEVERALL TIMES AND I HAVE SP1 INSTALLED NOW

grr.. i'm agressive today( not cause this.. anyways.. ) dont joke with me.. plz read and then answer..

Deiussum
03-30-2001, 10:26 AM
Maybe your app has a leak. Have you tried reinstalling Win2k? Do you have SP1 installed? http://www.opengl.org/discussion_boards/ubb/smile.gif (Sorry. Couldn't help myself.)

As to the MBR, it is fdisk /mbr if I recall correctly.

It is a weird problem. I haven't seen it before myself. I'm at work right now and just tested that, and didn't see any problems with memory being released. But this computer also has a Trident 3d card, and it's using the default MS implementation of OGL. I'll test it again at home on my GeForce, but I don't think I'll see the problem there either.

dslater
04-18-2001, 05:02 AM
I think you should consider the possibility of a hardware issue. Even though things work fine under Win98, it is possible that there is some problem with your hardware that only shows up under Win 2000. If I were you, I would start by trying a different video card to see if I could still reproduce the problem.

davepermen
04-18-2001, 05:26 AM
stupid problem.. even with 6.50 i had it.. but i got it now.. had to disable this:

allow the dual planes to use local video memory.. somehow in win2k it does not release this data.. ( little hint to the nvidiadriverproducers.. )

now i am happy with no memory leck in opengl.. now i just have one in visualc http://www.opengl.org/discussion_boards/ubb/wink.gif but its no problem..

NeoTuri
04-18-2001, 06:10 AM
Sounds like a bad build of Win2k to me, or at least the OpenGL implementation. Remember when Win2k didn't used to support OpenGL?

davepermen
04-18-2001, 06:13 AM
its just a driver problem.. win2k does release the dll.. the rest is up to the drivercreators ( ok its NOT so easy.. )

but its nice to found out what the problem whas, thats the only important thing.. perhaps nvidia reads this and perhaps a next version dont "uses" the bug anymore.. we will see..

harsman
04-20-2001, 01:48 AM
Why don't you mail Cass or Matt and (or some dev rel mail at nvidia) and report the bug?

tweakoz
04-21-2001, 10:40 AM
I had this problem also on a creative geforce2 in on a tyan tiger 133 motherboard
(i think it was an s1834). I emailed nvidia
about the problem, they suggested i rename
nvoglnt.dll to something else (to disable HW GL) and see if the problem still existed.
well when i renamed the file, the problem went away, so this to me points the finger at nvidia. i tried many ogl programs also, including MS screensavers (PIPES, etc..).
when the HW GL was enabled I would lose approx 4MB of Kernel Memory.

NVidia never did provide me with a solution.


Originally posted by davepermen:
every time i run an opengl application ( not important what one ) it takes me away bout 20mb ram.. no problem so far.. but when i close the program it just gives 16mb ram free again, so i'm loosing every time i run an opengl application 4mb ( 3.8 for more info http://www.opengl.org/discussion_boards/ubb/smile.gif )

i thought its my app.. but it isnt.. ( even q3 looses this damn 3.8.. )

i thought it is the driver.. but not important wich one i install ( official det3 or even 11.01.. ), no difference..

i thought it whas some setting in the driver, so i dis/enabled everything i got there in the driver settings.. no difference

so, what is left is the win2k, cause on win98 i hadn't the problem..

its terrible somehow to work with it.. cause when i code, i recompile and start my program bout every minute.. and even if i have 1024mb free virtual ram.. when i have filled up my real ram ( 128mb, 65 filled after booting.. ), i have to reboot cause nothing works anymore..

you can calculate yourself how much i have to reboot..

i'm happy for every idea to stopp the bug..

tweakoz
04-21-2001, 10:48 AM
another funny thing was I never got this
problem until i upgraded my motherboard
from an abit BH6 to the before mentioned
tyan tiger 133 (dual PIII 800). I just swapped motherboards, installed all the old HW and reinstalled win2k. I never had trouble
with the BH6.


Originally posted by tweakoz:
I had this problem also on a creative geforce2 in on a tyan tiger 133 motherboard
(i think it was an s1834). I emailed nvidia
about the problem, they suggested i rename
nvoglnt.dll to something else (to disable HW GL) and see if the problem still existed.
well when i renamed the file, the problem went away, so this to me points the finger at nvidia. i tried many ogl programs also, including MS screensavers (PIPES, etc..).
when the HW GL was enabled I would lose approx 4MB of Kernel Memory.

NVidia never did provide me with a solution.

tweakoz
04-21-2001, 11:07 AM
I believe the nvidia contact i emailed was
mcraighead@nvidia.com

(if that helps)

davepermen
04-21-2001, 11:45 AM
as i said yet.. i killed the bug.. disabling use of my memory and it cant forget to release some of my mem anymore, cause it never get any piece of it.. simle but effective..

anyways.. its a bug from nvidia.. but its not my problem anymore.. tnx anyways.. matt and co are often in this forum.. think they have read this yet anyways.. if the next driver has the same bug i will mail it..

mcraighead
04-21-2001, 11:59 AM
I never got an email about it and it's virtually impossible for me to debug from here.

- Matt

davepermen
04-21-2001, 10:40 PM
not much bether if you get a mail wich sais that something is wrong, not? i dont know all the specs of my pc, so i cant give you much infos.. and like that i cant help you much.. just the tip for guys wich have problems like this.. just disable the "Allow the Dual Planes to use local Video Memory".. like that the bug is away..

i dont think it is a problem like that.. if you dont know why you cant find it out with my help.. except you come to me and look at my pc yourself.. and i dont think this is needed.. http://www.opengl.org/discussion_boards/ubb/smile.gif

i know just one thing.. i have a soundchip, not a soundboard.. and this chip cant play my music correctly if the cpu/gpu has to calculate much.. ( it has a slowdown then ) so all i know is my pc is not very well configured http://www.opengl.org/discussion_boards/ubb/smile.gif ( i tried every thing bout bad music on geforcefaq.com.. dont work.. but i dont have much problems with it.. )

tnx anyways matt