ChrisNZL / Tallowmere2

Changelog, issue tracker, and development knowledge for Tallowmere 2.
https://tallowmere2.com
13 stars 0 forks source link

Category_Play_Load: ArgumentException: An item with the same key has already been added. #994

Closed ChrisNZL closed 2 years ago

ChrisNZL commented 2 years ago

Auto report, v0.3.0a, feedback ID 20220105-BZ4YD

Player has a copy of a saved game file in their saves directory, thus the file has the same save timestamp as another file.

Category is failing to load file because timestamp is unique and already exists in sorted list.

12:56:53, Frame 533, LOG »  FileSystem: Finished reading local file: Account.t2
12:56:53, Frame 533, LOG »  FileSystem: Finished reading local file: SavedGame.001 (copy 1).t2
12:56:53, Frame 533, LOG »  FileSystem: Finished reading local file: SavedGame.001.t2
12:56:53, Frame 533, LOG »  FileSystem: Finished reading local file: SavedGame.002.t2
12:56:53, Frame 533, LOG »  FileSystem: Finished reading local file: SavedGame.003.t2
12:56:53, Frame 533, LOG »  FileSystem: Finished reading local file: SavedGame.004.t2
12:56:53, Frame 533, LOG »  FileSystem: Total local files loaded: 11
12:56:53, Frame 534, LOG »  Signed in (if supported). Loading options...
12:56:53, Frame 534, LOG »  Account.t2 file found. byte length: 2,048. Importing...
12:56:53, Frame 534, LOG »  STEAM: Requesting stats and achievements from Steam...
12:56:53, Frame 534, LOG »  InputLibraryProfile: Activating InControl
12:56:54, Frame 539, LOG »  STEAM: Received stats and achievements from Steam.
12:56:54, Frame 539, LOG »  STEAM: Total achievements earned: 37

12:57:23, Frame 2312, EXCEPTION »  ArgumentException: An item with the same key has already been added. Key: 1629369017
Parameter name: key
>>>>> CRITICAL ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

System.Collections.Generic.SortedList`2[TKey,TValue].Add (TKey key, TValue value)
T2.Category_Play_Load.RebuildCategoryItemsForSavedGames ()
T2.Category_Play_Load.OnAboutToShowMenuItems ()
T2.CanvasMenu.SetCategoryAndUpdateAppearance (T2.Category newCategory, System.Boolean forceRebuildMenuItems)
T2.Action_ShowCanvasMenuWithCategory.ExecuteAction ()
T2.CanvasMenu.Update ()

GameStates: ShowingTitleScreen, UsingMainMenu
OnlineGameInfo: Device is offline.
No previous server nor online game info.
SystemPlayer InputDevice: Keyboard
ChrisNZL commented 2 years ago

Handled in 0.3.1.

Category will skip the file if the saved game has already been added, and will log a Warning.