PDA

View Full Version : Game crashes DX9 - memory leak?



mikejt4
11-15-2010, 03:42 PM
DX11 no good for me, so playing DX9 at the moment.
(Win7 x64, 8GB RAM, GTX 470, Q6600 @ 2.4GHz).

With large maps, and after ~500 turns - I can play maybe a dozen turns before the game dies. It's incredibly slow - I have a Q6600 @ 2.4GHz - and it takes more than a minute to capture a city or run the AI turns.

I've been looking at the process as it crashes in task manager and noticed a trend - it always seems to be very close to 2GB 'commit charge' (with ~1.8GB of actual RAM mapped in) - which I believe means as a 32-bit process it's just run out of address space!

Memory leak anyone?

I'm a s/w developer so if you need any particular logs, perfmon, Windbg or whatever just ask. (I've got 39 mdmp files if you want them).

Tech Ian
11-15-2010, 05:29 PM
Hi. First things first, can you post the upper-most section of your dxdiag report please.

mikejt4
11-15-2010, 05:35 PM
------------------
System Information
------------------
Time of this report: 11/16/2010, 20:32:19
Machine name: ENTERPRISE
Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7600) (7600.win7_gdr.100618-1621)
Language: English (Regional Setting: English)
System Manufacturer: ASUSTEK COMPUTER INC
System Model: P5W DH Deluxe
BIOS: BIOS Date: 09/13/06 19:39:24 Ver: 08.00.12
Processor: Intel(R) Core(TM)2 Quad CPU @ 2.40GHz (4 CPUs), ~2.4GHz
Memory: 8192MB RAM
Available OS Memory: 8192MB RAM
Page File: 5213MB used, 11167MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: 96 DPI (100 percent)
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7600.16385 32bit Unicode

------------
DxDiag Notes
------------
Display Tab 1: No problems found.
Display Tab 2: No problems found.
Sound Tab 1: No problems found.
Sound Tab 2: No problems found.
Input Tab: No problems found.

--------------------
DirectX Debug Levels
--------------------
Direct3D: 0/4 (retail)
DirectDraw: 0/4 (retail)
DirectInput: 0/5 (retail)
DirectMusic: 0/5 (retail)
DirectPlay: 0/9 (retail)
DirectSound: 0/5 (retail)
DirectShow: 0/6 (retail)

---------------
Display Devices
---------------
Card name: NVIDIA GeForce GTX 470
Manufacturer: NVIDIA
Chip type: GeForce GTX 470
DAC type: Integrated RAMDAC
Device Key: Enum\PCI\VEN_10DE&DEV_06CD&SUBSYS_14703842&REV_A3
Display Memory: 4064 MB
Dedicated Memory: 1248 MB
Shared Memory: 2815 MB
Current Mode: 1920 x 1200 (32 bit) (59Hz)
Monitor Name: Dell 2407WFP (Digital)
Monitor Model: DELL 2407WFP
Monitor Id: DELA017
Native Mode: 1920 x 1200(p) (59.950Hz)
Output Type: DVI
Driver Name: nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,n vwgf2um,nvwgf2um
Driver File Version: 8.17.0012.6099 (English)
Driver Version: 8.17.12.6099
DDI Version: 10.1
Driver Model: WDDM 1.1
Driver Attributes: Final Retail
Driver Date/Size: 10/17/2010 05:55:00, 12788840 bytes
WHQL Logo'd: n/a
WHQL Date Stamp: n/a
Device Identifier: {D7B71E3E-458D-11CF-214C-7C341DC2C535}
Vendor ID: 0x10DE
Device ID: 0x06CD
SubSys ID: 0x14703842
Revision ID: 0x00A3
Driver Strong Name: oem41.inf:NVIDIA_SetA_Devices.NTamd64.6.1:Section0 04:8.17.12.6099:pci\ven_10de&dev_06cd
Rank Of Driver: 00E62001

mikejt4
11-15-2010, 05:46 PM
I've tried
running in windowed mode, re-installing direct x as admin, different resolutions, different nvidia settings, started new games with different settings, latest video drivers, and a few others I've forgotten.

xml.log has a validation failed in it;

[1301218.093] **** Validating Game Database *****
[1301218.156] Performing Localization Checks
[1301218.156] Checking Tag Format...
[1301218.156] Note: Tags must only use [A-Z_] characters, start with 'TXT_KEY_', and be under 128 characters long.
[1301218.171] Validating UnitGameplay
[1301218.171] Number of selection sounds doesn't match number of units.
[1301218.171] Validating Notifications
[1301218.171] Number of notification xml entries does not match enum size
[1301218.171] **** VALIDATION FAILED *****
[1301218.171] Validation Took 0.073946 seconds
[1301218.625] **** Validating Prefetch Process *****
[1301218.625] **** Validation Success *****
[1301218.625] SetGlobalActionInfo

