Welcome Guest Search | Active Topics | Sign In | Register

Call to WebBrowser.GetContentAreaSize never returns Options
Peavy
Posted: Thursday, September 1, 2016 3:28:38 PM
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);
eo_support
Posted: Thursday, September 1, 2016 6:03:58 PM
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.aspx

Thanks!
Peavy
Posted: Thursday, September 1, 2016 6:19:28 PM
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.com

I tried it out on the latest version and still see this issue.

Thanks,
Peavy
eo_support
Posted: Friday, September 2, 2016 9:30:13 AM
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.aspx

Thanks!
Peavy
Posted: Friday, September 2, 2016 1:33:01 PM
Rank: Advanced Member
Groups: Member

Joined: 6/26/2015
Posts: 98
Hello,

I sent over an email with a test project. Thanks!
eo_support
Posted: Friday, September 2, 2016 4:46:22 PM
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!
eo_support
Posted: Monday, September 5, 2016 9:22:35 PM
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!
Peavy
Posted: Friday, September 9, 2016 1:46:48 PM
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!
eo_support
Posted: Friday, September 9, 2016 2:08:45 PM
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!


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.