Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
Hi am using EO WebBrowser v16.0.91.
I'm getting this exception and thought I would like to simply swallow it. I thought it was a bug in our code, but then again, I'm not quite sure there's any easy way for us to prevent or swallowing it, given it's async.
StackTrace below.
At some point in here, the user has closed the dialog, and the WebView is destroyed. But the async call to QueueScriptCall - queued, waited and now, after the WebView is destroyed is trying to execute it's own code.
Shouldn't it be checking if the WebView is destroyed before it completes the async operation?
Top-level Exception Type: System.Exception Message: This WebView either has already been destroyed or is being destroyed. Source: EO.Base Stack Trace: at EO.Base.Runtime.a(Object A_0, Exception A_1, Boolean A_2) at EO.WebBrowser.WebView.r() at EO.WebBrowser.WebView.a(WaitableTask A_0) at EO.WebBrowser.WaitableTask.a(WebView A_0) at EO.WebBrowser.WebView.QueueScriptCall(ScriptCall call) at EO.WebBrowser.WebView.QueueScriptCall(String script) at Client.Core.Browser.EOWebBrowser.set_ScrollLeft(Int32 value) at Client.Core.Views.BrowserContainer.set_ScrollX(Int32 value)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You can not call QueueScriptCall when the WebView has started to be destroyed. You can handle EO.Base.Runtime.Exception to swall this exception.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 10/7/2015 Posts: 35
|
Hi Thanks, I notice that EO.Base,Runtime.Exception is an event handler, not a class
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
Yes. It's an event and you need to handle that event. The default handler will throw the exception but if you handle it yourself then it won't throw.
Thanks!
|