CPU temps are low - <35, GPU temps stay under 60 (aggressive fan settings).

Other games Anno 1404, WOW, CnC4, SC2 play fine with ultra quality settings.

Playing tonight I got in about 5 turns in 1.5 hrs - it's pretty slow. RAM was sitting at around 1.9GB for the process the whole time. (DX9 mode).
I tried loading that game in DX11 mode but it crashed within about 5s.

Playing at 1920x1200@59, but have tried resolutions down to 1024x768, tried windowed, tried dropping quality settings, no help.
Windowed did seem more stable, but not totally.
DX9 seems more stable - I get the feeling I'm seeing a different crash. In DX11 mode, the crash always seemed to happen when panning from place to place. In DX9 mode it's less obvious what's happening.

slowtarget
11-15-2010, 09:43 PM
To add some information (which I have to assume TechIan already knows):

I've done some memory profiling on Civ V while playing huge maps (starting, stopping, loading, saving, reloading, etc). I've never seen anything to suggest that a memory leak is occurring.

However, what I have seen is that Civ V uses a decent chunk of memory. It's not uncommon for even FPSes to reach 1GB of memory usage, and strategy games (especially those which track history) take up more. From my own records (http://forums.2kgames.com/forums/showpost.php?p=1257930&postcount=21), simply starting a game with a huge map takes up ~1.3GB of real (private not virtual) memory.

That is the amount used at the start of the game. As more cities, units, relationships, and history is built up during the game, it's going to need even more memory. I don't have numbers or turn counts to go with this, but I'm pretty certain I've seen Civ V's memory usage creep up to 2GB on my system. As you already know, that's going to be the cap for a 32-bit process.

Now, why did it run fine for me, but not for you? I have no idea. My games have actually been pretty responsive (I don't get huge waits between turns, but I think I know why). Our systems are actually pretty similar. You've got Win7-64 Ultimate, I have Vista-64 Home Premium. You've got a Q6600 (right?) while I have its bigger brother the Q9450. The only big difference is the fact that my video card is much less capable (8800 GTS G92). I even run mine in DX11 mode.

So... The memory amounts that you're seeing aren't out-of-line with what I've measured on my (working) system. So, I'm left grasping at other things: Mods? Background processes? It really does sound like a heat-throttling issue, but those temps are lower than mine (CPU: 50, GPU: 70 ... bet my system is quieter, though).

(By the way: I'm a fellow developer)

dra1985ny
11-15-2010, 10:27 PM
To add some information (which I have to assume TechIan already knows):

I've done some memory profiling on Civ V while playing huge maps (starting, stopping, loading, saving, reloading, etc). I've never seen anything to suggest that a memory leak is occurring.

However, what I have seen is that Civ V uses a decent chunk of memory. It's not uncommon for even FPSes to reach 1GB of memory usage, and strategy games (especially those which track history) take up more. From my own records (http://forums.2kgames.com/forums/showpost.php?p=1257930&postcount=21), simply starting a game with a huge map takes up ~1.3GB of real (private not virtual) memory.

That is the amount used at the start of the game. As more cities, units, relationships, and history is built up during the game, it's going to need even more memory. I don't have numbers or turn counts to go with this, but I'm pretty certain I've seen Civ V's memory usage creep up to 2GB on my system. As you already know, that's going to be the cap for a 32-bit process.

Now, why did it run fine for me, but not for you? I have no idea. My games have actually been pretty responsive (I don't get huge waits between turns, but I think I know why). Our systems are actually pretty similar. You've got Win7-64 Ultimate, I have Vista-64 Home Premium. You've got a Q6600 (right?) while I have its bigger brother the Q9450. The only big difference is the fact that my video card is much less capable (8800 GTS G92). I even run mine in DX11 mode.

So... The memory amounts that you're seeing aren't out-of-line with what I've measured on my (working) system. So, I'm left grasping at other things: Mods? Background processes? It really does sound like a heat-throttling issue, but those temps are lower than mine (CPU: 50, GPU: 70 ... bet my system is quieter, though).

(By the way: I'm a fellow developer)

Do you get the lockups on huge maps after the turn limit?

My game seems to run flawlessly, even at the later turns it takes about 20 seconds max to compute the AI turns. But sometimes out of the blue I get the dreaded "CTD no matter what I do" bug, albeit I only seem to get these when I turn off the time victory and run the game in quick mode. However I haven't had one problem yet (knock on wood) with any games I have played that ended before/on a time victory.

IMHO, I shouldn't have to play the game in this mode just to prevent a lockup and having to scrap hours of game play. Hopefully next patch it will be fixed.