Getting this error in Title validation, connected to modded province history files. v1.10 RC17.
If I yank out all but the first few hundred mod province history files, this error doesn’t occur. But as I move more files back in, some of them result in the error, and some don’t, with no obvious pattern.
Beginning validation...
Beginning Titles validation...
ec) EXCEPTION CONTEXT
ec) Validation Task: Titles
Validation Key: HistoryTitles
Validation Type: Audax.Validator.GroupValidator
ERROR
System.AggregateException: One or more errors occurred. ---> System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
--- End of inner exception stack trace ---
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector)
at Audax.Validator.Clausewitz.Ck2.TitleCapitalChecksConstraint.Run(ElementNode node)
at Audax.Validator.Clausewitz.Ck2.TitleCapitalChecksConstraint.RunOnElement(ElementNode node)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.InheritanceConstraint.Validate(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.ComplexConstraint.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.PlaceholderConstraint.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Validate(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.ComplexConstraint.ElementValidate(ElementNode node)
at Audax.Validator.TypeExtension.DeclarativeValidatorJob.DeclarativeValidatorWorker.Validate()
at Audax.Validator.TypeExtension.DeclarativeValidatorJob.ValidateOverride()
at Audax.Validator.ValidatorJobBase.Validate()
at Audax.Validator.GroupValidator.ValidateOverride()
at Audax.Validator.ValidatorJobBase.Validate()
at Audax.Validator.ValidatorJob.Validate()
at Audax.Validator.GameValidator.<>c__DisplayClass5.<Validate>b__3(ValidatorJob val)
at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at Audax.Validator.GameValidator.Validate(Action onEachValidatorCompleteAction)
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
--- End of inner exception stack trace ---
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector)
at Audax.Validator.Clausewitz.Ck2.TitleCapitalChecksConstraint.Run(ElementNode node)
at Audax.Validator.Clausewitz.Ck2.TitleCapitalChecksConstraint.RunOnElement(ElementNode node)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.InheritanceConstraint.Validate(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.ComplexConstraint.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.PlaceholderConstraint.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.ChildConstraintSystem.ChildConstraint.Validate(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ValidateInstanceAsBase(ElementNode node, NodeFlags flags)
at Audax.Validator.TypeCore.ComplexConstraint.ComplexConstraintWorker.ElementValidate(ElementNode node)
at Audax.Validator.TypeCore.ComplexConstraint.ElementValidate(ElementNode node)
at Audax.Validator.TypeExtension.DeclarativeValidatorJob.DeclarativeValidatorWorker.Validate()
at Audax.Validator.TypeExtension.DeclarativeValidatorJob.ValidateOverride()
at Audax.Validator.ValidatorJobBase.Validate()
at Audax.Validator.GroupValidator.ValidateOverride()
at Audax.Validator.ValidatorJobBase.Validate()
at Audax.Validator.ValidatorJob.Validate()
at Audax.Validator.GameValidator.<>c__DisplayClass5.<Validate>b__3(ValidatorJob val)
at System.Threading.Tasks.Parallel.<>c__DisplayClassf`1.<ForWorker>b__c()
at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask)
at System.Threading.Tasks.Task.<>c__DisplayClass11.<ExecuteSelfReplicating>b__10(Object param0)
---> (Inner Exception #0) System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.ParallelEnumerable.ToDictionary[TSource,TKey,TElement](ParallelQuery`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)<---
<---
If I yank out all but the first few hundred mod province history files, this error doesn’t occur. But as I move more files back in, some of them result in the error, and some don’t, with no obvious pattern.