-
Notifications
You must be signed in to change notification settings - Fork 382
Description
Hi
I am using Mapster 3.0.4 with DotNet Core 1.0. I am getting following intermittent error in production where the application has many user bases. I doubt Mapster is not considering thread safety while converting the object model. Can you please help to solve this issue?
"System.TypeInitializationException: The type initializer for 'Mapster.TypeAdapter2' threw an exception. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.Dictionary2.Enumerator.MoveNext()
at Mapster.SettingStore.Apply(SettingStore other)
at Mapster.TypeAdapterConfig.GetMergedSettings(TypeTuple tuple, MapType mapType)
at Mapster.TypeAdapterConfig.GetCompileArgument(TypeTuple tuple, MapType mapType, CompileContext context)
at Mapster.TypeAdapterConfig.CreateMapExpression(TypeTuple tuple, MapType mapType)
at Mapster.TypeAdapterConfig.b__55_0(TypeTuple tuple)
at Mapster.TypeAdapterConfig.AddToHash(Hashtable hash, TypeTuple key, Func2 func) at Mapster.TypeAdapterConfig.GetMapFunction(Type sourceType, Type destinationType) at Mapster.TypeAdapterConfig.GetMapFunction[TSource,TDestination]() at Mapster.TypeAdapter2..cctor()
--- End of inner exception stack trace ---
at Mapster.TypeAdapter.Adapt[TSource,TDestination](TSource source)
Thanks