Sujimichi / CraftManager

KSP mod to replace the stock craft list in the editors
Other
7 stars 6 forks source link

Exception: "Same key already exists" - UI Opens, but is blank #3

Closed Beetlecat closed 6 years ago

Beetlecat commented 6 years ago

KSP 1.4.3 on windows

I see this when going into SPH: "Argument Exception: An element with the same key already exists in the dictionary"

That message, and an additional NRE appear when attempting to click the "open" button.

When clicking the toolbar icon, the open button, or control-O, a UI panel appears but is blank except for a few controls and text barely visible in the upper-left corner. Nothing is clickable or selectable.

No other mods that affect craft loading/saving are present, as well as a minimal set of mods, otherwise. I'll try on an absolutely clean KSP to see what could possibly be colliding.

Sujimichi commented 6 years ago

Is this the same as you see in the KSP.log?

[LOG 21:56:33.174] [CM] Initializing Cache
[LOG 21:56:33.175] [CM] caching game parts
[EXC 21:56:33.176] ArgumentException: An element with the same key already exists in the dictionary.
    System.Collections.Generic.Dictionary`2[System.String,AvailablePart].Add (System.String key, .AvailablePart value)

If so, I'm already on it! Caused by there being two parts with the same name while Craft Manager create a list of available parts Should have fix (and a new feature) out very soon.

Beetlecat commented 6 years ago

Excellent! I was worried I had blown up something major by initially having Craft History installed (it also takes over the "open" button). It kept defying my efforts upon removing mod after mod. I do have a couple part mods still installed, so maybe that was triggering this problem?

I was displaying the exceptions on-screen, but can confirm in the log file (once I remember where KSP stores them now... )

Sujimichi commented 6 years ago

This should be fixed now in 1.0.2 and 1.1.2.