Jump to content

Bug Report: ArgumentException: An element with the same key already exists in the dictionary


Recommended Posts

Not sure if this is from KSP or MOD (most mods I use log with tag so guessing KSP):


ScaleModList: listSize 164 maxListSize 1643
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

[MessageSystem] Reposition 0.02 12205
 
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 64)

ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.Type,System.Int32].Add (System.Type key, Int32 value) [0x00000] in <filename unknown>:0
  at Contracts.ContractSystem.LoadContractWeights (.ConfigNode gameNode) [0x00000] in <filename unknown>:0
  at Contracts.ContractSystem+<OnLoadRoutine>c__Iterator80.MoveNext () [0x00000] in <filename unknown>:0 

Link to comment
Share on other sites

I have a similar error on my KSP.log when I load a 1.1.2 game in my 1.1.3 installation.

The games loads almost fine but all my past contracts (finished and active) are removed.

I really don't know which mod is causing this, but this is a tough one: if I start removing mods to find out which is causing this I will also start losing ships that require those mods.

Anyone else had this problem?

Eventually I will have to remove mods and start my game again and again, but I prefer to ask first in case someone else has done this already and can help me narrowing the problem (I'm talking of about 200 mods running)

 

Link to comment
Share on other sites

  • 3 months later...

I just encountered this today with 1.2, and have started to diagnose it.

 

In a totally stock game it's fine, but adding in my mods breaks it - the weird thing is that it was working fine this morning, and all of a sudden it broke on me.

I can go into the admin building, or the cheat menu and accept a contract, but when I enter the VAB or load a new game - poof.  Gone.  I have not checked all of the buildings.

 

  Reveal hidden contents

 

Edited by sentania
Link to comment
Share on other sites

I have done some further digging, and like the UI flickering issue, I've seen in game and referenced in the forums, this appears to be something related to the stock game, but triggered by mods, most likely volume of parts.

Scenario:

1.2 with the following mods installed, all mods are up to date relative to themselves.

  Reveal hidden contents

*If* I load the game (1.2 x64), with said mod list, but with the KSP 1.1.3 compatible release of the @Nertea suite, things function as expected.

*If* I load the game (1.2 x64), with said mod list, but without the 1.2 compatible release of the Nertea suite, things function as expected.

*If* load the game (1.2 x64), with *only* the 1.2 compatible release of the Nertea suite, and it’s requirements, things function as expected.

*If* load the game (1.2 x64), with all mods listed above, but with the 1.2 compatible release of the Nertea suite, things do not function as expected.

I observe the following issues:

When you load a game, all active, offered, and your completed contract history reset.

When you enter the VAB, all active, offered, and your completed contract history reset.

This is the error message logged when the contract history is reset:

  Reveal hidden contents

 

We’d have to see what nertea changed in this release, but having parsed his files, I’m guessing a lot more tags or some such – resulting in an overload of something somewhere.

The bug tracker appears down at the moment otherwise this would be in there.

Edit: Figures that now I go and throw all the mods back together, fire things up and it's behaving normally.  SMH.  I'll play around with it some more if no one else sees anything related to this, or if it crops up some more.

 

Edit 2: There it is again.  It's definitely a function of how many parts are displayed in the VAB.  Toppled tech tree = sorry.  Fresh, super low tech game, no issues.

Edited by sentania
tag nertea damnit
Link to comment
Share on other sites

Edit: In my case it's a bug with Cryogenic Tanks mod, followed the modder's instructions, deleted some plugins, and now contracts are working 100%.

 

 

Confirm, it's happening to me too. In my case, it's when I install Cryogenic Tanks & Kerbal Atomics. No need to have many parts unlocked in the tech tree, if I install these mods and start a new Career, accepted contracts will immediately dissappear when going into VAB, SPH, or launch pad.  

 

  Reveal hidden contents

I remove these two mods and contracts are fine again. I don't get disappeared contracts back, but new ones I accept no longer disappear.

 

 

Edited by lokodehortaleza
Found solution
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...