Hi!
I need help! I have a system in winforms C#.Net 2.0 with ActiveRecord
+ NHibernate communicating with a PostgreSQL 9 database.

When user open the system, starts the communication with the DB by a
new SessionScope(). For some users it works perfectly... but for
others the system generates a memoryexception,
identical to the problem of Marcio in msdn forum (http://
social.msdn.microsoft.com/Forums/pt/wcfpt/thread/d7ac4540-46cd-4512-
b4c9-eff400538152?prof=required).
Here's my stacktrace:

source: mscorlib. Exceção do tipo 'System.OutOfMemoryException' foi
acionada  em System.String.GetStringForStringBuilder(String value,
Int32 startIndex, Int32 length, Int32 capacity)

   em System.Text.StringBuilder..ctor(String value, Int32 startIndex,
Int32 length, Int32 capacity)

   em System.Text.StringBuilder..ctor(Int32 capacity)

   em
NpgsqlTypes.BasicNativeToBackendTypeConverter.ToBinary(NpgsqlNativeTypeInfo
TypeInfo, Object NativeData)

   em
NpgsqlTypes.NpgsqlNativeTypeInfo.ConvertToBackendPlainQuery(Object
NativeData)

   em NpgsqlTypes.NpgsqlNativeTypeInfo.ConvertToBackend(Object
NativeData, Boolean ForExtendedQuery)

   em Npgsql.NpgsqlCommand.GetClearCommandText()

   em Npgsql.NpgsqlCommand.GetCommandText()

   em Npgsql.NpgsqlQuery.WriteToStream(Stream outputStream)

   em Npgsql.NpgsqlReadyState.QueryEnum(NpgsqlConnector context,
NpgsqlCommand command)

   em Npgsql.NpgsqlConnector.QueryEnum(NpgsqlCommand queryCommand)

   em Npgsql.NpgsqlCommand.GetReader(CommandBehavior cb)

   em Npgsql.NpgsqlCommand.ExecuteNonQuery()

   em NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand
cmd)

   em NHibernate.AdoNet.NonBatchingBatcher.AddToBatch(IExpectation
expectation)

   em
NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id,
Object[] fields, Object[] oldFields, Object rowId, Boolean[]
includeProperty, Int32 j, Object oldVersion, Object obj,
SqlCommandInfo sql, ISessionImplementor session)

   em
NHibernate.Persister.Entity.AbstractEntityPersister.UpdateOrInsert(Object
id, Object[] fields, Object[] oldFields, Object rowId, Boolean[]
includeProperty, Int32 j, Object oldVersion, Object obj,
SqlCommandInfo sql, ISessionImplementor session)

   em
NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id,
Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection,
Object[] oldFields, Object oldVersion, Object obj, Object rowId,
ISessionImplementor session)

   em NHibernate.Action.EntityUpdateAction.Execute()

   em NHibernate.Engine.ActionQueue.Execute(IExecutable executable)

   em NHibernate.Engine.ActionQueue.ExecuteActions(IList list)

   em NHibernate.Engine.ActionQueue.ExecuteActions()

   em
NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource
session)

   em
NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent
event)

   em NHibernate.Impl.SessionImpl.Flush()

   em
Castle.ActiveRecord.Framework.Scopes.AbstractScope.PerformDisposal(ICollection`1
sessions, Boolean flush, Boolean close)

   em Castle.ActiveRecord.SessionScope.PerformDisposal(ICollection`1
sessions)

   em Castle.ActiveRecord.Framework.Scopes.AbstractScope.Dispose()


   em B2M.Forms.FrmLogin.Login() na E:\SVN_Des\B2M\B2M\B2M\B2M\src
\Forms\FrmLogin.cs:linha 725

FrmLogin.cs ->

722 GC.WaitForPendingFinalizers();

723 GC.WaitForFullGCApproach();

724 GC.WaitForFullGCComplete();

725 _sessionDB.Dispose();

How can I solve this problem? The problem is in NHibernate! The error
occurs when I try to close the ISession object or when I try to Commit
the transaction.
However, the User() object was loaded correctly... This error should
not happen! Help me! Please!

[]'s

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to