We're updating the issue view to help you get more done. 

AccessViolationException in Reflection.Emit when creating types

Description

On our team, we've occasionally experienced AccessViolationExceptions in Reflection.Emit. The exception has been seen by DR, PSC, and FS so far.
Some facts:

  • PSC started seeing the exception after he installed Windows 10 Anniversary Update (incl. .NET 4.6.2) and a number of other updates from the Microsoft Update servers. He said it was quite reproducable on his machine.

  • FS started seeing the exception after installing the prerequisite updates for Anniversary Update from the Microsoft Update servers, after downloading but before installing Anniversary Update. It's not repdoucable on his machine, but has occasionally reoccurred.

  • DR has seen the exception once so far; he has not installed Anniversary Update.

  • The exception only occurs when running all the unit tests in a specific unit test project. It always occurs at the same test.

  • We also experimented with automatically persisting and reloading the code generated by TypePipe in that project; however, that feature was turned off whenever the exception occurred. (But might it still have had some effect somehow?)

    • FS noticed that persisting the generated code sometimes caused OutOfMemoryExceptions - even though the process had no more than about 1.2 GB of memory -, could that be related to the problem?

    • On FS' PC, the tests were run using the R# NUnit test runner on the 32-bit platform and with "Framework: Auto" (should be "CLR4.5") whenever the exception occurred.

  • On FS' PC, the problem has not reoccurred after installing all updates from Microsoft Update up to KB4016635.

These are the exceptions from a failed run on FS' PC. We believe the latter ones are follow-up exceptions.

Exception 1:

