Jump to content
  • Advertisement
Sign in to follow this  
Sync Views

debug memory problem

This topic is 3787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do I go about fixing all those errors? It was my understaing that direct x freed all the momery it used (eg textures, models etc) when it closed yet all the errors seem to be coming from Direct3D9...
'd3d.exe': Loaded 'H:\cpp\d3d\Debug\d3d.exe', Symbols loaded.
'd3d.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\user32.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\version.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\winmm.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\D3DX9d_36.dll'
'd3d.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcp90d.dll', Symbols loaded.
'd3d.exe': Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.DebugCRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_597c3456\msvcr90d.dll', Symbols loaded.
'd3d.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\msctf.dll'
'd3d.exe': Loaded 'C:\Program Files\SiteAdvisor\6253\saHook.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll'
'd3d.exe': Loaded 'C:\WINDOWS\system32\d3dx9d_33.dll'
Direct3D9: :====> ENTER: DLLMAIN(00e4e6e0): Process Attach: 00000314, tid=00000e7c
Direct3D9: :====> EXIT: DLLMAIN(00e4e6e0): Process Attach: 00000314
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.
Direct3D9: (INFO) :======================= Hal HWVP device selected

Direct3D9: (INFO) :HalDevice Driver style 9

Direct3D9: :Subclassing window 000603b0
Direct3D9: :StartExclusiveMode
Direct3D9: :Window 0003004a is on top of us!!
Direct3D9: :Window 0003004a is on top of us!!
Direct3D9: :WM_ACTIVATEAPP: BEGIN Activating app pid=00000314, tid=00000e7c
Direct3D9: :*** Active state changing
Direct3D9: :WM_ACTIVATEAPP: DONE Activating app pid=00000314, tid=00000e7c
D3D9 Helper: Warning: Default value for D3DRS_POINTSIZE_MAX is 2.19902e+012f, not 1.58456e+029f.  This is ok.
Direct3D9: :====> ENTER: DLLMAIN(00e4e6e0): Process Detach 00000314, tid=00000e7c
Direct3D9: (INFO) :MemFini!
Direct3D9: (WARN) :Memory still allocated!  Alloc count = 115
Direct3D9: (WARN) :Current Process (pid) = 00000314
Direct3D9: (WARN) :Memory Address: 00c74af8 lAllocID=1 dwSize=000047f8, (pid=00000314)
Direct3D9: (WARN) :  Stack Back Trace
Direct3D9: (ERROR) :    [0] : Address 00E4E4CB
Direct3D9: (ERROR) :    [1] : Address 00E4E59B
Direct3D9: (ERROR) :    [2] : Address 00E4E440
Direct3D9: (ERROR) :    [3] : Address 00E42DB4
Direct3D9: (ERROR) :    [4] : Address 4FDFAF2E
Direct3D9: (ERROR) :    [5] : Address 00419058
Direct3D9: (ERROR) :    [6] : Address 004178DE
Direct3D9: (ERROR) :    [7] : Address 0042D358
Direct3D9: (ERROR) :    [8] : Address 0042D0BF
Direct3D9: (ERROR) :    [9] : Address 7C816D4F
Direct3D9: (ERROR) :    [10] : Address 00000000
Direct3D9: (ERROR) :    [11] : Address 00000000
Direct3D9: (ERROR) :    [12] : Address 00000000
Direct3D9: (ERROR) :    [13] : Address 00000000
Direct3D9: (ERROR) :    [14] : Address 00000000
Direct3D9: (ERROR) :    [15] : Address 00000000
Direct3D9: (WARN) :Memory Address: 00c7b770 lAllocID=10 dwSize=000013d4, (pid=00000314)
Direct3D9: (WARN) :  Stack Back Trace
Direct3D9: (ERROR) :    [0] : Address 00E450D4
Direct3D9: (ERROR) :    [1] : Address 00E45EBF
Direct3D9: (ERROR) :    [2] : Address 00E465F8
Direct3D9: (ERROR) :    [3] : Address 00E42DD5
Direct3D9: (ERROR) :    [4] : Address 4FDFAF2E
Direct3D9: (ERROR) :    [5] : Address 00419058
Direct3D9: (ERROR) :    [6] : Address 004178DE
Direct3D9: (ERROR) :    [7] : Address 0042D358
Direct3D9: (ERROR) :    [8] : Address 0042D0BF
Direct3D9: (ERROR) :    [9] : Address 7C816D4F
Direct3D9: (ERROR) :    [10] : Address 00000000
Direct3D9: (ERROR) :    [11] : Address 00000000
Direct3D9: (ERROR) :    [12] : Address 00000000
Direct3D9: (ERROR) :    [13] : Address 00000000
Direct3D9: (ERROR) :    [14] : Address 00000000
Direct3D9: (ERROR) :    [15] : Address 00000000
Direct3D9: (WARN) :Memory Address: 00c7b578 lAllocID=11 dwSize=00000014, (pid=00000314)
Direct3D9: (WARN) :  Stack Back Trace
...
...
Direct3D9: (WARN) :Total Memory Unfreed From Current Process = 379046 bytes
Direct3D9: :====> EXIT: DLLMAIN(00e4e6e0): Process Detach 00000314
The program '[788] d3d.exe: Native' has exited with code 0 (0x0).

Share this post


Link to post
Share on other sites
Advertisement
Resources in DirectX are COM objects, and should be Release()'d when not needed anymore. I strongly recommend using a COM-aware smart pointer like CComPtr<T>, which handles AddRef/Release for you.

Share this post


Link to post
Share on other sites
shouldn't this have releashed them?

void d3d_destroy(void)
{
if (d3d_vertex_buffer)
{
d3d_vertex_buffer->Release();
d3d_vertex_buffer = NULL;
}

if (d3d_device)
{
d3d_device->Release();
d3d_device = NULL;
}

if (d3d)
{
d3d->Release();
d3d = NULL;
}
}

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!