Hello everyone, I am currently doing a C# Windows Forms project with Data Objects .NET 4.4. I create a domain and a session (which has the ClientProfile option turned on) that I keep as global variables in the whole form. Of course, I use the session.SaveChanges() method after each change on the database. When I click on a button of my form, a lot of tasks are performed and the application works well; however, after a couple of clicks, I get an unhandled Aggregate exception, and I don't really know its origin. I think it is unlikely to be a memory leak. Here is the detailed exception : Xtensive.Core.AggregateException was unhandled Message=A set of exceptions is caught.
StackTrace: at Xtensive.Core.ExceptionAggregator.Dispose() at Xtensive.Disposing.DisposableSet.System.IDisposable.Dispose() at Xtensive.IoC.ServiceContainer.Dispose(Boolean disposing) at Xtensive.IoC.ServiceContainerBase.Finalize() InnerException: Xtensive.Orm.StorageException Message=Error 'Unknown'. Original message: Internal .Net Framework Data Provider error 1.
StackTrace: at Xtensive.Storage.Providers.Sql.Driver.CloseConnection(Session session, SqlConnection connection) at Xtensive.Storage.Providers.Sql.SessionHandler.Dispose() at Xtensive.Orm.Internals.ChainingSessionHandler.Dispose() at Xtensive.Core.DisposableExtensions.DisposeSafely(IDisposable disposable) at Xtensive.Orm.Session.Dispose() at Xtensive.Disposing.DisposableSet.<system.idisposable.dispose>b__0(IDisposable d) at Xtensive.Core.ExceptionAggregator.ExecuteT InnerException: System.InvalidOperationException Message=Internal .Net Framework Data Provider error 1.
StackTrace: at System.Data.ProviderBase.DbConnectionInternal.PrePush(Object expectedOwner) at System.Data.ProviderBase.DbConnectionPool.PutObject(DbConnectionInternal obj, Object owningObject) at System.Data.ProviderBase.DbConnectionInternal.CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlInternalConnection.CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Close() at Xtensive.Sql.SqlConnection.Close() at Xtensive.Storage.Providers.Sql.Driver.CloseConnection(Session session, SqlConnection connection) I would be glad if someone could help me. Best regards |
Any sample solution, or at least model with query you made will help a lot. Hi Peter, Thank you for your answer. I uploaded the useful D.O. files of my project so that you can have a look at them : the database filler is not my problem though. I hope you will be able to undersatand my program. The button where the exception arises is the Go Button. Here you are : Project files If needed, I can provide the entire solution. Thanks again likely i will try to reproduce your case, be in touch. I could not build/reproduce your issue. Could you post full exception stacktrace here? Peter, The stack Trace I gave you earlier is the most detailed version of the exception ( Copied the detail on clipboard ). If I give you the stack trace only, you get this : at Xtensive.Core.ExceptionAggregator.Dispose() at Xtensive.Disposing.DisposableSet.System.IDisposable.Dispose() at Xtensive.IoC.ServiceContainer.Dispose(Boolean disposing) at Xtensive.IoC.ServiceContainerBase.Finalize() InnerException: Error 'Unknown'. Original message: Internal .Net Framework Data Provider error 1. Here is a screenshot : Exception Thank you In screenshot i see there are some inner exceptions, could you expand it and put here all inner exceptions? The inner exceptions are actually already in my 1st post : there are 3 of them. EDIT : Here is the complete detail, hope it helps you find a solution Detailed Exception |