Logo Platform
logo amplifiers simplified

OutOfMemoryExceptions on end turn

Reply
Copied to clipboard!
11 years ago
Sep 28, 2014, 11:54:57 AM
I am having frequent OutOfMemoryExceptions after I press the end turn button.



This is the stack trace that pops up:

[CODE]OutOfMemoryException: Out of memory

--------------------------------------------------------------------------------

System.IO.MemoryStream.set_Capacity (Int32 value)

System.IO.MemoryStream.Expand (Int32 newSize)

System.IO.MemoryStream.Write (System.Byte[] buffer, Int32 offset, Int32 count)

System.IO.MemoryStream.WriteTo (System.IO.Stream stream)

Amplitude.IO.Archive.Add (System.String fileName, System.IO.MemoryStream inputStream, CompressionMethod compressionMethod)

GameManager+c__Iterator1EA.MoveNext ()



--------------------------------------------------------------------------------

V1.0.2 S3 (32-bit)[/CODE]





I'm running a 32-bit Windows 7 system and the game version is 1.0.2 S3.

My graphics card: AMD HD7950

screen resolution 1600*1200

Intel Z68 chip set

Intel Core i7 CPU

4BG RAM (within the constraints of a 32-bit System)



I'll attach the files you need for bug reports to this post:

OutOfMemoryExceptions on end turn.zip.
0Send private message
11 years ago
Oct 3, 2014, 3:31:16 PM
I'm getting really frustrated with the memory exceptions. I'm getting these no less than once in three turns.

Please make this game 32-bit capable as soon as possible.



By the way, the stack trace may vary between occasions. Right now I got this one:

[CODE]OutOfMemoryException: Out of memory

--------------------------------------------------------------------------------

System.IO.MemoryStream.set_Capacity (Int32 value)

System.IO.MemoryStream.Expand (Int32 newSize)

System.IO.MemoryStream.Write (System.Byte[] buffer, Int32 offset, Int32 count)

System.IO.StreamWriter.FlushBytes ()

System.IO.StreamWriter.Decode ()

System.IO.StreamWriter.LowLevelWrite (System.String s)

System.IO.StreamWriter.Write (System.String value)

System.Xml.XmlTextWriter.WriteStartAttribute (System.String prefix, System.String localName, System.String namespaceUri)

System.Xml.XmlWriter.WriteAttributeString (System.String prefix, System.String localName, System.String ns, System.String value)

System.Xml.XmlWriter.WriteAttributeString (System.String localName, System.String value)

Amplitude.Xml.XmlWriter.WriteAttributeString[Int32] (System.String localName, Int32 value)

Unit.WriteXml (Amplitude.Xml.XmlWriter writer)

Amplitude.Xml.XmlWriter.WriteElementSerializable[IXmlSerializable] (IXmlSerializable& serializable)

Garrison.WriteXml (Amplitude.Xml.XmlWriter writer)

Army.WriteXml (Amplitude.Xml.XmlWriter writer)

Amplitude.Xml.XmlWriter.WriteElementSerializable[IXmlSerializable] (IXmlSerializable& serializable)

DepartmentOfDefense.WriteXml (Amplitude.Xml.XmlWriter writer)

Amplitude.Xml.XmlWriter.WriteElementSerializable[IXmlSerializable] (IXmlSerializable& serializable)

Amplitude.Unity.Game.Empire.WriteXml (Amplitude.Xml.XmlWriter writer)

Empire.WriteXml (Amplitude.Xml.XmlWriter writer)

MinorEmpire.WriteXml (Amplitude.Xml.XmlWriter writer)

Amplitude.Xml.XmlWriter.WriteElementSerializable[IXmlSerializable] (IXmlSerializable& serializable)

Game.WriteXml (Amplitude.Xml.XmlWriter writer)

Amplitude.Xml.XmlWriter.WriteElementSerializable[IXmlSerializable] (IXmlSerializable& serializable)

