Welcome Guest Search | Active Topics | Sign In | Register

Async QueueSciptCall causes "This WebView either has already been destroyed or is being destroy Options
Panda
Posted: Monday, October 17, 2016 12:50:46 AM
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)

eo_support
Posted: Monday, October 17, 2016 10:47:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
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!
Panda
Posted: Monday, October 17, 2016 7:01:18 PM
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
eo_support
Posted: Tuesday, October 18, 2016 8:22:30 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
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!


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.