Welcome Guest Search | Active Topics | Sign In | Register

Calls to WebView hang on a POST call Options
Wookie50
Posted: Monday, September 21, 2015 7:58:05 PM
Rank: Newbie
Groups: Member

Joined: 9/21/2015
Posts: 3
I'm getting a consistent hang (deadlock?) in the most recent version of EO.WebBrowser (2015.2.61.0). This problem also existed in the previous version.

It occurs primarily during a call to POST as follows:

m_tr = new ThreadRunner();
m_wv = m_tr.CreateWebView();
Request request = new Request("http://some_site.com");
request.PostData.AddValue("A", "B");
request.PostData.AddValue("X-Requested-With", "XMLHttpRequest");
request.Method = "POST";
wv.LoadRequestAndWait(request); // <-- hangs on this line
String Result = wv.GetHtml();

It typically runs for a few minutes, executing perhaps 50 or so Load requests. After that, everything would stop inside LoadRequestAndWait();

I am not able to call m_wv.Dispose() or m_tr.Stop() form a different thread. When I do, those threads lock as well inside those calls.

This object is basically unusable due to this problem. Please help!
eo_support
Posted: Tuesday, September 22, 2015 9:28:48 AM
Rank: Administration
Groups: Administration

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

You need to use ThreadRunner.Send to call LoadRequestAndWait:

http://www.essentialobjects.com/doc/eo.webbrowser.threadrunner.send_overload_1.aspx

See here for more information on how to use this method:

http://www.essentialobjects.com/doc/webbrowser/start/webview_no_ui.aspx

Thanks!
Wookie50
Posted: Tuesday, September 22, 2015 9:50:27 PM
Rank: Newbie
Groups: Member

Joined: 9/21/2015
Posts: 3
eo_support: thank you for your response.

I have not fully copied all the code I used but I did indeed call to WebView from inside ThreadRunner.Send(). There is quite a bit more code and I tried to send all the relevant sections. Here's a more complete picture of the code that hangs:




ThreadRunner m_tr = new ThreadRunner();
WebView wv = m_tr.CreateWebView();

m_tr.Send(() =>
{
Request request = new Request("http://some_site.com");
request.PostData.AddValue("A", "B");
request.PostData.AddValue("X-Requested-With", "XMLHttpRequest");
request.Method = "POST";
wv.LoadRequestAndWait(request); // <-- hangs on this line
String Result = wv.GetHtml();
}
eo_support
Posted: Wednesday, September 23, 2015 1:39:04 PM
Rank: Administration
Groups: Administration

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

This is just to let you know that we have found the root cause of this problem. This issue will be fixed in our next build.

Thanks!
Wookie50
Posted: Wednesday, September 23, 2015 1:41:50 PM
Rank: Newbie
Groups: Member

Joined: 9/21/2015
Posts: 3
That is fantastic news, thank you for checking into it.

Do you guys have an ETA for the fix?

Also - when it's available, will you post in this thread?

Thank you again.

eo_support
Posted: Wednesday, September 23, 2015 3:24:42 PM
Rank: Administration
Groups: Administration

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

We have posted a new build that should resolve this issue. Please see your private message for the download location.

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.