gibbed / Gibbed.MassEffectAndromeda

Tools & code for use with Mass Effect: Andromeda.
zlib License
63 stars 10 forks source link

"An Item with the same key has already been added" on later-progress save files #3

Open Alpha4615 opened 4 years ago

Alpha4615 commented 4 years ago

Hi, when trying to load any of my game saves (except for very early ones), both manual and auto save, it fails to parse and I get the above-captioned error message. The stack trace is below.

System.ArgumentException: An item with the same key has already been added.

   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Gibbed.MassEffectAndromeda.SaveFormats.Data.Plot.Read(IBitReader reader)
   at Gibbed.MassEffectAndromeda.SaveFormats.Agents.PlotAgent.Read2(IBitReader reader)
   at Gibbed.MassEffectAndromeda.SaveFormats.SaveData.<>c.<Read>b__96_1(IBitReader r, Agent t)
   at Gibbed.MassEffectAndromeda.SaveFormats.SaveData.ReadAgentData(IBitReader reader, Dictionary`2 agents, Dictionary`2 agentDataOffsets, Byte index, ReadAgentDataAction action)
   at Gibbed.MassEffectAndromeda.SaveFormats.SaveData.Read(IBitReader reader)
   at Gibbed.MassEffectAndromeda.SaveFormats.SaveFile.Deserialize(Stream input)
   at Gibbed.MassEffectAndromeda.SaveFormats.SaveFile.Read(Stream input)
   at Gibbed.MassEffectAndromeda.SaveEdit.ShellViewModel.<>c__DisplayClass44_0.<ReadSave>b__3() in c:\projects\gibbed-masseffectandromeda\projects\Gibbed.MassEffectAndromeda.SaveEdit\ShellViewModel.cs:line 255
   at Caliburn.Micro.DelegateResult.Execute(CoroutineExecutionContext context)

Sample save file is here.

Of possible relevance, This game-save does have DLC assets (Deep Space Pack, Deluxe Upgrade, Deluxe Edition Content) burned into it

Alpha4615 commented 4 years ago

Just an update, last night I was playing some and, among other things, sold nearly half my inventory of junk that's been filling up. The file is now loading into the editor, so I'm sure I probably removed some troublesome item the editor wasn't liking.

Here is the working file for comparison.