JonnyOThan / TweakScale

Forked from Gaius Goodspeed's Goodspeed Aerospace Part & TweakScale plugin
Other
3 stars 2 forks source link

Duplicated scaletypes cause problems #26

Closed JonnyOThan closed 6 months ago

JonnyOThan commented 6 months ago
[LOG 22:54:37.298] Config(SCALETYPE) TweakScale/ScaleTypes/stack
[LOG 22:54:37.329] Config(SCALETYPE) TweakScale/patches/010_ScaleTypes/stack
[LOG 22:54:40.496] [ModuleManager] Calling Scale.ScaleType.ModuleManagerPostLoad()
[EXC 22:54:40.510] [ModuleManager] Exception while calling Scale.ScaleType.ModuleManagerPostLoad(): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added. Key: stack
  at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  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 
  at System.Linq.Enumerable.ToDictionary[TSource,TKey] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] keySelector) [0x00000] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at TweakScale.ScaleType.ModuleManagerPostLoad () [0x00042] in <32daea5c899c4418aaba669015b95304>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <9577ac7a62ef43179789031239ba8798>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at ModuleManager.PostPatchLoader+<Run>d__16.MoveNext () [0x00617] in <15a1f1ead20a4e7995346c905233ca64>:0 

Probably caused this?

[ERR 22:55:46.705] Module TweakScale threw during OnLoad: System.NullReferenceException: Object reference not set to an instance of an object
  at TweakScale.ScaleType..ctor (ConfigNode scaleConfig) [0x00072] in <32daea5c899c4418aaba669015b95304>:0 
  at TweakScale.TweakScale.OnLoad (ConfigNode node) [0x0001a] in <32daea5c899c4418aaba669015b95304>:0 
  at PartModule.Load (ConfigNode node) [0x001ab] in <4b449f2841f84227adfaad3149c8fdba>:0 
[EXC 22:55:46.851] NullReferenceException: Object reference not set to an instance of an object
    TweakScale.TweakScale.IModuleInfo.GetInfo () (at <32daea5c899c4418aaba669015b95304>:0)
    PartLoader.CompilePartInfo (AvailablePart newPartInfo, Part part) (at <4b449f2841f84227adfaad3149c8fdba>:0)
    PartLoader+<CompileParts>d__56.MoveNext () (at <4b449f2841f84227adfaad3149c8fdba>:0)
    UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <12e76cd50cc64cf19e759e981cb725af>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)