GameManager.SaveGame (System.IO.Stream stream)

GameManager+c__Iterator1EA.MoveNext ()



--------------------------------------------------------------------------------

V1.0.2 S3 (32-bit)[/CODE]
0Send private message
11 years ago
Oct 3, 2014, 3:51:06 PM
With a large map and/or multiple AI players there just wont be enough memory to go around on a 32bit OS. While further optimization on the devs part might help this problem, very simply the game is meant to be run on 64bit OS. you =can= run it on a 32bit... but expecting full performance from the game when you're giving it 1/2 the recommended resources just isn't reasonable.
0Send private message
11 years ago
Oct 3, 2014, 4:26:42 PM
Yea - typical 32bit OS has a so called "virtual memory" (all the memory that a program is using, or is PREPARING to use) ceiling for "user space" (for a single non os program) of around 2.5gb. If you hit this mark, you will get an OutofMemory() error.



132turns in on a typical 8player/huge map i'm seeing 2.57gb of virtual mem requisitioned ( smiley: smile made a bug report so I checked if the game memory is not balooning out control). If I had a 32bit os the game would have crashed.
0Send private message
11 years ago
Oct 3, 2014, 4:58:39 PM
I had the same problem on a large map with 8 empires.



I switched to a normal map with 6 empires, and haven't any problems so far at turn 90.
0Send private message
11 years ago
Oct 3, 2014, 8:58:46 PM
voxxyn wrote:
With a large map and/or multiple AI players there just wont be enough memory to go around on a 32bit OS. While further optimization on the devs part might help this problem, very simply the game is meant to be run on 64bit OS. you =can= run it on a 32bit... but expecting full performance from the game when you're giving it 1/2 the recommended resources just isn't reasonable.


You're obviously right - there is not enough memory to go around. Where I simply do not agree with you is the notion that I have to content myself with encountering crashes every other turn. Amplitude is OK with selling me the game to run on a 32-bit system, so it's their obligation to make it run without crashes on a 32-bit system. You may describe a game crashing all the time as it running below full performace, I call it a buggy nightmare.



