V8: Mapping YSOD appears randomly
See original GitHub issueEvery so often I’m seeing this:
It not terribly deterministic (at least I haven’t found a pattern yet), but it happens when clicking around the various parts of the Settings section.
If I figure out how to reproduce it I’ll update this issue 😄
Inner exception
Inner 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 Umbraco.Core.Mapping.UmbracoMapper.GetCtor(Type sourceType, Type targetType) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 330 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, Type sourceType, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 196 at Umbraco.Core.Mapping.UmbracoMapper.Map[TTarget](Object source, MapperContext context) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\UmbracoMapper.cs:line 151 at Umbraco.Core.Mapping.MapperContext.Map[TTarget](Object source) in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Core\Mapping\MapperContext.cs:line 41 at System.Linq.Enumerable.WhereSelectEnumerableIterator
2.MoveNext()
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 677
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 179
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 469
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 173
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) in //Src/Newtonsoft.Json/Serialization/JsonSerializerInternalWriter.cs:line 95
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) in //Src/Newtonsoft.Json/JsonSerializer.cs:line 1149
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Umbraco.Web.WebApi.AngularJsonMediaTypeFormatter.<WriteToStreamAsync>d__1.MoveNext() in D:\Projects\Umbraco-CMS-V8\src\Umbraco.Web\WebApi\AngularJsonMediaTypeFormatter.cs:line 52
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Web.Http.WebHost.HttpControllerHandler.<WriteBufferedResponseContentAsync>d__22.MoveNext()
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
PR #5266
Review = code review, I did repro with a test, and with the fix the test does not fail anymore, but since this all depends on timing, it cannot be reliably reproduced nor tested.
Also, this was introduced in 8.1 which has not been released yet = no need to label with a version
Merged, not marking this as 8.1 release since it was a bug introduced in the making of 8.1