Semi-Random Crashes

Started by BaconHer0, March 11, 2018, 05:56:22 PM

Previous topic - Next topic

BaconHer0

I'm getting semi-random crashes... happens sometimes when I load up the world map or on auto-saves.

Out put log shows "DynamicHeapAllocator out of memory - Could not get memory for large allocation 1706752!" but I have 16gb of ram.

I am running a lot of mods so I'm not sure which one is the culprit (if any). My game is also on 100% world and max size map

Calahan

It sounds like you are simply running out of available memory. RimWorld is a 32bit application so can only use 4Gb of memory at most, and irrespective of however much RAM your computer has. And this upper limit can also be 10-20% lower depending on your version of Windows (note I assume you are using Windows).

Your game settings make a difference as well, and using the large(st) worlds and maps like you are requires more memory than smaller worlds/maps. And of course mods use memory as well, and the more mods you use the more memory the game needs as a consequence. How you play is also a factor, and if you like playing with large based with dozens of Pawns and animals, then I think you already know the answer as to what impact that has on the game's memory requirements.

Your only options are to reduce the number of mods you are using, world/map sizes, and the number of Pawns/animals you keep.

BaconHer0

Ah I didn't know rimworld was limited to 4gb...

I'll disable a bunch of mods I guess :(

nccvoyager



@Calahan, even though you probably knew all of this, I still feel like noting it here.

Windows Vista and 7 tend to reserve 1.5-2GB of RAM for the OS alone.
This means that 32-bit programs are always limited to 2-2.5GB of RAM when using 32-bit operating systems, and are (usually) limited to 2-2.5GB of RAM on 64-bit operating systems.
IIRC, Rimworld does already use the Large Address Aware flag, meaning that Rimworld should (usually) be able to use up to 4GB of RAM on a 64-bit system with at least 6GB of RAM.
As you said though, any number of factors can change the amount of available RAM for Rimworld.

A suggestion I would give (for those using 64-bit systems) is to ensure that (at least) 1GB of your system HDD/partition is reserved for a system page file, and add another larger page file to a separate HDD if possible.
(I know some people say to remove the page file from the system drive. I suggest against it, as it can reduce the efficiency of the operating system, and actually cost more resources as a result.)

The system page file is "virtual" memory.
It is a location on one or more HDDs where your operating system can store unused physical memory blocks. (Simplified, I know.)
This can in turn result in memory blocks being freed up for programs, even freeing memory that is technically being used by active programs, but which has not been accessed in a while.

I run Windows 7 Professional, 64-bit.
For my system, my memory configuration shows as:
8GB physical RAM; 6.77 usable
Total Virtual memory available; 16.9
  Small system page file on OS HDD; 1000MB (reserved) to 6000MB (maximum)
  Mild system page file on secondary HDD; 10000MB (reserved) to 14000MB (maximum)


With this setup, I have not had a single Out Of Memory error with Rimworld as of yet.

Canute

If you didn't change anything at the Window's memory setting, windows (all version) allways can use the remaining harddisk space a virtual memory.
But that isn't the Out of memory problem you encounter at Rimworld.
It is the addressing memory problem of 32 bit program's, they only can address 3,2 GB RAM.
The virtual memory just allow any program to get the full max. memory so long there are harddisk space.

If you didn't encounter any "Out of memory" crashes, just show that you use the right amount of mod's with the right map size.

BaconHer0

@nccvoyager

Thanks for the advice... I increased my total virtual memory to 25gb on top of my 16gb of ram. Game's a lot more stable now but I just ran into a savegame error... out of memory too and the game didn't save properly :(

Guess I might have to remake a game that's not 100%, 400x400

nccvoyager

@Canute, indeed, this is somewhat true, from what I have observed, Windows XP and newer do "automatically" handle the page file size, technically.
The problem I have found is that Windows doesn't seem to reserve sufficient HDD space for the page file for the long-term system running most people tend to do now.
(I myself have been guilty of having my computer on for 6 full weeks, no restarts, shutdowns, or even sleep or hibernation cycles.)

While keeping a sufficient page file around isn't a complete solution, I find it helps with some stability and out of memory errors.
(Especially out of memory STOP errors.)

That said, as you mentioned, the issue here is mainly the 4GB memory capacity for 32-bit executables.

@BaconHer0, I am afraid you are correct in your assumption.
Running the default 200x200 map size will reduce the memory load per settlement to around 25% of what it is at 400x400.
(I think that's the default, anyway. Not entirely sure.)

400x400 is okay for some single-settlement games, but multi-settlement games, (which are officially unsupported as-is,) or heavily modded games should probably be run at lower map sizes.

BaconHer0

My performance improved further when deactivating some super resource intensive mods:

"Wild Animal Sex" caused my map to be infested with boom rats. They were reproducing out of control and were super thirsty because I had the "No Water, No Life" mod on as well that caused each animal to actively look for water spots.

"Nature's Pretty Sweet" is a great mod but caused my fps to drop quite a bit, definitely a memory hog and "Centralized Climate Control" caused my game to have a severe performance hit when I built the buildings.

PASorenson

I'm getting the feeling one of the recently-updated mods somehow introduced a memory leak, since I've been binging on rimworld for the last 2 weeks or so and only noticed these sorts of crashes as of about 36 hours ago; I could let things run in the background for hours and hours with no problem, but now it barely lasts an hour before keeling over. Only mod I've installed around that timeframe was Achtung, but I know Psychology and a few other major mods have pushed out a few new versions since then.

Fistandantillus7

I just started having this problem yesterday. Is there a way to figure out how much memory each mod is using?
Evil reptilian kitten eater from another planet.

BaconHer0

Quote from: PASorenson on March 16, 2018, 09:06:57 AM
I'm getting the feeling one of the recently-updated mods somehow introduced a memory leak, since I've been binging on rimworld for the last 2 weeks or so and only noticed these sorts of crashes as of about 36 hours ago; I could let things run in the background for hours and hours with no problem, but now it barely lasts an hour before keeling over. Only mod I've installed around that timeframe was Achtung, but I know Psychology and a few other major mods have pushed out a few new versions since then.

Same thing happening to me despite deactivating more mods. Very annoying. I run Psychology as well

Canute

Mod's that add just another collection of item/armor/weapon arn't that worse.
But mod that need constant calculation/job searches need alot.
Nature's Pretty Sweet is at example.
Mod's that add more dynamic into the gameplay.

If you want to try this mod's play on standard or smaller maps.
Or think about to add a linux partition, because Linux Rimworld is 64bit and don't got this limitation.

Fistandantillus7

Heat Map posted a notice of fixing a memory leak introduced in the previous update.
Evil reptilian kitten eater from another planet.