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.

2D All the way! / wierd memory problem perhaps?

Author
Message
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 4th Feb 2009 20:22
i am starting a 2D RPG. so far i am just working the menu. There is a lot of positioning and such that i am doing, sliding menus things like that and i need to test it often. i dont allow escape to kill the program but instead use a function so taht sprites can be deleted.

Exit()


this is called when a quit button is pushed. after i run the app about 60 times it starts acting up. sprites not showing and eventually the backdrop not showing and the sliding menus moving at snails pace. I restart my computer and it works again. Now im wondering if the dbDeleteSprite(1) actually does that or if it keeps pounding these into memmory.

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Feb 2009 21:23
does GDK have the equivalent of DBPro's flush video memory? that might help.

Virtual Nomad @ California, USA
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 5th Feb 2009 15:27
dont see such a command in the documentation.

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: 6th Feb 2009 03:17
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...

Maybe this is the wrong place to post this now. Id past my whole source here but i dont want to be laughed at for how i handle things lol...

-------------------------------------------------------------------
'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!
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 6th Feb 2009 05:12
ummmm just saying you might wanna try the flush video memory command cuz technicly dbc "doesn't have it" according to the documentation but its there and it doesn't cause a error. hmmmm lol
Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 6th Feb 2009 15:24
im in DarkGDK and c++ 2008 express. what would the command be?

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 7th Feb 2009 15:28
dbFlushVideoMemory()?

Kilrath
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Alberta
Posted: 7th Feb 2009 17:03
that doesnt seem to work. still loosing 4mb per run and that doesnt recover the memory.

Saving the world, one bit at a time.... Wait it's not worth saving. Get your own bits!
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 7th Feb 2009 18:35
does dbFlushVideoMemory cause a crash?

(i dunno gdk stuff but in DBPro there are no parentheses used with the command). and, the multiple d3d9 calls can't be a good thing (thinking maybe they are not being deleted/released correctly upon exit).

i'd re-ask this question in the gdk forum. you should be able to get better help there since most people don't check/expect code questions here on the 2d board. i did a little searching there for 'memory' and found a few inquiries on leakage, etc. that might pertain. if this is a sprite/image issue, one thread in particular might be of help as it mentions some undocumented commands found in DarkGDKImage.h .

good luck!

Virtual Nomad @ California, USA
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit

Login to post a reply

Server time is: 2024-04-23 20:14:28
Your offset time is: 2024-04-23 20:14:28