Out of Memory Exception,

Hi,

When BOT is waiting for the Mail in Outlook Mailbox for a long time, then Suddenly receive this error that 'BOT is stopped due to unexpected process termination '. Then I tried some system logs and get this error details:

Using GETOutlookMail Activity in a loop to waiting for the New Mail.

Application: UiRobot.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.OutOfMemoryException at UiPath.Mail.Activities.GetMailActivity.EndExecute(System.Activities.AsyncCodeActivityContext, System.IAsyncResult) at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(System.Activities.AsyncCodeActivityContext, System.IAsyncResult) at System.Activities.AsyncCodeActivity+CompleteAsyncCodeActivityData+CompleteAsyncCodeActivityWorkItem.Execute(System.Activities.Runtime.ActivityExecutor, System.Activities.Runtime.BookmarkManager) at System.Activities.Runtime.ActivityExecutor.TryExecuteNonEmptyWorkItem(System.Activities.Runtime.WorkItem) at System.Activities.Runtime.ActivityExecutor.OnExecuteWorkItem(System.Activities.Runtime.WorkItem) at System.Activities.Runtime.Scheduler+Callbacks.ExecuteWorkItem(System.Activities.Runtime.WorkItem) at System.Activities.Runtime.Scheduler.OnScheduledWork(System.Object) at System.Runtime.Fx+SendOrPostThunk.UnhandledExceptionFrame(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunDispatcher(System.Object) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run(System.Windows.Window) at UiPath.Robot.App.Main()

Why is this problem occurs or is there any other way to do this.

Hi @sachinbhardwaj,

can you possible to attach the xaml to investigate the issue.

Regards
Balamurugan.S

Hi !

Check this post , here a solution for me :

Regards !