Page 1 of 2
Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 12:48 pm
by Epsilon

This is starting to become really bothersome, when I can't expect my empire to continue on flourishing, but expect it to suddenly die due to memory error.
This is my system performance, as you can see I have plenty of ram (12gb) DDR3.

I noticed the application loading all the pictures into memory upon execution... you're bound to run into 32bit register limits on a .net application this way. I might suggest a 64 bit binary for the those of us with the systems for it, and also for the future. Anyway the game is unplayable when it suddenly cannot load a savegame due to memory limitations.
here's my
savegame
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 1:04 pm
by Erik Rutins
Thanks, investigating this and Jim's report will be our next top priority.
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 4:13 pm
by JudgeDredd
This is my system performance, as you can see I have plenty of ram (12gb) DDR3.
[X(]
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 4:20 pm
by Erik Rutins
I was more impressed with the 8 processor cores, personally. [X(]
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 5:16 pm
by OverlordCW
It's probably a Core i7 with HyperThreading, I have one too.
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 6:05 pm
by Gargantou
I get the same problem, I only got 2 gigs however.
Can't be bothered at this late hour to find a site to upload it too though.
Still, it's a real shame, up until being unable to load this game, I've been greatly enjoying this game, will now be waiting 'til this can be fixed until I start playing again.
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 6:16 pm
by Erik Rutins
Gargantou,
When you have time, please upload your save per the instructions pinned to the top of this sub-forum. We'd really like to take a look and see what is causing the problem so we can fix it ASAP.
Regards,
- Erik
RE: Unable to load game, out of memory.
Posted: Sun Mar 28, 2010 6:29 pm
by Gargantou
As I deleted the ZIP I had made of the save earlier, I unwittingly deleted the original save too. Boy was my face red when I realized.
But I will start a new game tomorrow, and if I encounter the same bug I will upload it, probably via a third-party site though because I'm not big on installing an FTP program just for uploading the savegame.
RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 5:45 am
by elliotg
While we look at this one, here's something you could try in the meantime:
1. Exit DW completely 2. Restart DW 3. Then try to load the game again
RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 11:50 am
by Gargantou
I did that with my save a total of three times, I even tried a complete reboot of my PC, terminated all not-necessary applications to conserve as much memory as possible, but it still gave me the same result.
RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 7:17 pm
by Erik Rutins
Thanks for trying. Figuring this out is a high priority for us.
RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 8:29 pm
by Aurelian
ORIGINAL: JudgeDredd
This is my system performance, as you can see I have plenty of ram (12gb) DDR3.
[X(]


RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 8:58 pm
by Webbco
Haha. I've never seen that before. Actually there's another guy in this forum who has 8 terrabytes or something. Who was that guy?!
RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 10:36 pm
by Volcano
I have just had the same error message while trying to load a quite advanced saved game.
I join a DxDiag report and the concerned saved game on your FTP (Volcano_unable_to_load_march30).
RE: Unable to load game, out of memory.
Posted: Mon Mar 29, 2010 10:41 pm
by Erik Rutins
Thank you for the report, Volcano.
Looking at your DxDiag, your audio drivers seem to be from 2005 so I would definitely update those. Graphics drivers are from early 2009 so I would update those as well. It's good to keep these up to date, though I doubt these caused the issue.
RE: Unable to load game, out of memory.
Posted: Tue Mar 30, 2010 1:14 am
by Erik Rutins
Can you guys confirm for me please which galaxy size you chose for these games?
RE: Unable to load game, out of memory.
Posted: Tue Mar 30, 2010 5:17 am
by malfid
I have now experienced the same problem on a 1,400 star galaxy (the game crashed because it ran out of memory). My system is an 8gb DDR3 RAM, i7 quad-core (2.80ghz). I cannot upload the save, because I foolishly did not make one, before the crash. That crash occurred around the third-point of the game, when much of the galaxy had been explored by the various empires (12 loaded at start-up) and the average colony count was in the high teens.
RE: Unable to load game, out of memory.
Posted: Tue Mar 30, 2010 6:21 am
by Volcano
In my game I was on a 700 stars galaxy.
And for the graphic drivers, I have tried to install the latest drivers, but the installation program tells me it hasn't detected compatible drivers for my hardware, though it must have, because I have checked the list of compatible hardware for the drivers...
That's really the sort of thing that gives you the desire to hang yourself...[:(]
RE: Unable to load game, out of memory.
Posted: Tue Mar 30, 2010 7:41 am
by sbach2o
Just a (more or less random) note:
The DW application is built on the .NET framework. When huge amounts of data are handled in memory, one has to be careful about the (otherwise carefree) memory handling. I've seen instances where the dynamic handling of strings reached its limit. If you try to increase a string to beyond some ~150 MB (or maybe double of that , I don't remember whether that limit was bytes or characters), you run afoul of an out of memory error. This is not the system running out of memory, but the .NET library reaching a limit for a certain operation.
My
guess (confirmed by the example below) is, this may also apply to other dynamic structures like certain collection types, which in turn would be a candidate for DW (I really don't think it handles strings that long).
Here is a code snippet that will produce an 'out of memory exception' after using up 'only' 0.5 GB of virtual memory. I am sure one can produce examples that reach that with even less investment:
Code: Select all
struct bla
// 160 bytes of data
{
long a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
long b1, b2, b3, b4, b5, b6, b7, b8, b9, b10;
public bla(int i)
{
a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = a10 = 0;
b1 = b2 = b3 = b4 = b5 = b6 = b7 = b8 = b9 = b10 = i;
}
}
private void crashme()
{
// pre allocate a huge dump, we're interested in what happens beyond that.
Dictionary<string, bla> dump = new Dictionary<string, bla>(500000);
for (int i = 0; i < 100000000; ++i)
{
try
{
dump.Add(i.ToString(), new bla(i));
}
catch (Exception ee)
{
MessageBox.Show(this, String.Format("adding to the dump crashed at {0} with excpetion {1}", i, ee.Message));
break;
}
}
}
Edit: Better example that crashed with less memory use.
In .Net applications you have to be very careful wherever huge arrays are handled that are dynamically expanded. That includes library-internal handling of arrays as it happens with string in, for example:
Code: Select all
// string type uses a character array internally that is dynamically expanded while reading in a text file.
// Will crash beyond ~80 MB
string fileContents = File.ReadAllText("c:\hugetextfile.txt");
To 'fix' the first example, you'd need to store references in the dictionary (and its internal value array). Change 'struct' to 'class' and the app will consume practically all available memory before crashing.
RE: Unable to load game, out of memory.
Posted: Tue Mar 30, 2010 12:17 pm
by Erik Rutins
Thank you for the reports and suggestion. Elliot is focusing on this issue.
It appears that in some cases (I'm guessing long sandbox style games though I'd love to have confirmation on that from those who have experienced this) that enough "stuff" is being generated in the galaxy to get past what we thought were pretty generous limits on the addressable memory. We hadn't hit this in testing even with our "big" developed test games but it's obviously out there and perhaps we did something later in development that increased the memory usage somehow. It's a priority now to pare things down to allow these saves to open and these games to continue as well as prevent this reoccurring.