Skip to main content
gamedev.net
🔒 Locked

Memory problem?

Started by majak Mar 22, 2005 at 2:43 AM 5 replies 1.5k views
Original Post
majak
majak
I had to move all my projects to another computer, and they still work, except for one!! It compiles, but when I start the program, I get this: 'Vertices.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\user32.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\msctf.dll', No symbols loaded. 'Vertices.exe': Loaded 'C:\WINDOWS\system32\d3d9d.dll', No symbols loaded. D3D9 Helper: Enhanced D3DDebugging disabled; Application was not compiled with D3D_DEBUG_INFO Direct3D9: (ERROR) :Memory still allocated! Alloc count = 3 Direct3D9: (ERROR) :Current Process (pid) = 00000180 Direct3D9: (ERROR) :Memory Address: 003a5fec lAllocID=1 dwSize=000047f8, ReturnAddr=00d414db (pid=00000180) Direct3D9: (ERROR) :Memory Address: 003ab724 lAllocID=8 dwSize=00000870, ReturnAddr=00d38044 (pid=00000180) Direct3D9: (ERROR) :Memory Address: 003abfcc lAllocID=9 dwSize=00002040, ReturnAddr=00d3970f (pid=00000180) Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 28840 bytes The program '[3732] Vertices.exe: Native' has exited with code 0 (0x0). Is it because the program needs more memory than available? If you have any ideas to what to do, please post a message =) [Edited by - majak on March 22, 2005 4:09:23 AM]
cow_in_the_well
cow_in_the_well
Is that the entire contents of the output window? Bits seem to be missing o_o.

Those memory messages get dumped when the application quits. They are telling you that you havn't released all of the Direct3D interfaces properlly (they still have references).

Your app should still run as normal. What isn't working, exactly?
majak
majak
That is the entire output. When I run the program, the window doesn't pop up with my picture.
majak
majak
I found the source of the problem.
I had this:
d3dpp.BackBufferFormat = D3DFMT_R5G6B5;
because I was trying to make it 16 bit instead of 32 bbp, but changed it to:
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
and now it's working..

Thanks for trying to help anyway =)
jollyjeffers
jollyjeffers
At least you solved the problem [smile] - looks like a case where the new hardware you're running/testing on doesn't support the same feature set as your development box..

Quote:
Direct3D9: (ERROR) :Memory still allocated! Alloc count = 3
Direct3D9: (ERROR) :Current Process (pid) = 00000180
Direct3D9: (ERROR) :Memory Address: 003a5fec lAllocID=1 dwSize=000047f8, ReturnAddr=00d414db (pid=00000180)
Direct3D9: (ERROR) :Memory Address: 003ab724 lAllocID=8 dwSize=00000870, ReturnAddr=00d38044 (pid=00000180)
Direct3D9: (ERROR) :Memory Address: 003abfcc lAllocID=9 dwSize=00002040, ReturnAddr=00d3970f (pid=00000180)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 28840 bytes

Ideally, you want to pay this attention.

Your original error is obviously causing an abnormal termination - and in doing so you've created memory leaks. Granted, this isn't likely to be fatal - but memory leaks can manifest themselves as the most obscure bugs at times - if you see one, its often worth the effort of investigating what/where/why.

Use the DX-Debug runtimes, maximum validation and plug in the 1,8,9 lAllocID values in to see what variables they're refering to - and then work out why they aren't being SAFE_RELEASE()'d.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
majak
majak
Quote:

Use the DX-Debug runtimes, maximum validation and plug in the 1,8,9 lAllocID values in to see what variables they're refering to - and then work out why they aren't being SAFE_RELEASE()'d.

hth
Jack


Could u explain this in more details (how to check the reference). I haven't used DX much.
How do I use the DX-Debug runtime and how do I set it to maximum validation? etc..

Sorry for being such a newb..
jollyjeffers
jollyjeffers
Quote:
Original post by majak
Quote:

Use the DX-Debug runtimes, maximum validation and plug in the 1,8,9 lAllocID values in to see what variables they're refering to - and then work out why they aren't being SAFE_RELEASE()'d.

hth
Jack


Could u explain this in more details (how to check the reference). I haven't used DX much.
How do I use the DX-Debug runtime and how do I set it to maximum validation? etc..

Sorry for being such a newb..

No problems with being a newbie [smile]

Anyway, this all presumes you have the DX-SDK installed... go to the Windows control panel - you should see an entry for "DirectX" (if not, do a search for DirectX.cpl on your system). This contains the advanced options for the actual DX runtime libraries installed on your system.

Go to the "Direct3D" tab - there'll be a pair of radio buttons (top-right iirc) that allow you to switch between "debug" and "retail" runtimes. Make sure you've got it set to "debug". Now, next to this should be a slider with about 4 clicks on it. Move it towards the "more" end, but you probably dont need to go all the way (so to speak!).

Also, on the same page, are some other options - such as the "maximum validation" I mentioned. Of interest there should be a "Break on AllocID" option with an associated text box. In this text box you enter the values that the debug runtime spits out. 1, 8, 9 for yours.

Click "Apply" to commit your changes.

Fire up your IDE (VStudio for example) and launch your application as a DEBUG build. As soon as you hit the allocID the IDE will hit a breakpoint. Whatever line it's pointing at (probably a "Create...()" call) is the object that the later memory leak is complaining about.

For example, if AllocID-9 breakpoints on a CreateVertexBuffer() call, then the memory leak resides in the fact that you (in your abnormal termination) haven't SAFE_RELEASE()'d it's reference. You need to put the relevant release code in your termination/error handling code.

Repeat for each AllocID that the debug-spew complains about.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.