Closed JonnyOThan closed 5 months ago
65289 [ERR 17:25:50.204] Module TweakScale threw during OnLoad: System.ArgumentException: An item with the same key has already been added. Key: TweakScale
65290 at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <9577ac7a62ef43179789031239ba8798>:0
65291 at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0
65292 at System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x00085] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
65293 at System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
65294 at TweakScale.ScaleExponents.CreateExponentsForModule (ConfigNode node, System.Collections.Generic.Dictionary`2[TKey,TValue] parent) [0x00040] in <6faecc74fdad4e4ba4e9a090ec4483f3>:0
65295 at TweakScale.ScaleType..ctor (ConfigNode scaleConfig) [0x00202] in <6faecc74fdad4e4ba4e9a090ec4483f3>:0
65296 at TweakScale.TweakScale.OnLoad (ConfigNode node) [0x0001a] in <6faecc74fdad4e4ba4e9a090ec4483f3>:0
65297 at PartModule.Load (ConfigNode node) [0x001ab] in <4b449f2841f84227adfaad3149c8fdba>:0
https://forum.kerbalspaceprogram.com/topic/222953-1125-wip-tweakscale-rescaled/?do=findComment&comment=4364456
The log file is restricted, so I'm not sure how much I can do with this until I get the full thing. But since exceptions in this function will be fatal to loading, I'd better make sure it's bulletproof even if that's a catch 'em all.