Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Video Memory Leak, dbDeleteSprite

Author
Message
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 10th Feb 2009 05:02
Is this my memory leak? it says D3D9 already called a bunch of times. Got my hardware monitors going and i lose 3-4MB of video memory every run... very strange...

I use a function that is called on exit to delete all sprite numbers... but i still lose the 3-4MB, funny thing is if i load a 30MB file i still only lose 3 - 4 megs...

any ideas? what else do i need to show you?

-------------------------------------------------------------------
\'Dark Sword.exe\': Loaded \'C:\\Documents and Settings\\Jesse Coles\\My Documents\\Visual Studio 2008\\Projects\\Dark Sword\\Dark Sword\\Debug\\Dark Sword.exe\', Symbols loaded.
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\ntdll.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\kernel32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\winmm.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\advapi32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\rpcrt4.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\secur32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\gdi32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\user32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\d3dx9_35.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\msvcrt.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\d3d9.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\d3d8thk.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\version.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\dinput8.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\dsound.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\ole32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\msacm32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\wininet.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\shlwapi.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\normaliz.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\iertutil.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\dplayx.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\d3dxof.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\shell32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\oleaut32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\imm32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\WinSxS\\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\\comctl32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\comctl32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\Program Files\\Radeon Omega Drivers\\v4.8.442\\ATI Tray Tools\\raphook.dll\', Binary was not built with debug information.
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\psapi.dll\'
HookingC:\\DOCUMENTS AND SETTINGS\\JESSE COLES\\MY DOCUMENTS\\VISUAL STUDIO 2008\\PROJECTS\\DARK SWORD\\DARK SWORD\\DEBUG\\DARK SWORD.EXERPH:Injecting code at start up
done...
RPH3D9_DLL Hooking
After 1 Got Addresses\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\msctf.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\msctfime.ime\'
D3D9 Already Called from Present!\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\hid.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\setupapi.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\wintrust.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\crypt32.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\msasn1.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\imagehlp.dll\'
RPH3D9_DLL Hooking
After 1 Got Addresses\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\wdmaud.drv\'
\'Dark Sword.exe\': Unloaded \'C:\\WINDOWS\\system32\\wdmaud.drv\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\wdmaud.drv\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\msacm32.drv\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\midimap.dll\'
\'Dark Sword.exe\': Loaded \'C:\\WINDOWS\\system32\\ksuser.dll\'
D3D9 Already Called from Present!RPH3D9_DLL Hooking
After 1 Got AddressesD3D9 Already Called from Present!RPH3D9_DLL Hooking
After 1 Got AddressesD3D9 Already Called from Present!RPH3D9_DLL Hooking
After 1 Got AddressesD3D9 Already Called from Present!

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 10th Feb 2009 14:16
How do you know you've lost 3-4mb of video memory? What do you use to measure it?

Quote: "it says D3D9 already called a bunch of times"

No, it says that it hooked it several times (or attempted to), but I don't think that's an issue. I don't know whether that's standard or something limited to your system - maybe you have the debugging DX runtime active on your system.

Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 10th Feb 2009 20:36 Edited at: 10th Feb 2009 20:47
i did activate it after i noticed the memory missing. What happened is after re running the app 50 times or so the bigger sprites wouldnt load anymore and things went at 5 FPS. i have a ATI x1400 card on my laptop and it has the Omega drivers loaded with the ati tool set that displays on my screen FreeVideoMemory FreeTextureMemory and System Memory Used.

i activated the DX debugging and tried the PIX tool cause someone said that it would crash the app if a leak occured but it runs fine shows no errors. i even do a dbFlushVideoMemory(); to try to just wipe it before app starts and after it ends...

This is the image of the load screen after 30 or so loads. top right shows no memory left in video and running out of texture.


Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 10th Feb 2009 21:56
Maybe some dangling pointers? But I dont know as I dont have the sourcecode.

Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 11th Feb 2009 02:07
pointers will eat video memory? well i can put up the source code but its in rough shape ATM cause im trying to figure out the game. Never programmed a graphic game. My experience is 6 years old in ANSII C for linux in MUDS.


Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 11th Feb 2009 05:57
ok this is wierd... if i open a game my memory is right back up to the top... then i open my app and the memory goes back to where it was... so it starts high and drops off slow. then run another game and it goes high again. close the game and run mine it goes low again right back where it was...

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 14th Feb 2009 02:00
dont worry about it guys. i dont like the fact i have no idea what goes on in the "DarkGDK" universe background... so im gonna learn how to do this the hard way. Might use SDL as apparently it is linux/windows cross compatable.

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 16th Feb 2009 00:58
the problem seems to be that ur trying to hook the dx9 device or something(havnt read ur sourcecode), and it fails. after that u dont clean up the dx9 hooking memory so it leaves some dx9 hooking variabels in the vram.... maybe

Keep it simple.
Questions? Mail me
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 16th Feb 2009 06:09
Quote: "Might use SDL as apparently it is linux/windows cross compatable"


Not to mention Mac compatible also. The one problem I have with SDL is the need to use additional libraries for the sound. From my brief touch on some of those libraries, you have to do much more to keep up with the demands of the sound function.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 18th Feb 2009 07:06
thanks for your replies. i just built a new machine to do this in, maybe my laptop was the issue as well. we all know they arent really the most reliable solutions...

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Scottie Dog
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location:
Posted: 2nd Mar 2009 10:04
A quick check.

You say your deleting the sprites.
Are you also deleting the bitmap and/or the images that you use to create the sprites.

Login to post a reply

Server time is: 2024-11-25 15:18:08
Your offset time is: 2024-11-25 15:18:08