[FIXED] System.OutOfMemoryException

Post bug reports and ask for game support here.

Moderator: MOD_Command

Post Reply
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

[FIXED] System.OutOfMemoryException

Post by morphin »

Hi
I'm playing a very large scenario and i get often System.OutOfMemoryException messages in the exeption.log

I have 32GB Memory and Ryzen 9 3900X and Command.exe does not use more than about 2GB (Max is 2750MB i measured)

11/17/2020 2:50:54 PM -- B1147.14 -- Exception of type 'System.OutOfMemoryException' was thrown.
Exception: Exception of type 'System.OutOfMemoryException' was thrown.
Stack Trace: at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
at System.Text.StringBuilder.Append(Char* value, Int32 valueCount)
at System.Text.StringBuilder.AppendHelper(String value)
at System.Text.StringBuilder.Append(String value)
at Command_Core.FuelRec.()
at Command_Core.Ship.(XmlWriter& , HashSet`1& )
at Command_Core.Scenario.(XmlWriter )
at Command_Core.Scenario.(Stream , Boolean )
at Command_Core.GameGeneral.(Scenario )
at Command_Core.ScenContainer.()
at Command_Core.ScenContainer.(String theFileName, Boolean PreserveOriginalTimestamps)
at ..(Scenario theScen, Side theCurrentSide, String thePath, Boolean SBR, Boolean MarkAsCampaignCheckpoint)
Call Stack & Error details:
Error at 101005,
Error at 100761,
Error at 101022,
Error at 101087,
Attachments
Scenarios.zip
(9.11 MiB) Downloaded 45 times
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

RE: System.OutOfMemoryException

Post by morphin »

I hope you find a solution. After a few minutes of gaming (a few seconds of gametime). the first errors are logged in the exception.log. After that shortly there is not possible to save the game and later it crashes.

Thank's
Andy
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

RE: System.OutOfMemoryException

Post by morphin »

I See in the log that Stringbuilder is maybe throwing this error:

So maybe this is a solution to consider?

https://stackoverflow.com/questions/541 ... llion-char

Thank's
Rory Noonan
Posts: 2418
Joined: Thu Dec 18, 2014 1:53 am
Location: Brooklyn, NY

RE: System.OutOfMemoryException

Post by Rory Noonan »

Logged for investigation.

0014262
Image
Dimitris
Posts: 16041
Joined: Sun Jul 31, 2005 10:29 am
Contact:

Re: [Logged] System.OutOfMemoryException

Post by Dimitris »

Is this still a problem?
morphin
Posts: 756
Joined: Fri Apr 26, 2002 6:51 pm
Location: Switzerland

Re: [Logged] System.OutOfMemoryException

Post by morphin »

Dimitris wrote: Tue Apr 26, 2022 4:06 pm Is this still a problem?
I run run it for 10 seconds without any errors (latest Version 1147.45). Thank's for resolving it :-)
Dimitris
Posts: 16041
Joined: Sun Jul 31, 2005 10:29 am
Contact:

Re: [Logged] System.OutOfMemoryException

Post by Dimitris »

Thanks, closing.
Post Reply

Return to “Tech Support”