Rank: Advanced Member Groups: Member
Joined: 3/10/2020 Posts: 59
|
We are getting multiple exceptions on loading the EO Browser in our WPF application.
1.We are getting below exception when we launched the same webpage in chrome and WPF application simultaneously Can you please provide the possible reason for this issue and let us know if any more details needed. Exception: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at EO.Base.Runtime.a(Object A_0, Exception A_1, Boolean A_2) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
2.Can you please let us know in which scenario below issue occurs and possible way to resolve the issue.
Implementation We are setting the EO properties and starting EO browser. EO.Base.Runtime.EnableEOWP = true; EO.Base.Runtime.InitWorkerProcessExecutable(eowp.exe); WebView webView = threadRunner.CreateWebView(); threadRunner.Send(() => { request = new EO.WebBrowser.Request(SourceURL); request.Headers.Add("X-JWT-Assertion", Convert.ToString(Headers)); webView.LoadRequest(request); webView.LoadCompleted += webViewWP_LoadCompleted; });
Exception: EO.Internal.i8+e, EO.Base, Version=20.0.53.0, Culture=neutral, PublicKeyToken=e92353a6bf73fffc Message : Child process not ready. Source : EO.Base Help link : Data : System.Collections.ListDictionaryInternal TargetSite : System.Object a(Int32, Boolean ByRef) HResult : -2146233088 Stack Trace : at EO.Base.ThreadRunnerBase.f.a(Int32 A_0, Boolean& A_1) at EO.Base.ThreadRunnerBase.Send(ActionWithResult action, Int32 timeoutInMS, Boolean& done) at EO.Base.ThreadRunnerBase.Send(ActionWithResult action, Int32 timeoutInMS) at EO.WebBrowser.ThreadRunner.Send(WebViewCallback callback, WebView webView, Object args) at EO.WebBrowser.ThreadRunner.a(Int32 A_0, Int32 A_1, Boolean A_2, BrowserOptions A_3) at EO.WebBrowser.ThreadRunner.CreateWebView(BrowserOptions options) at EO.WebBrowser.ThreadRunner.CreateWebView()
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
We do not know what caused the first problem unless we can reproduce it since numerous different situation can cause OutOfMemoryException. We would have to reproduce it in order to see exactly what caused it and then see whether it is a bug that can be fixed, or it is triggered by something that can be avoided.
For the second issue if you run into it from time to time it usually indicates a temporary system overload. When you create a new WebView, it may try to create a child process (since the native browser engine runs inside a child process) and then wait for the child process to be ready to take command from your process. if for some reason the system was too slow to start the child process or the child process takes too long to initialize, then you will get this error. Obviously there is no simple way to avoid this issue beside reducing the load.
Another common cause for this error is when a third party security software tries to scan the process in real time thus slows down the process significantly and causes the time out. In that case the issue can be resolved by explicitly whitelist our child process (eowp.exe).
Hope this helps. Please feel free to let us know if you still have questions.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 3/10/2020 Posts: 59
|
Hi, For the issue 2, is there any way (like a callback function) to determine the child process is created successfully and ready to take command.
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
There isn't a way for you to do that at the application level. At the library level, we already do that --- but there is a time out value and the library would throw an exception when the time out is reached. This usually indicates a problem somewhere out of the library (such as system overload or third party security software interference) and you would have to resolve that problem first.
Thanks!
|