Open rikrak opened 6 years ago
FYI, the issue was caused by the database initializer and it's fixed in Entity Framework 6.3.
I am having a similar (same?) problem, with EF6.2 and EF6.4. The statck trace is different, but it's throwing from the same property.
Glimpse.Ado.AlternateType.GlimpseDbConnection.get_State() +3 System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch(TTarget target, Func
3 operation, TInterceptionContext interceptionContext, Action3 executing, Action
3 executed) +103 System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.GetState(DbConnection connection, DbInterceptionContext interceptionContext) +502 System.Data.Entity.Core.EntityClient.EntityConnection.StoreCloseHelper() +285 System.Data.Entity.Core.EntityClient.EntityConnection.Dispose(Boolean disposing) +65 System.ComponentModel.Component.Dispose() +26 System.Data.Entity.Internal.LazyInternalConnection.Dispose() +51 System.Data.Entity.Internal.LazyInternalContext.DisposeContext(Boolean disposing) +96 System.Data.Entity.DbContext.Dispose(Boolean disposing) +27 System.Data.Entity.DbContext.Dispose() +25
Hi,
This is a cross post from the EF project ref: https://github.com/aspnet/EntityFramework6/issues/398 ref: https://github.com/rikrak/EF6_2_InitialisationError
Glimpse.EF6 does not appear to work with the recently release Entity Framework 6.2. On startup I receive a NullReferenceException.
The exception appears to come from a call to DbMigrator.GetPendingMigrations(). After a bit of debugging, it looks like a DbConnection is disposed of, which causes the GlimpseDbConnection to set the InnerConnection to null. I think another call is then made to the same connection after disposal, which then causes a NullReferenceException.
The same code worked with EF 6.1.3 and Glimpse.EF6
There is a proposed workaround on the EF issue, and there is also a suggested fix for the Glimpse code.
source Error:
_Source File: D:\Dev\Src\EF6_2InitialisationError\UI.Web\UnitOfWork\DbInitialiser.cs Line: 48
Stack Trace: