Issue Game cannot load - SaveGame.getLoadEnumerator

johnth822

Newcomer
Today I cannot load my game with the following error. Can someone help?

13:35:33 ERROR SMAPI An error occurred in the overridden update loop: ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
at Netcode.NetDictionary`5.set_Item(TKey key, TValue value)
at StardewValley.SaveGame.getLoadEnumerator(String file)+MoveNext()
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 664



SMAPI log here:
 
Last edited:

UlyanaLeyana

Planter
Today I cannot load my game with the following error. Can someone help?

13:35:33 ERROR SMAPI An error occurred in the overridden update loop: ArgumentNullException: Value cannot be null. (Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKey key)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
at Netcode.NetDictionary`5.set_Item(TKey key, TValue value)
at StardewValley.SaveGame.getLoadEnumerator(String file)+MoveNext()
at StardewModdingAPI.Framework.SCore.OnPlayerInstanceUpdating(SGame instance, GameTime gameTime, Action runUpdate) in SMAPI\Framework\SCore.cs:line 664



SMAPI log here:
It seems your "name_numbers" is corrupted/broken, just try to : Undo the last save
 

johnth822

Newcomer
Unfortunately the "_old" file is also corrupted. I wrote a script to zip the save and archive multiple versions, for future cases.

@UlyanaLeyana Do you have some more details about the "name_numbers"? I can try clean up the save file xml if I have some clue.
 

UlyanaLeyana

Planter
Unfortunately the "_old" file is also corrupted. I wrote a script to zip the save and archive multiple versions, for future cases.

@UlyanaLeyana Do you have some more details about the "name_numbers"? I can try clean up the save file xml if I have some clue.
Smapi makes a lot of backups of your "Saves" folder, located in
Code:
Steam\steamapps\common\Stardew Valley\save-backups
 

johnth822

Newcomer
I am using steam version in macos. In folder "~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/save-backups", I found some backup files. Unfortunately, it's also incomplete. File "2022-10-22 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip" already has corrupted save file, and the earlier zip, "2022-10-21 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip", only contains "SaveGameInfo_old", not the actual xml save file (note the smaller zip file size below).

Thank you @UlyanaLeyana for your help. It's okay. I will start a new game with more backups. With the flexibility of all mods (which is great), it's reasonable the save file corrupts at times. It would be great if the base game has better save file support, like longer save history.

Code:
cd "~/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS/save-backups"
ls -l
-rw-rw-r--  1 user  group     520 Oct 18 00:10 2022-10-18 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group     520 Oct 18 19:43 2022-10-19 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group      22 Oct 19 17:20 2022-10-20 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group   17834 Oct 20 19:48 2022-10-21 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group  170344 Oct 21 17:28 2022-10-22 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group  170344 Oct 22 18:14 2022-10-23 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group   30030 Oct 23 17:06 2022-10-24 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group      22 Oct 24 18:07 2022-10-25 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group      22 Oct 25 17:38 2022-10-26 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
-rw-rw-r--  1 user  group      22 Oct 26 19:19 2022-10-27 - SMAPI 3.16.2 with Stardew Valley 1.5.6.zip
 

UlyanaLeyana

Planter
Thank you @UlyanaLeyana for your help. It's okay. I will start a new game with more backups. With the flexibility of all mods (which is great), it's reasonable the save file corrupts at times. It would be great if the base game has better save file support, like longer save history.
Have you removed any mods that you played with on this save?
 
Top