System.AccessViolationException : Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Diagnostics.SymbolStore.SymWriter.CloseMethod()
at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderAdapter.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderAdapter.cs:line 140
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderDecorator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderDecorator.cs:line 151
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.MutableTypeCodeGenerator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\MutableTypeCodeGenerator.cs:line 133
at Remotion.TypePipe.CodeGeneration.MutableTypeBatchCodeGenerator.<GenerateTypes>b__0(IMutableTypeCodeGenerator g) in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\MutableTypeBatchCodeGenerator.cs:line 62
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at Remotion.TypePipe.TypeAssembly.GeneratedTypesContext..ctor(IEnumerable`1 mutableToGeneratedTypeMapping) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\GeneratedTypesContext.cs:line 42
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypesWithDiagnostics(IMutableTypeBatchCodeGenerator codeGenerator, IEnumerable`1 mutableTypes, String generationSubjectName) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 226
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypes(AssembledTypeID typeID, ProxyTypeAssemblyContext context, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 217
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 133
at Rubicon.Utilities.CodeGeneration.TracingTypeAssemblerDecorator.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TracingTypeAssemblerDecorator.cs:line 54
at Remotion.TypePipe.Caching.TypeCache.<>c_DisplayClass1.<CreateAssembledType>b_0() in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 86
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 62
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Exception 2

System.InvalidOperationException : ValueFactory attempted to access the Value property of this instance.
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 70
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Exception 3:

System.ArgumentException : Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Diagnostics.SymbolStore.SymWriter.OpenMethod(SymbolToken method)
at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderAdapter.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderAdapter.cs:line 140
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderDecorator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderDecorator.cs:line 151
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.MutableTypeCodeGenerator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\MutableTypeCodeGenerator.cs:line 133
at Remotion.TypePipe.CodeGeneration.MutableTypeBatchCodeGenerator.<GenerateTypes>b__0(IMutableTypeCodeGenerator g) in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\MutableTypeBatchCodeGenerator.cs:line 62
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at Remotion.TypePipe.TypeAssembly.GeneratedTypesContext..ctor(IEnumerable`1 mutableToGeneratedTypeMapping) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\GeneratedTypesContext.cs:line 42
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypesWithDiagnostics(IMutableTypeBatchCodeGenerator codeGenerator, IEnumerable`1 mutableTypes, String generationSubjectName) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 226
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypes(AssembledTypeID typeID, ProxyTypeAssemblyContext context, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 217
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 133
at Rubicon.Utilities.CodeGeneration.TracingTypeAssemblerDecorator.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TracingTypeAssemblerDecorator.cs:line 54
at Remotion.TypePipe.Caching.TypeCache.<>c_DisplayClass1.<CreateAssembledType>b_0() in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 86
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 70
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Exception 4

System.ArgumentException : Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Diagnostics.SymbolStore.SymWriter.OpenMethod(SymbolToken method)
at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderAdapter.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderAdapter.cs:line 140
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderDecorator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderDecorator.cs:line 151
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.MutableTypeCodeGenerator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\MutableTypeCodeGenerator.cs:line 133
at Remotion.TypePipe.CodeGeneration.MutableTypeBatchCodeGenerator.<GenerateTypes>b__0(IMutableTypeCodeGenerator g) in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\MutableTypeBatchCodeGenerator.cs:line 62
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at Remotion.TypePipe.TypeAssembly.GeneratedTypesContext..ctor(IEnumerable`1 mutableToGeneratedTypeMapping) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\GeneratedTypesContext.cs:line 42
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypesWithDiagnostics(IMutableTypeBatchCodeGenerator codeGenerator, IEnumerable`1 mutableTypes, String generationSubjectName) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 226
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypes(AssembledTypeID typeID, ProxyTypeAssemblyContext context, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 217
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 133
at Rubicon.Utilities.CodeGeneration.TracingTypeAssemblerDecorator.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TracingTypeAssemblerDecorator.cs:line 54
at Remotion.TypePipe.Caching.TypeCache.<>c_DisplayClass1.<CreateAssembledType>b_0() in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 86
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 70
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Exception 5

System.ArgumentException : Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Diagnostics.SymbolStore.SymWriter.OpenMethod(SymbolToken method)
at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderAdapter.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderAdapter.cs:line 140
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderDecorator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderDecorator.cs:line 151
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.MutableTypeCodeGenerator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\MutableTypeCodeGenerator.cs:line 133
at Remotion.TypePipe.CodeGeneration.MutableTypeBatchCodeGenerator.<GenerateTypes>b__0(IMutableTypeCodeGenerator g) in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\MutableTypeBatchCodeGenerator.cs:line 62
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at Remotion.TypePipe.TypeAssembly.GeneratedTypesContext..ctor(IEnumerable`1 mutableToGeneratedTypeMapping) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\GeneratedTypesContext.cs:line 42
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypesWithDiagnostics(IMutableTypeBatchCodeGenerator codeGenerator, IEnumerable`1 mutableTypes, String generationSubjectName) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 226
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypes(AssembledTypeID typeID, ProxyTypeAssemblyContext context, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 217
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 133
at Rubicon.Utilities.CodeGeneration.TracingTypeAssemblerDecorator.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TracingTypeAssemblerDecorator.cs:line 54
at Remotion.TypePipe.Caching.TypeCache.<>c_DisplayClass1.<CreateAssembledType>b_0() in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 86
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 70
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Exception 6

System.ArgumentException : Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Diagnostics.SymbolStore.SymWriter.OpenMethod(SymbolToken method)
at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderAdapter.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderAdapter.cs:line 140
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderDecorator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderDecorator.cs:line 151
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.MutableTypeCodeGenerator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\MutableTypeCodeGenerator.cs:line 133
at Remotion.TypePipe.CodeGeneration.MutableTypeBatchCodeGenerator.<GenerateTypes>b__0(IMutableTypeCodeGenerator g) in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\MutableTypeBatchCodeGenerator.cs:line 62
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at Remotion.TypePipe.TypeAssembly.GeneratedTypesContext..ctor(IEnumerable`1 mutableToGeneratedTypeMapping) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\GeneratedTypesContext.cs:line 42
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypesWithDiagnostics(IMutableTypeBatchCodeGenerator codeGenerator, IEnumerable`1 mutableTypes, String generationSubjectName) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 226
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypes(AssembledTypeID typeID, ProxyTypeAssemblyContext context, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 217
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 133
at Rubicon.Utilities.CodeGeneration.TracingTypeAssemblerDecorator.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TracingTypeAssemblerDecorator.cs:line 54
at Remotion.TypePipe.Caching.TypeCache.<>c_DisplayClass1.<CreateAssembledType>b_0() in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 86
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 70
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Exception 7

System.ArgumentException : Value does not fall within the expected range.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Diagnostics.SymbolStore.SymWriter.OpenMethod(SymbolToken method)
at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il)
at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
at System.Reflection.Emit.TypeBuilder.CreateType()
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderAdapter.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderAdapter.cs:line 140
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.Abstractions.TypeBuilderDecorator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\Abstractions\TypeBuilderDecorator.cs:line 151
at Remotion.TypePipe.CodeGeneration.ReflectionEmit.MutableTypeCodeGenerator.CreateType() in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\ReflectionEmit\MutableTypeCodeGenerator.cs:line 133
at Remotion.TypePipe.CodeGeneration.MutableTypeBatchCodeGenerator.<GenerateTypes>b__0(IMutableTypeCodeGenerator g) in c:\Build\93ef62309cf4b3b7\working\Core\CodeGeneration\MutableTypeBatchCodeGenerator.cs:line 62
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at Remotion.TypePipe.TypeAssembly.GeneratedTypesContext..ctor(IEnumerable`1 mutableToGeneratedTypeMapping) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\GeneratedTypesContext.cs:line 42
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypesWithDiagnostics(IMutableTypeBatchCodeGenerator codeGenerator, IEnumerable`1 mutableTypes, String generationSubjectName) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 226
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.GenerateTypes(AssembledTypeID typeID, ProxyTypeAssemblyContext context, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 217
at Remotion.TypePipe.TypeAssembly.Implementation.TypeAssembler.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in c:\Build\93ef62309cf4b3b7\working\Core\TypeAssembly\Implementation\TypeAssembler.cs:line 133
at Rubicon.Utilities.CodeGeneration.TracingTypeAssemblerDecorator.AssembleType(AssembledTypeID typeID, IParticipantState participantState, IMutableTypeBatchCodeGenerator codeGenerator) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TracingTypeAssemblerDecorator.cs:line 54
at Remotion.TypePipe.Caching.TypeCache.<>c_DisplayClass1.<CreateAssembledType>b_0() in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 86
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Remotion.TypePipe.Caching.TypeCache.GetOrCreateType(AssembledTypeID typeID) in c:\Build\93ef62309cf4b3b7\working\Core\Caching\TypeCache.cs:line 70
at Rubicon.Utilities.CodeGeneration.TypeCacheDecoratorForNonPersistentAssemblies.GetOrCreateType(AssembledTypeID typeID) in C:\Build\RAPT\trunk\src\Utilities\Rubicon.Utilities\CodeGeneration\TypeCacheDecoratorForNonPersistentAssemblies.cs:line 56
at Remotion.TypePipe.Implementation.ReflectionService.GetAssembledType(Type requestedType) in c:\Build\93ef62309cf4b3b7\working\Core\Implementation\ReflectionService.cs:line 85
at Remotion.Mixins.CodeGeneration.TypeFactoryImplementation.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\CodeGeneration\TypeFactoryImplementation.cs:line 52
at Remotion.Mixins.TypeFactory.GetConcreteType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\TypeFactory.cs:line 92
at Remotion.Mixins.MixinTypeUtility.GetConcreteMixedType(Type targetOrConcreteType) in c:\Build\2b2e65149309849\working\Remotion\Mixins\Core\MixinTypeUtility.cs:line 86
at <redacted>

Assignee

Unassigned

Reporter

Fabian Schmied

Labels

None

Components

Fix versions

Affects versions

Priority

Normal
Configure