(A16 unstable) Insufficient memory (3.5GB) to save 2-colony game

Started by SkyNTP, December 14, 2016, 10:26:08 PM

Previous topic - Next topic

SkyNTP

After playing for a couple of hours, RimWorld runs out of memory (Task manager reports 3.5 GB). Faction is 2 years old, spread across two colonies, with a total of 11 colonists, 6 animals, and 2 colonies. Map size is 300x300 and world coverage is et to 30%.

The game doesn't crash outright, but it throws an error when I try to save.

No mods, obviously. Build 0.16.1387. My system is 64-bit with 32 GB of memory.

Edit: I reloaded the last save and monitored memory usage. It seemed to start out at 2GB, but increase up to 2.9GB over the course of an hour. I'll have to test it out more tomorrow. The issue may be a memory leak and not to do with colony size.

Illusion Distort

As the game progresses, the game ends up using more memory. Not really a bug there, but the fact that the game is unable to save... Larger (300x300) worlds are known for reducing gameplay ability on pc with low amounts of memory.

Could you post the save and the specs of your machine?

skullywag

Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog

SkyNTP

OK, I reloaded the save (using today's build) and played for a couple more hours. The game failed to save, though this time in a slightly different manner than the first time.

Yesterday, I received an in-game dialogue stating that there was insufficient memory to save the game, but the game itself never crashed outright. This happened at 3.5 GB as reported by TaskManager.

Today, after playing for a couple hours, the game crashed with the message "Too many heap sections" or something to that effect during a save. This happened at about 3.3GB of memory usage as reported by TaskManager. Looking over the saves, it appears that the last one is corrupted.

I monitored ram usage during play and noticed a steady increase from 1.5GB on first load all the way up to 3.3GB. At no point did ram decrease appreciably, even when reloading a slightly older map. Only restarting RimWorld clears memory usage.

I am running Windows 10 64-bit with 32 GB of memory, and i7-3770K, and a GTX-770. Game resolution was set to 3840x2160 (which keeps resetting to 2560x1440 any time I load a save, I might add) with UI scaling of 1.5 and "Run in background" enabled.

Download of crash report, corrupted save, and last usable autosave:

https://dl.dropboxusercontent.com/u/2240621/Rimworld_Ram_Bug.zip

Illusion Distort

#5
line 136 in the output_log

RimWorld.WorkGiver_DoBill provided target Thing_TableButcher1159303 but yielded no actual job for pawn Jennifer. The CanGiveJob and JobOnX methods may not be synchronized.


Could this be related?
Seems like the AI think nodes are using more memory than they should.

I am able to load and save (be it with lag) on my laptop 4 GB ram...

NOTE: after reaching main menu, the game closes after a moment...

SkyNTP

Running build 0.16.1389. RimWorld failed to save map after running out of RAM again, on same map. Same memory usage pattern, starting at 1.6GB, but no hard crash this time, just an in-game dialogue. Ram usage at that time: 3609.5 MB

Exception while saving map: System.OutOfMemoryException: Out of memory

Full Output_log.txt included.

Quote from: Illusion Distort on December 16, 2016, 03:55:12 AM
I am able to load and save (be it with lag) on my laptop 4 GB ram...

You won't reproduce the bug by simply opening and saving the map. The bug happens after approximately 1-2 hours of play as Rimworld.exe ram usage steadily increases.

[attachment deleted by admin due to age]

faltonico

This is not new to A16, i had had the same issue with my A15 colony (in a a 1100 man tribal raid). the game can't use over 4 GB of memory, no matter how much you have in your system (32-bit client). I have no memory leaks from any of my 116 mods.
Is time for you Tynan to stop and think about optimization for a little before keep adding content. Don't leave it for last, you could have to fix more stuff later Dx

Tynan

We are going to have to work on memory usage. OTOH, over 1 colony isn't really supported (hence the ingame message) so this is borderline not a bug.

Still, it's something we need to address for sure.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

faltonico

It doesn't have to be in this alpha or even in the next one, as long as you recognize the issue, i'm hoping you'll eventually work on it.
Thanks a lot!

Tynan

Tynan Sylvester - @TynanSylvester - Tynan's Blog