|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Hello, We make two calls to WebBrowser.GetContentAreaSize. In between the calls, the browser is resized. The second call never returns and just hangs. Here is a snippet of the code that hangs.
Code: C#
_
var origSize = browser.WebBrowser.GetContentAreaSize(true);
var tabSize = browser.Parent.ClientSize;
var totalSize = browser.WebBrowser.GetPageSize();
maxTileHeight = (int)(origSize.Width * 1.5);
if (currentSnapshot.IsFullPage)
{
browser.Dock = DockStyle.None;
browser.Left = 0;
browser.Top = 0;
browser.Width = tabSize.Width - 2;
browser.Height = Math.Min(maxTileHeight, totalSize.Height);
Application.DoEvents();
WebView.DoEvents(stitchedDelays);
}
var viewSize = browser.WebBrowser.GetContentAreaSize(true);
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, We tested this on the latest build (2016.1.95) and it works fine. Can you try that build first? If that build does not work, please try to isolate the problem into a test project and send the test project to us. See here for more details: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Hello, I forgot to mention that it only happens with certain sites. Here's an example of one that we found it happens consistently on: http://www.dailypress.comI tried it out on the latest version and still see this issue. Thanks, Peavy
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, Can you create a test project and send it to us? We tested here with the site you provided and still can not reproduce it. See here for more details on sending test project: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Hello,
I sent over an email with a test project. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We have received the test app. Our preliminary investigation indicates that the resize triggered some JavaScript code that apparently never returns. The render process will not be able to handle another request (the second GetContentAreaSize call) until the JavaScript code finishes running. We are trying to understand exactly what JavaScript it is running and will post again if we find anything.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We are able to get the stack trace of the JavaScript code that causes the page to hang. We will PM you with the stack trace in case that can be useful for you.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/26/2015 Posts: 98
|
Hello,
Is there a way to kill the execution of the code that is hanging? We have no control over the JavaScript of the website, or some of the other sites as they are just public sites that our clients browse to.
Thank you!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You can't just kill the code. You would have to call WebView.Close to close the WebView.
Thanks!
|
|