Welcome Guest Search | Active Topics | Sign In | Register

Process crashes on Exception Options
serializer
Posted: Thursday, December 3, 2020 3:41:25 PM
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]
eo_support
Posted: Thursday, December 3, 2020 4:21:39 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

What version is your DLL?

Thanks!
serializer
Posted: Thursday, December 3, 2020 4:22:44 PM
Rank: Advanced Member
Groups: Member

Joined: 5/9/2016
Posts: 84
20.02.63.0
eo_support
Posted: Friday, December 4, 2020 9:51:09 AM
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!
serializer
Posted: Saturday, December 5, 2020 7:41:23 AM
Rank: Advanced Member
Groups: Member

Joined: 5/9/2016
Posts: 84
Great, thanks, will try this!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.