the Sim Settlements forums!

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Save File Issue - Potential Fix Here

Hmm - lots of inconsistent findings. I also just realized that WSFW also added a ton of Resource AVs when it launched and didn't cause any issues - so we may be barking up the wrong tree here.

Maybe not related but exporting a settlement with WSFW will ALWAYS cause a very long save afterwards for me. Sometimes the game just completely freezes, I just got in the habit of killing it with task manager after export.
 
Maybe not related but exporting a settlement with WSFW will ALWAYS cause a very long save afterwards for me. Sometimes the game just completely freezes, I just got in the habit of killing it with task manager after export.
My game always freezes on a save. Just let it be. It will fix itself. Generally my game just locks up for a good minute or two with every save, but it always responds again and saves normally.

This may be a key though as to what the problem is..
 
My game always freezes on a save. Just let it be. It will fix itself. Generally my game just locks up for a good minute or two with every save, but it always responds again and saves normally.

This may be a key though as to what the problem is..

The SS2C2 saves are not really consistent for me, sometimes they are normal length of a few seconds at other times they can be a minute or more. Generally speaking saving after a long save will be near instant and saves will be quick until I enter a different settlement, then I may or may not get a long save again depending on how long I'm in the settlement before I save again.
 
Hi,
Plug-in activated on a current game - only Sanctuary so far and about 10-12 plots created. Big modlist but adding the plugin made no difference I can see to save times, running about 60-90 seconds. Unless it needs a new game. Hmm although once outside Sanctuary saves are pretty much back to normal (few seconds)
 
For me, autosaves worked perfectly. My manual saves as well. Fast travel caused me no issues before and still do not now. I had 1 to 2 minute save times before, now it's a blink. I have only played for like 20 minutes though. I will try more when I can.
 
Hmm - lots of inconsistent findings. I also just realized that WSFW also added a ton of Resource AVs when it launched and didn't cause any issues - so we may be barking up the wrong tree here.
I don't know the intrinsic of the VM but for a save to happen, the VM needs to freeze to then thaw. I have a hunch that it's this part that's causing the issue (not the serialization per se). You're a script master... do you know a way that we can "force" the VM to freeze and thaw "organically", i.e., without actually crashing the VM due to bad code (execution flood and/or infinite loops)? If there's a legit way to force a freeze/thaw in code, you could ask the users to try some test code and see if it takes a long time to do so by spitting some trace messages.
Does that make sense or am I just saying nonsense?
 
I don't know the intrinsic of the VM but for a save to happen, the VM needs to freeze to then thaw. I have a hunch that it's this part that's causing the issue (not the serialization per se). You're a script master... do you know a way that we can "force" the VM to freeze and thaw "organically", i.e., without actually crashing the VM due to bad code (execution flood and/or infinite loops)? If there's a legit way to force a freeze/thaw in code, you could ask the users to try some test code and see if it takes a long time to do so by spitting some trace messages.
Does that make sense or am I just saying nonsense?
I have no idea how it works in a Bethesda game, but in Unity, we just send a snapshot of the world/char state to a new thread and deal with the serialization and I/O there. The snapshot usually takes less than a sec to create, which is that little stutter you get when you press F5. The save time itself is irrelevant, but seen here in this case it can take up to 20min, which could mean progress loss and no easy workaround.

If I was coding the game from scratch I would try to place a "stuck" detection and resave, i.e., if the % of the save doesn't change for X amount of time, abort and try again. But the code itself would be embedded deep in the game code and probably unreachable by modders. Don't quote me on this, it's just my intuition.

On a different note, I wonder if canary save has anything to do with it... gonna try disabling it to see how it behaves :)

EDIT: No luck with the canary theory. It worked fine after opening the workshop and city planner, but when I fast travelled from one settlement to another the save hanged.
 
Last edited:
Hmm - lots of inconsistent findings. I also just realized that WSFW also added a ton of Resource AVs when it launched and didn't cause any issues - so we may be barking up the wrong tree here.
I don't know the intrinsic of the VM but for a save to happen, the VM needs to freeze to then thaw.
IIRC, in the Papyrus log file, when a save is initiated it outputs XXX time Papyrus VM Freezing, XXX time Papyrus VM Frozen, XXX time Saving Game. I'm guessing we can use this to see if scripts are causing this issue by seeing how long it takes to go from Freezing to Frozen.

My other thought is what is the difference in save file sizes? I remember in the past when my save bloated north of 100 and some MB the game started being unstable. I don't remember this causing long save times but it could just be fuzzy memory.
 
I went back to a save that had a crazy amount of settlers and made it even worse on purpose. Before that I updated everything to the latest versions (SS2, chapter 2 and workshop) and enabled the mod included in this thread.

So, 200+ mods, 97 settlers in Sanctuary, multi-storey greenhouses full of interior plots and a shantytown of ugly 2x2 residential plots infesting the river. It took me 2+ hours of gameplay to trigger a 22 min quicksave in Red Rocket arriving from Sanctuary. Before that I did a couple of defend missions and built even more stuff in Sanctuary. Got a few ~3min saves and a 8min before that major 22min.

