Unable to load game, out of memory.

Post bug reports and ask for support here.

Moderators: Icemania, elliotg

Epsilon
Posts: 81
Joined: Fri Nov 20, 2009 4:24 pm

Unable to load game, out of memory.

Post by Epsilon »

Image 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. Image 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
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post by Erik Rutins »

Thanks, investigating this and Jim's report will be our next top priority.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
JudgeDredd
Posts: 8362
Joined: Fri Nov 14, 2003 7:28 pm
Location: Scotland

RE: Unable to load game, out of memory.

Post by JudgeDredd »

This is my system performance, as you can see I have plenty of ram (12gb) DDR3.
[X(]
Alba gu' brath
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post by Erik Rutins »

I was more impressed with the 8 processor cores, personally. [X(]
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
OverlordCW
Posts: 88
Joined: Sun Mar 28, 2010 1:56 pm

RE: Unable to load game, out of memory.

Post by OverlordCW »

It's probably a Core i7 with HyperThreading, I have one too.
User avatar
Gargantou
Posts: 205
Joined: Sat Apr 28, 2007 7:13 am

RE: Unable to load game, out of memory.

Post 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.
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post 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
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Gargantou
Posts: 205
Joined: Sat Apr 28, 2007 7:13 am

RE: Unable to load game, out of memory.

Post 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.
User avatar
elliotg
Posts: 3932
Joined: Mon Sep 10, 2007 9:32 am

RE: Unable to load game, out of memory.

Post 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
User avatar
Gargantou
Posts: 205
Joined: Sat Apr 28, 2007 7:13 am

RE: Unable to load game, out of memory.

Post 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.
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post by Erik Rutins »

Thanks for trying. Figuring this out is a high priority for us.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
Aurelian
Posts: 4073
Joined: Mon Feb 26, 2007 2:08 pm

RE: Unable to load game, out of memory.

Post by Aurelian »

ORIGINAL: JudgeDredd
This is my system performance, as you can see I have plenty of ram (12gb) DDR3.
[X(]
Building a new PC.
User avatar
Webbco
Posts: 694
Joined: Sat Feb 06, 2010 10:15 am

RE: Unable to load game, out of memory.

Post 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?!
Volcano
Posts: 52
Joined: Thu Mar 25, 2010 8:18 pm
Location: France

RE: Unable to load game, out of memory.

Post 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).
Attachments
DxDiagreport.txt
(56.73 KiB) Downloaded 15 times
Do not awake the dormant volcano...
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post 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.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post by Erik Rutins »

Can you guys confirm for me please which galaxy size you chose for these games?
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
malfid
Posts: 30
Joined: Sat Mar 20, 2010 1:03 am

RE: Unable to load game, out of memory.

Post 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. 
Volcano
Posts: 52
Joined: Thu Mar 25, 2010 8:18 pm
Location: France

RE: Unable to load game, out of memory.

Post 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...[:(]
Do not awake the dormant volcano...
sbach2o
Posts: 378
Joined: Fri Mar 26, 2010 8:15 am

RE: Unable to load game, out of memory.

Post 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.
User avatar
Erik Rutins
Posts: 39650
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

RE: Unable to load game, out of memory.

Post 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.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
Post Reply

Return to “Tech Support”