Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
The process running the web automation is crashing intermittently. We cannot always reproduce. My question is if you know about the error and if it is anything in the override of OnException that is wrong that could cause this. Basically we do not want the process to crash but only log the errors.
Thanks
Crash error in dmp file:
System.IO.IOException: 'The handle is invalid. This exception was originally thrown at this call stack: [External Code] System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, object, bool) in executioncontext.cs System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, object, bool) in executioncontext.cs System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, object) in executioncontext.cs System.Threading.ThreadHelper.ThreadStart() in thread.cs
OnException override code:
protected override void OnException(Exception ex, bool exiting) { if (WebResultObject != null) { WebResultObject.AddOutput(ex.ToString() + "|Exiting:" + exiting, true); }
if (CurrentContext != null) { CurrentContext.Abort(ex); }
base.OnException(ex, exiting); }
Stack trace:
The crash is related to Not Flagged > 12396 0 Worker Thread WebMacroPlayerThread78337867-6e0e-42a6-aa75-c8dce8db531e EO.Base.dll!EO.Base.Runtime.kvep [External Code] [Managed to Native Transition] EO.Base.dll!EO.Base.Runtime.kvep(object kos, System.Exception kot, bool kou) EO.Base.dll!EO.Base.ThreadRunnerBase.OnException(System.Exception ex, bool exiting) WebAutomation.dll!WebAutomation.WebMacroThreadRunner.OnException(System.Exception ex, bool exiting) EO.Base.dll!EO.Base.ThreadRunnerBase.ygvy(bool kre) EO.Base.dll!EO.Base.ThreadRunnerBase.ygvy() EO.Base.dll!EO.Internal.srzl.ygvy() mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917 mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() Line 111 [Native to Managed Transition] [External Code]
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
What version is your DLL?
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
20.02.63.0
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
If you do not call base.OnException(ex, exiting) in your OnException, the process should not crash. base.OnException would automatically rethrow the exception thus causing the process to crash.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
Great, thanks, will try this!
|