After that, I went back to a non-ruined-forever version of the same save, but without the test esp enabled. Got a couple of ~10 min saves visiting settlements pretty early on, but then played the whole evening without problems doing ss2 chapter 2 quests. Surprise, surpsise, doing random things in the game gives random results. If I can trigger a really long save reliably, I'll try this again.

I've been having less problems with saving times lately, but many things can explain that. I cut down the number of settlers. I tweaked performance settings in the city manager holotape. I kept my SS2 installation updated as fixes came. I didn't force close the game, but instead I let those long saves go on - maybe something got finally resolved. I've also turned down grass density.

Because I've a half-decent CPU (Ryzen 5 5600X) that the game doesn't really use much (10-30%), and a rather outdated GPU (RX580) that's always maxed out unless the game is doing dialogue scenes, I'm thinking there are just too many objects and effects in the game with all these mods. I did have one +20min quicksave outside settlements during heavy rain (Truestorms).

All I know I didn't have saves minutes long before installing chapter 2. Maybe it's just what broke the camel's back. I guess I should also mention that when I went briefly back to chapter 1 only, my long save times didn't disappear like magic. For that I needed to use an older version Workshop Framework (and chapter 1 prompted by the warning of having an outdated version of Workshop Framework).
 
IIRC, in the Papyrus log file, when a save is initiated it outputs XXX time Papyrus VM Freezing, XXX time Papyrus VM Frozen, XXX time Saving Game. I'm guessing we can use this to see if scripts are causing this issue by seeing how long it takes to go from Freezing to Frozen.

My other thought is what is the difference in save file sizes? I remember in the past when my save bloated north of 100 and some MB the game started being unstable. I don't remember this causing long save times but it could just be fuzzy memory.
That's true, the log is already timestamped. I'll ask in the other thread for users to provide the last lines of their log. At least we would know if the hunch is true and worth pursuing.
As for save size, at least mine didn't change at all between vault 111 and bug happening (I had that problem, then I went back to SS2 1.1 because I wanted to do a real playthrough this time), I remember checking. Also remember a couple users mentioning their save size and it seemed was normal.

I guess at this point is worth to ask those with a very minor modlist to provide their saves and have kinggath replicate locally so he can debug it...
 
I've been doing some tests, old workaround performances tricks and this had a bigger impact than I was expecting. I know this is far from a solution, but removing CPU affinity from CPU 0 (along with the mod in this thread) greatly improved my save times. Even after bunnyhopping and doing upgrades on several settlements, the longest save I had was a little more than 1min. All saves outside settlements are near instant.

Hope this helps someone.

Few people refered that the saves keep timestamps of what they are doing... if you don't mind me asking, how can I check that?
 

Attachments

  • 1640186234611.png
    1640186234611.png
    73.6 KB · Views: 29
i don't have long save latencies yet, but my save sizes have grown from about 85mb to 105 mb since the installation of SS2/CH2.

I haven't built a single plot yet, I've just been running around testing stability.

Unfortunately i have to say that i have infinite loading screens much more often now. it also happened before from time to time, so i always traveled with fast travel (teleportation) to homeplate first and from there on to the target. 95% of the time it worked without problems.

But now this no longer works, I now almost always have an infinite loading screen. For me, the loading to homeplate usually takes a few seconds. in comparison, when I load a save for the first time, the first save (game start) takes 1-2 minutes. When 'fast travel' or 'save' load in the game it must not take longer than 40-60 seconds (except for death, that takes longer) otherwise I have an infinite loading screen. Then nothing more happens. i can then wait for an hour.

Fast Travel save is off, I play in survival mode. (fast travel function is on, thanks to mod). However, I use for fast travel the mod 'Immersive Teleportation 2'. I think it is the same function. Heavy modded game (+450 mods).

Edit: normal save in game, a few seconds.
but I noticed that recently when leaving the game (exit) it sometimes takes 10 minutes or more until the game is closed. here is also saved.
 
Last edited:
Every test I've tried that resulted in long saves started right after I began placing down SS plots.
For me, the long save bug did not occur when I only had 1 residential plot built. It was only after the quest Plotting the Future, where I built an agricultural and an industrial plot, when the problem started.

I am on Xbox One X. Chapter 2 is not installed, so it's a base mod or WSFW issue.

Tonight, I am going to lay down the agricultural plot and try to save before making the industrial plot.
 
Oops - I probably forgot to update the MCM descriptions. The default is OFF now. Any save started after 2.0.17b of Workshop Framework will find them disabled as there were too many people having trouble with them for me to feel comfortable leaving them on by default.
I have the latest workshop framework.
Mine was defaulted to ON.
Manually chanced to off.

Edit: I'm using mod organizer 2 and have a few games going. The game I looked in must have been one I hadn't used in a while. The others I looked at are defaulted to off. So, no problem about that anyway.
 
Last edited by a moderator:
I've been doing some tests, old workaround performances tricks and this had a bigger impact than I was expecting. I know this is far from a solution, but removing CPU affinity from CPU 0 (along with the mod in this thread) greatly improved my save times. Even after bunnyhopping and doing upgrades on several settlements, the longest save I had was a little more than 1min. All saves outside settlements are near instant.