Every strategy game devoloper in PC gaming history has managed to create a game running within the confines of 2GB. I'm pretty sure there is no uncircumventable need for the game to actually retain 2GB of data at any one time. It just tends to do it nonetheless.
0Send private message
11 years ago
Oct 4, 2014, 12:37:19 AM
:O(



I just looked at the minimum specs for GalCiv III -- minimum is going to be 6gb !!!!!! ...I don't know what Beyond Earth is going to be... but I'll bet I'll have to upgrade my laptop for it =\ I'll actually have to take my computer into a geek store to do it...
0Send private message
11 years ago
Oct 4, 2014, 3:03:20 AM
Glad to hear that other players are in the same boat. I've got 4 GB on a 32-bit OS and get "out of memory" all the time, even in a game with just 6 factions. The game should be functional on systems that meet the minimum specs. At this point, I find the game unplayable.



32-bit with 4 GB is the recommended spec for Beyond Earth, so I'll probably just switch to that in a couple of weeks. That's a shame as I was enjoying Endless Legend.
0Send private message
11 years ago
Oct 4, 2014, 1:51:53 PM
I hear you smeghed. I am enjoying the game immensely, or rather would, if it worked. I'm really hoping they're going to close their memory leaks. (Which there obviously are, because the game is quite functional for a few turns before memory runs out.)
0Send private message
9 years ago
Jul 27, 2016, 6:51:00 AM

And none fo that 32 bit nonsense can be true. My friend just started getting that OutOfMemory error, though he has played the game on the same machine before. Albeit it has been many months, but the machine was Windows 10 32 bit then, and is Windows 10 32 bit now. 8 Gbyte RAM is enough.


However, there appears to be some issue in the startup, which has not yet been resolved. We noticed in Settings that his machine reports the 8Gb RAM but only 3.5 Gb available after a fresh boot.


Though still probably reaching a threshold which is being discussed in here, it is NOT a 32 bit issue, but something else eating up RAM during the boot process.


Sadly, my friend doesn't work well over the phone so he gave up before we got to the bottom of the issue, but I am inclined to think we have a Java issue. Found some sort of updater sitting there in startup, and I never liked Java other than getting it direct from the manufacturer. We are going to try to peal that out and see if the RAM frees up after boot.


I hope this helps steer others away from the 32 bit and move towards a possible startup app taking up too much RAM (quite possibly malicious software is what I suspect when I see java trash hanging around).

0Send private message
9 years ago
Jul 28, 2016, 3:47:49 PM
Phloyd113 wrote:

And none fo that 32 bit nonsense can be true. My friend just started getting that OutOfMemory error, though he has played the game on the same machine before. Albeit it has been many months, but the machine was Windows 10 32 bit then, and is Windows 10 32 bit now. 8 Gbyte RAM is enough.


However, there appears to be some issue in the startup, which has not yet been resolved. We noticed in Settings that his machine reports the 8Gb RAM but only 3.5 Gb available after a fresh boot.


Though still probably reaching a threshold which is being discussed in here, it is NOT a 32 bit issue, but something else eating up RAM during the boot process.


Sadly, my friend doesn't work well over the phone so he gave up before we got to the bottom of the issue, but I am inclined to think we have a Java issue. Found some sort of updater sitting there in startup, and I never liked Java other than getting it direct from the manufacturer. We are going to try to peal that out and see if the RAM frees up after boot.


I hope this helps steer others away from the 32 bit and move towards a possible startup app taking up too much RAM (quite possibly malicious software is what I suspect when I see java trash hanging around).


A 32-bit operating system can only handle 4 GB of user addressable memory (that is, the limit of total memory for both your GPU and RAM). I don't know what kind of setup your friend has, but the unaccounted for half GB is very possibly simply the GPU "saving its spot" (a more detailed explanation here).


I have no idea why a manufacturer would knowingly sell a computer with twice as much RAM as it can handle properly, but I urge you to steer clear from 32 bits operating systems. Endless Legend is fairly memory-intensive, and every expansion just added more stuff running under the hood, which increased the game's demand in memory. A computer limited by its OS will be in a difficult spot when it comes to running the game properly.


This can be somewhat attenuated by playing on smaller maps, with fewer opponents, and in Fast speed to make games end sooner, considering that the more elements are on the map, the greedier the simulation becomes.


Hope this helps.

0Send private message
9 years ago
Jul 28, 2016, 4:02:57 PM

Better source­ on maximum amount of RAM handled by Win 10 32 bits: [here]

0Send private message
9 years ago
Aug 4, 2016, 9:50:13 AM
Phloyd113 wrote:

And none fo that 32 bit nonsense can be true. My friend just started getting that OutOfMemory error, though he has played the game on the same machine before. Albeit it has been many months, but the machine was Windows 10 32 bit then, and is Windows 10 32 bit now. 8 Gbyte RAM is enough.


However, there appears to be some issue in the startup, which has not yet been resolved. We noticed in Settings that his machine reports the 8Gb RAM but only 3.5 Gb available after a fresh boot.


Though still probably reaching a threshold which is being discussed in here, it is NOT a 32 bit issue, but something else eating up RAM during the boot process.


Sadly, my friend doesn't work well over the phone so he gave up before we got to the bottom of the issue, but I am inclined to think we have a Java issue. Found some sort of updater sitting there in startup, and I never liked Java other than getting it direct from the manufacturer. We are going to try to peal that out and see if the RAM frees up after boot.


I hope this helps steer others away from the 32 bit and move towards a possible startup app taking up too much RAM (quite possibly malicious software is what I suspect when I see java trash hanging around).

Please do yourself / your friend a favor and try switching to a 64-bit version of Windows (7 / 8.1 / 10).

It's normal that with a 32-bit OS, only 3.5 GB of RAM are addressable.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message