Before switching a robot into a Windows Service mode, I never got that error. Today, I found out that a Windows Service stopped processing a few hours ago. There was nothing on the console as far as .NET error. However, the Event Viewer logged two errors in regards to the situation.
The first one is:
EventType clr20r3, P1 Myexe.exe, P2 1.0.0.0, P3 5249dfce, P4 Myexe, P5 1.0.0.0, P6 5249dfce, P7 41, P8 55a, P9 rml5k4udbma5ni04ciyrwvdhkewfdhcv, P10 NIL.
The second one is:
Application: Myexe.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Reflection.TargetInvocationException
Stack:
at System.RuntimeMethodHandle._InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeType)
at System.RuntimeMethodHandle.InvokeMethodFast(System.IRuntimeMethodInfo, System.Object, System.Object[], System.Signature, System.Reflection.MethodAttributes, System.RuntimeType)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo, Boolean)
at System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
at Microsoft.VisualBasic.CompilerServices.Symbols+Container.InvokeMethod(Method, System.Object[], Boolean[], System.Reflection.BindingFlags)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateGet(System.Object, System.Type, System.String, System.Object[], System.String[], System.Type[], Boolean[])
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(System.Object, System.Type, System.String, System.Object[], System.String[], System.Type[], Boolean[])
at Framework.Robot.ProcessTaskQuery(Framework.Data)
at Framework.Robot.ProcessTask()
at Framework.Robot.ServiceTimer()
at Myexe.WindowsService.ServiceTimer(System.Object, System.Timers.ElapsedEventArgs)
at System.Timers.Timer.MyTimerCallback(System.Object)
at System.Threading._TimerCallback.TimerCallback_Context(System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading._TimerCallback.PerformTimerCallback(System.Object)
So, those two errors were creating in the event log one after the other in the Application log. The Windows Service stopped after and only when I restarted it, it went ok on the same process. This seems to be like a memory issue or something. Because, we did not change the data and it worked when we restarted it.
Anyone knows something about those types of situations?