Hope this helps someone.

Few people refered that the saves keep timestamps of what they are doing... if you don't mind me asking, how can I check that?
This could point it to a threading issue... I suspected that too but if the VM entered a deadlock, I would expect the game to really freeze without recovery... But as the VM has mechanisms in place to recover from an infinite loop without crashing the game, that might also be true for thread deadlock. On my last mod I encountered thread issues causing me to have wrong values so I had to change my approach and write my code differently. But yeah, could be that... but debugging thread issues is nasty... kinggath would have to go through his scripts and see if some thread might be locking another... and it could be any function doing that. I hope is not that for his sake...

EDIT: About papyrus logging, if that's what you were asking.
 
This could point it to a threading issue... I suspected that too but if the VM entered a deadlock, I would expect the game to really freeze without recovery... But as the VM has mechanisms in place to recover from an infinite loop without crashing the game, that might also be true for thread deadlock. On my last mod I encountered thread issues causing me to have wrong values so I had to change my approach and write my code differently. But yeah, could be that... but debugging thread issues is nasty... kinggath would have to go through his scripts and see if some thread might be locking another... and it could be any function doing that. I hope is not that for his sake...

EDIT: About papyrus logging, if that's what you were asking.
Debugging multithreaded software is probably one of the hardest things to do, so let's just hope Todd did something right for once xD this is why I love the Unity3D job system, it takes care of the multithread for you and allows you to debug line to line in the "synchronous" code... sorry, don't want to extend too much about unity since it is completely OT.

Tkx for the papyrus link, gonna turn the debugging on to see if I can gather more information.
 
Last edited:
This mod seemed to drastically reduce my save time from around 12-infinite minutes to less than 1. Now I originally thought this was an incompatibility issue as I am running some 250+ mods and had just updated SS2 and WSFW and just installed SS2/C2.

Just to make sure, this mod will render the save game it is being used on corrupt and to not officially play on it?
 
Last edited:
First papyrus report... don't think it is the source of the problem, but well... an error is an error.

Getting lots of errors on function calls pointing to a folder that doesn't exist 'F\Data\Scripts\Source\User\SimSettlementsV2\...'. But since I'm not geting a file not found or anything like that I'm just going to assume that MO put it somewhere else and it is working as intended.... as for the errors, I fast travelled to sanctuary to see what papyrus would say and pause the game as soon as I could:
  • Shader.play().
  • GetContainer on a null a lot on BulletinBoard.CleanUpBulletinsRefs() {root call from BulletinBoard.psc lince 66}
  • SetMotionType() also on from bulletins
  • SetPosition() also on from bulletins
  • SetAngle() also on null from bulletins
  • tons of 'cannot enable a deleted object' on the information icons (lines 77 and 50)
  • tons of 'does not have 3d and cannot have an effect shader played on it' also on infirmation icons (line 80 and 50)
  • array out of range on GetCityPlanCostMultipliers() ' error: Array start index 11 is out of range (0-10) ' CityPlannerManager.psc (1193 - 1011 - 1518 - 276 lines for complete trace)
  • 'Failed to setup moving reference because it has no parent cell or no 3D' ObjectReference.psc line 959
  • out of stack memory, dump is too big... check it here if you want: https://drive.google.com/file/d/1QTPy-kDotiIpeXqj1LQxXtJGQeDNAw17/view?usp=sharing
  • after the dump there are a bunch of array out of bounds on function CollapseCityPlanCostMultipliers() {CityPlaManager.psc lines 1240 - 1013 - 1518 - 276}
That's it for now. Save times were not affected by any of this, meaning the save was almost instant.
 

Attachments

  • 1640197539180.png
    1640197539180.png
    6.1 KB · Views: 5
Last edited:
Is there a way to get the VM saving verbose? It's infuriating to only see saving............. saved


for instance, I got an almost 4 minute save, but this is all the information the papyrus gave me about the VM:

1640208411647.png

I looked in the wiki and google but couldn't find anything

EDIT: just throwing out there.... the long save happened after a long crafting section (drugs and food)... during the process I levelled up a few times and then saved the game. I don't think it is relevant, but hey, that's info :P
 
All I know I didn't have saves minutes long before installing chapter 2. Maybe it's just what broke the camel's back. I guess I should also mention that when I went briefly back to chapter 1 only, my long save times didn't disappear like magic. For that I needed to use an older version Workshop Framework (and chapter 1 prompted by the warning of having an outdated version of Workshop Framework).
It broke everyone's camel, even players that only have SS2, Ch2, WSFW and HUDFW. Mod conflict is always the first suspect but was quickly ruled how. Players that only updated WSFW and never installed Ch2 didn't get the problem. Players that update SS2 to 2.0 but didn't install Ch2 did get the slow saves. Unfortunately that's really nothing to go on and has resulted in random theories, no matter how unlikely, being put to the test one by one. its been about 2 weeks and this is how far we've gotten. Pretty impressive considering it's all being done by independent volunteers and one of them had Covid for part of it.

Also, 97 settlers!? Why would you do that to your PC? What did it do to piss you off so bad?
 
Top