Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug.Assert failing in EnityTypeExtensions.CalculateCounts #16000

Closed
ajcvickers opened this issue Jun 8, 2019 · 0 comments · Fixed by #16002
Closed

Debug.Assert failing in EnityTypeExtensions.CalculateCounts #16000

ajcvickers opened this issue Jun 8, 2019 · 0 comments · Fixed by #16002
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ajcvickers
Copy link
Contributor

Specifically:

Debug.Assert(entityType.Model.ConventionDispatcher == null, "Should not be called on a mutable model");

This fails when running all the tests on my machine. For example:

xUnit.net Console Runner v2.4.1-pre.build.4059 (64-bit .NET Core 3.0.0-preview7-27805-01)
  Discovering: Microsoft.EntityFrameworkCore.InMemory.Tests
  Discovered:  Microsoft.EntityFrameworkCore.InMemory.Tests
  Starting:    Microsoft.EntityFrameworkCore.InMemory.Tests
Process terminated. Assertion failed.
Should not be called on a mutable model
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityTypeExtensions.CalculateCounts(EntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityTypeExtensions.cs:line 304
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType.<>c.<get_Counts>b__144_0(EntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityType.cs:line 2083
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory) in C:\aspnet\EntityFrameworkCore\src\EFCore\Internal\NonCapturingLazyInitializer.cs:line 36
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType.get_Counts() in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityType.cs:line 2083
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityTypeExtensions.GetCounts(IEntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityTypeExtensions.cs:line 294
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityTypeExtensions.ShadowPropertyCount(IEntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityTypeExtensions.cs:line 267
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntryFactory.NewInternalEntityEntry(IStateManager stateManager, IEntityType entityType, Object entity) in C:\aspnet\EntityFrameworkCore\src\EFCore\ChangeTracking\Internal\InternalEntityEntryFactory.cs:line 54
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.InternalEntityEntryFactory.Create(IStateManager stateManager, IEntityType entityType, Object entity) in C:\aspnet\EntityFrameworkCore\src\EFCore\ChangeTracking\Internal\InternalEntityEntryFactory.cs:line 34
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.GetOrCreateEntry(Object entity) in C:\aspnet\EntityFrameworkCore\src\EFCore\ChangeTracking\Internal\StateManager.cs:line 226
   at Microsoft.EntityFrameworkCore.InMemoryDatabaseTest.Save_changes_removes_deleted_objects_from_store() in C:\aspnet\EntityFrameworkCore\test\EFCore.InMemory.Tests\InMemoryDatabaseTest.cs:line 132
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.EntityFrameworkCore.InMemoryDatabaseTest.Save_changes_removes_deleted_objects_from_store()
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 150
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 257
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<InvokeTestMethodAsync>b__1()
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction)
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<InvokeTestMethodAsync>b__0() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 242
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\projects\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code)
   at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 241
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance)
   at Xunit.Sdk.XunitTestInvoker.InvokeTestMethodAsync(Object testClassInstance) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestInvoker.cs:line 112
   at Xunit.Sdk.TestInvoker`1.<RunAsync>b__47_0() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 206
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestInvoker`1.<RunAsync>b__47_0()
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) in C:\projects\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 107
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code)
   at Xunit.Sdk.TestInvoker`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 189
   at Xunit.Sdk.XunitTestRunner.InvokeTestMethodAsync(ExceptionAggregator aggregator) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestRunner.cs:line 84
   at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestRunner.cs:line 67
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator)
   at Xunit.Sdk.TestRunner`1.<>c__DisplayClass43_0.<RunAsync>b__0() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestRunner.cs:line 149
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) in C:\projects\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 107
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code)
   at Xunit.Sdk.TestRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestRunner.cs:line 149
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCaseRunner.RunTestAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestCaseRunner.cs:line 139
   at Xunit.Sdk.TestCaseRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestCaseRunner.cs:line 82
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestCaseRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCase.RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, Object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\XunitTestCase.cs:line 162
   at Xunit.Sdk.XunitTestMethodRunner.RunTestCaseAsync(IXunitTestCase testCase) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestMethodRunner.cs:line 45
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestMethodRunner.cs:line 136
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestMethodRunner.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestMethodRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestClassRunner.RunTestMethodAsync(ITestMethod testMethod, IReflectionMethodInfo method, IEnumerable`1 testCases, Object[] constructorArguments) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestClassRunner.cs:line 168
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestClassRunner.cs:line 213
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync()
   at Xunit.Sdk.TestClassRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestClassRunner.cs:line 171
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestClassRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo class, IEnumerable`1 testCases) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestCollectionRunner.cs:line 158
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestCollectionRunner.cs:line 130
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync()
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestCollectionRunner.cs:line 101
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable`1 testCases, CancellationTokenSource cancellationTokenSource) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestAssemblyRunner.cs:line 235
   at Xunit.Sdk.XunitTestAssemblyRunner.<>c__DisplayClass14_2.<RunTestCollectionsAsync>b__2() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestAssemblyRunner.cs:line 184
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Threading.Tasks.Task.ExecuteEntry()
   at System.Threading.Tasks.SynchronizationContextTaskScheduler.<>c.<.cctor>b__8_0(Object s)
   at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) in C:\projects\xunit\src\xunit.execution\Sdk\MaxConcurrencySyncContext.cs:line 107
   at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass11_0.<WorkerThreadProc>b__0(Object _) in C:\projects\xunit\src\xunit.execution\Sdk\MaxConcurrencySyncContext.cs:line 96
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Xunit.Sdk.ExecutionContextHelper.Run(Object context, Action`1 action) in C:\projects\xunit\src\xunit.execution\Sdk\Utility\ExecutionContextHelper.cs:line 111
   at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() in C:\projects\xunit\src\xunit.execution\Sdk\MaxConcurrencySyncContext.cs:line 89
   at Xunit.Sdk.XunitWorkerThread.<>c.<.ctor>b__1_0(Object s) in C:\projects\xunit\src\common\XunitWorkerThread.cs:line 72
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)
Process terminated. Assertion failed.
Should not be called on a mutable model
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityTypeExtensions.CalculateCounts(EntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityTypeExtensions.cs:line 304
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType.<>c.<get_Counts>b__144_0(EntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityType.cs:line 2083
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory) in C:\aspnet\EntityFrameworkCore\src\EFCore\Internal\NonCapturingLazyInitializer.cs:line 36
   at Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType.get_Counts() in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\EntityType.cs:line 2083
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBase.<>c.<get_PropertyIndexes>b__24_0(PropertyBase property) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBase.cs:line 237
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Action`1 valueFactory) in C:\aspnet\EntityFrameworkCore\src\EFCore\Internal\NonCapturingLazyInitializer.cs:line 104
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBase.get_PropertyIndexes() in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBase.cs:line 233
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBaseExtensions.GetPropertyIndexes(IPropertyBase propertyBase) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBaseExtensions.cs:line 74
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBaseExtensions.GetShadowIndex(IPropertyBase property) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBaseExtensions.cs:line 29
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyAccessorsFactory.CreateCurrentValueGetter[TProperty](IPropertyBase propertyBase, Boolean useStoreGeneratedValues) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyAccessorsFactory.cs:line 58
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyAccessorsFactory.CreateGeneric[TProperty](IPropertyBase propertyBase) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyAccessorsFactory.cs:line 44
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyAccessorsFactory.Create(IPropertyBase propertyBase) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyAccessorsFactory.cs:line 29
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBase.<>c.<get_Accessors>b__36_0(PropertyBase p) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBase.cs:line 314
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory) in C:\aspnet\EntityFrameworkCore\src\EFCore\Internal\NonCapturingLazyInitializer.cs:line 36
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBase.get_Accessors() in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBase.cs:line 314
   at Microsoft.EntityFrameworkCore.Metadata.Internal.PropertyBaseExtensions.GetPropertyAccessors(IPropertyBase propertyBase) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\PropertyBaseExtensions.cs:line 83
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.SimplePrincipalKeyValueFactory`1..ctor(IProperty property) in C:\aspnet\EntityFrameworkCore\src\EFCore\ChangeTracking\Internal\SimplePrincipalKeyValueFactory.cs:line 35
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.KeyValueFactoryFactory.CreateSimpleFactory[TKey](IKey key) in C:\aspnet\EntityFrameworkCore\src\EFCore\ChangeTracking\Internal\KeyValueFactoryFactory.cs:line 35
   at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.KeyValueFactoryFactory.Create[TKey](IKey key) in C:\aspnet\EntityFrameworkCore\src\EFCore\ChangeTracking\Internal\KeyValueFactoryFactory.cs:line 27
   at Microsoft.EntityFrameworkCore.Metadata.Internal.Key.<>c__19`1.<GetPrincipalKeyValueFactory>b__19_0(Key k) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\Key.cs:line 143
   at Microsoft.EntityFrameworkCore.Internal.NonCapturingLazyInitializer.EnsureInitialized[TParam,TValue](TValue& target, TParam param, Func`2 valueFactory) in C:\aspnet\EntityFrameworkCore\src\EFCore\Internal\NonCapturingLazyInitializer.cs:line 36
   at Microsoft.EntityFrameworkCore.Metadata.Internal.Key.GetPrincipalKeyValueFactory[TKey]() in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\Key.cs:line 142
   at Microsoft.EntityFrameworkCore.Metadata.Internal.KeyExtensions.GetPrincipalKeyValueFactory[TKey](IKey key) in C:\aspnet\EntityFrameworkCore\src\EFCore\Metadata\Internal\KeyExtensions.cs:line 37
   at Microsoft.EntityFrameworkCore.InMemory.Storage.Internal.InMemoryTableFactory.<>c__DisplayClass5_0`1.<CreateFactory>b__0() in C:\aspnet\EntityFrameworkCore\src\EFCore.InMemory\Storage\Internal\InMemoryTableFactory.cs:line 59
   at Microsoft.EntityFrameworkCore.InMemory.Storage.Internal.InMemoryTableFactory.Create(IEntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore.InMemory\Storage\Internal\InMemoryTableFactory.cs:line 49
   at Microsoft.EntityFrameworkCore.InMemory.Storage.Internal.InMemoryStore.EnsureTable(Object key, IEntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore.InMemory\Storage\Internal\InMemoryStore.cs:line 229
   at Microsoft.EntityFrameworkCore.InMemory.Storage.Internal.InMemoryStore.GetIntegerValueGenerator[TProperty](IProperty property) in C:\aspnet\EntityFrameworkCore\src\EFCore.InMemory\Storage\Internal\InMemoryStore.cs:line 70
   at Microsoft.EntityFrameworkCore.InMemory.ValueGeneration.Internal.InMemoryValueGeneratorSelector.GetOrCreate(IProperty property) in C:\aspnet\EntityFrameworkCore\src\EFCore.InMemory\ValueGeneration\Internal\InMemoryValueGeneratorSelector.cs:line 83
   at Microsoft.EntityFrameworkCore.InMemory.ValueGeneration.Internal.InMemoryValueGeneratorSelector.Select(IProperty property, IEntityType entityType) in C:\aspnet\EntityFrameworkCore\src\EFCore.InMemory\ValueGeneration\Internal\InMemoryValueGeneratorSelector.cs:line 58
   at Microsoft.EntityFrameworkCore.InMemoryValueGeneratorSelectorTest.Returns_built_in_generators_for_types_setup_for_value_generation() in C:\aspnet\EntityFrameworkCore\test\EFCore.InMemory.Tests\InMemoryValueGeneratorSelectorTest.cs:line 28
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Xunit.Sdk.TestInvoker`1.CallTestMethod(Object testClassInstance) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 150
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 257
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<InvokeTestMethodAsync>b__1()
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction)
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<InvokeTestMethodAsync>b__0() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 242
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\projects\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code)
   at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 241
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestInvoker`1.InvokeTestMethodAsync(Object testClassInstance)
   at Xunit.Sdk.XunitTestInvoker.InvokeTestMethodAsync(Object testClassInstance) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestInvoker.cs:line 112
   at Xunit.Sdk.TestInvoker`1.<RunAsync>b__47_0() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 206
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestInvoker`1.<RunAsync>b__47_0()
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) in C:\projects\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 107
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code)
   at Xunit.Sdk.TestInvoker`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 189
   at Xunit.Sdk.XunitTestRunner.InvokeTestMethodAsync(ExceptionAggregator aggregator) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestRunner.cs:line 84
   at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestRunner.cs:line 67
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.XunitTestRunner.InvokeTestAsync(ExceptionAggregator aggregator)
   at Xunit.Sdk.TestRunner`1.<>c__DisplayClass43_0.<RunAsync>b__0() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestRunner.cs:line 149
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code) in C:\projects\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 107
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.ExceptionAggregator.RunAsync[T](Func`1 code)
   at Xunit.Sdk.TestRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestRunner.cs:line 149
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCaseRunner.RunTestAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestCaseRunner.cs:line 139
   at Xunit.Sdk.TestCaseRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestCaseRunner.cs:line 82
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestCaseRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCase.RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, Object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\XunitTestCase.cs:line 162
   at Xunit.Sdk.XunitTestMethodRunner.RunTestCaseAsync(IXunitTestCase testCase) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestMethodRunner.cs:line 45
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestMethodRunner.cs:line 136
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestMethodRunner`1.RunTestCasesAsync()
   at Xunit.Sdk.TestMethodRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestMethodRunner.cs:line 106
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestMethodRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestClassRunner.RunTestMethodAsync(ITestMethod testMethod, IReflectionMethodInfo method, IEnumerable`1 testCases, Object[] constructorArguments) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestClassRunner.cs:line 168
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestClassRunner.cs:line 213
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestClassRunner`1.RunTestMethodsAsync()
   at Xunit.Sdk.TestClassRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestClassRunner.cs:line 171
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestClassRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestCollectionRunner.RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo class, IEnumerable`1 testCases) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestCollectionRunner.cs:line 158
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestCollectionRunner.cs:line 130
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestCollectionRunner`1.RunTestClassesAsync()
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestCollectionRunner.cs:line 101
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
   at Xunit.Sdk.TestCollectionRunner`1.RunAsync()
   at Xunit.Sdk.XunitTestAssemblyRunner.RunTestCollectionAsync(IMessageBus messageBus, ITestCollection testCollection, IEnumerable`1 testCases, CancellationTokenSource cancellationTokenSource) in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestAssemblyRunner.cs:line 235
   at Xunit.Sdk.XunitTestAssemblyRunner.<>c__DisplayClass14_2.<RunTestCollectionsAsync>b__2() in C:\projects\xunit\src\xunit.execution\Sdk\Frameworks\Runners\XunitTestAssemblyRunner.cs:line 184
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Threading.Tasks.Task.ExecuteEntry()
   at System.Threading.Tasks.SynchronizationContextTaskScheduler.<>c.<.cctor>b__8_0(Object s)
   at Xunit.Sdk.MaxConcurrencySyncContext.RunOnSyncContext(SendOrPostCallback callback, Object state) in C:\projects\xunit\src\xunit.execution\Sdk\MaxConcurrencySyncContext.cs:line 107
   at Xunit.Sdk.MaxConcurrencySyncContext.<>c__DisplayClass11_0.<WorkerThreadProc>b__0(Object _) in C:\projects\xunit\src\xunit.execution\Sdk\MaxConcurrencySyncContext.cs:line 96
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Xunit.Sdk.ExecutionContextHelper.Run(Object context, Action`1 action) in C:\projects\xunit\src\xunit.execution\Sdk\Utility\ExecutionContextHelper.cs:line 111
   at Xunit.Sdk.MaxConcurrencySyncContext.WorkerThreadProc() in C:\projects\xunit\src\xunit.execution\Sdk\MaxConcurrencySyncContext.cs:line 89
   at Xunit.Sdk.XunitWorkerThread.<>c.<.ctor>b__1_0(Object s) in C:\projects\xunit\src\common\XunitWorkerThread.cs:line 72
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)
=== COMMAND LINE ===
"C:\aspnet\EntityFrameworkCore\.dotnet\dotnet.exe" exec --depsfile "C:\aspnet\EntityFrameworkCore\artifacts\bin\EFCore.InMemory.Tests\Debug\netcoreapp3.0\Microsoft.EntityFrameworkCore.InMemory.Tests.deps.json" --runtimeconfig "C:\aspnet\EntityFrameworkCore\artifacts\bin\EFCore.InMemory.Tests\Debug\netcoreapp3.0\Microsoft.EntityFrameworkCore.InMemory.Tests.runtimeconfig.json"  "C:\Users\Arthur\.nuget\packages\xunit.runner.console/2.4.1-pre.build.4059/tools/netcoreapp2.0/xunit.console.dll" "C:\aspnet\EntityFrameworkCore\artifacts\bin\EFCore.InMemory.Tests\Debug\netcoreapp3.0\Microsoft.EntityFrameworkCore.InMemory.Tests.dll" -noautoreporters -xml "C:\aspnet\EntityFrameworkCore\artifacts\TestResults\Debug\EFCore.InMemory.Tests_netcoreapp3.0_x64.xml" -html "C:\aspnet\EntityFrameworkCore\artifacts\TestResults\Debug\EFCore.InMemory.Tests_netcoreapp3.0_x64.html"  > "C:\aspnet\EntityFrameworkCore\artifacts\log\Debug\EFCore.InMemory.Tests_netcoreapp3.0_x64.log" 2>&1
ajcvickers added a commit that referenced this issue Jun 8, 2019
ajcvickers added a commit that referenced this issue Jun 8, 2019
AndriySvyryd added a commit that referenced this issue Jun 8, 2019
AndriySvyryd added a commit that referenced this issue Jun 8, 2019
AndriySvyryd added a commit that referenced this issue Jun 8, 2019
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 8, 2019
@AndriySvyryd AndriySvyryd added this to the 3.0.0 milestone Jun 8, 2019
@AndriySvyryd AndriySvyryd removed their assignment Jun 8, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview7 Jul 2, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview7, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants