Hi,
I got this error in event log in (DB +App) serever machine.All userss freeze and coun't do enything.
Have you experianced same sort of situation?
please see the Event log
Service: MicrosoftDynamicsNavServer
User:
Type: System.ObjectDisposedException
Message:
Cannot access a disposed object.
Object name: 'Tree'.
ObjectName: Tree
StackTrace:
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.get_Parent()
at Microsoft.Dynamics.Nav.Runtime.TreeHandler.FindParentType[T]()
at Microsoft.Dynamics.Nav.Runtime.NavRecord.InitializeRecord(NCLMetaTable metaTab, Boolean isTemporary, IntPtr sharedTableHandle, String companyName)
at Microsoft.Dynamics.Nav.Runtime.NavRecord..ctor(ITreeObject parent, Int32 tableId, NCLMetaTable metaTable, Boolean isTemporary, IntPtr sharedTableHandle, String companyName)
at (ITreeObject , NCLMetaTable , Boolean , IntPtr , String )
at Microsoft.Dynamics.Nav.Runtime.NCLMetaTable.CreateObjectInstance(ITreeObject parent, Boolean isTemporary, IntPtr sharedTableHandle, String companyName)
at Microsoft.Dynamics.Nav.Runtime.NavRecordHandle.CreateTarget()
at Microsoft.Dynamics.Nav.Runtime.NavValueReference`1.get_Target()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit5129949.RemoveNASSemaphoreEntry()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit5129949.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.Runtime.NavApplicationObjectBase.Invoke(Int32 methodId, Object[] arguments)
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1.CompanyClose()
at Microsoft.Dynamics.Nav.BusinessApplication.Codeunit1.OnInvoke(Int32 memberId, Object[] args)
at Microsoft.Dynamics.Nav.Runtime.NavGlobalTriggers.<CloseCompany>b__2()
at Microsoft.Dynamics.Nav.Runtime.NavConnection.Transaction(TransactionalOperation operation)
at Microsoft.Dynamics.Nav.Runtime.NavGlobalTriggers.CloseCompany()
at Microsoft.Dynamics.Nav.Runtime.NavConnection.CloseCompany()
at Microsoft.Dynamics.Nav.Runtime.NavConnection.Dispose(Boolean disposing)
at Microsoft.Dynamics.Nav.Service.Connection.Dispose(Boolean disposing)
at Microsoft.Dynamics.Nav.Runtime.TreeObject.Dispose()
at Microsoft.Dynamics.Nav.Service.ConnectionManager`1.TerminateConnection(TConnection connection)
at Microsoft.Dynamics.Nav.Service.ConnectionManager`1.<>c__DisplayClass4.<RegisterConnectionEventHandlers>b__3(Object sender, SessionIdEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at Microsoft.Dynamics.Nav.Service.Connection.<>c__DisplayClass7.<BlockStackAndRaiseChannelEvent>b__6(Object )
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
Source: Microsoft.Dynamics.Nav.Ncl
0
Comments
Although your message was posted years ago, I am experiencing the same issue. What I actually do is, I repeatedly call a method in a small C# assembly. This function uses a string parameter and returns an integer value.
I experience no error and everything seems to work when I call that method a single time, but when I call it inside a Repeat..Until loop I get the error below (same as yours, unfortunately in German). I am using Dynamics NAV 2009 R2 (SP1 has no DotNet DataType).
As you can see below the function is called within a Codeunit, the Codeunit itself is called in the OnOpenPage trigger of the page. I have also tried to call it from the OnAfterGetRecord trigger of a report.
We are not using (afaik) the TreeMap Addin, so I don't think that error is related. I'd appreciate some help!
Service: MicrosoftDynamicsNavServer
User:
Type: System.ObjectDisposedException
Message:
Auf das verworfene Objekt kann nicht zugegriffen werden.
Objektname: "Tree".
ObjectName: Tree
StackTrace:
bei Microsoft.Dynamics.Nav.Runtime.TreeHandler.get_Parent()
bei Microsoft.Dynamics.Nav.Runtime.SharedNavStream.set_SharedStream(INavStreamProvider value)
bei Microsoft.Dynamics.Nav.Runtime.NavStream.Clear()
bei Microsoft.Dynamics.Nav.Runtime.ALSystemVariable.Clear(NavComplexValue complex)
bei Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50001.Seiten(INavRecordHandle sales_Header)
bei Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50001.OnRun(INavRecordHandle __rec)
bei Microsoft.Dynamics.Nav.Runtime.NavCodeunit.DoRun(DataError errorLevel, NavRecord record)
bei Microsoft.Dynamics.Nav.Runtime.NavCodeunit.Run(DataError errorLevel)
bei Microsoft.Dynamics.Nav.BusinessApplication.Page50040.OnOpenPage()
bei Microsoft.Dynamics.Nav.Runtime.NavForm.OpenForm()
bei Microsoft.Dynamics.Nav.Service.NSFormBatchOpen.Open(NavConnection connection)
bei Microsoft.Dynamics.Nav.Service.NSService.<>c__DisplayClassf.<OpenForm>b__e(Connection connection)
bei Microsoft.Dynamics.Nav.Service.NSService.ExecuteOperation[T](String operationName, ServiceOperation`1 operation, Connection connection, Boolean revertLanguageChanges, WindowsIdentity impersonationIdentity)
Source: Microsoft.Dynamics.Nav.Ncl
Got it figured out:
bei Microsoft.Dynamics.Nav.Runtime.NavStream.Clear()
bei Microsoft.Dynamics.Nav.Runtime.ALSystemVariable.Clear(NavComplexValue complex)
--> seems to me that the CLEAR function was the culprit. Don't ask me why and how that is related to your problem. Just wanted to let you know...