Welcome Guest Search | Active Topics | Sign In | Register

WebBrowser blank Screen with Error: This WebView either has already been destroyed or is being destr Options
Riephi
Posted: Friday, September 8, 2017 8:33:38 AM
Rank: Advanced Member
Groups: Member

Joined: 7/17/2015
Posts: 50
Dear Support Team,

We updated webbrowser from 2015 version to 2017. Since 2017 version we sporadically get the following exception: This WebView either has already been destroyed or is being destroyed.
I already found some posts (EO.Pdf.HtmlToPdf.ConvertHtml : WebView either has already been destroyed or is being destroyed; This WebView either has already been destroyed or is being destroyed). But in this posts it seems to be a problem in PDF library and we don't use PDF library.

In our case we load an URL in Webview. In this webview we're running our web application. In this web application we have different masks. We navigate through some masks via http requests with xml content. This requests are sent e.g. after clicking a button. While navigating through our masks we sporadically get a blank screen and nothing happens. After reloading the webpage, or laoding a new one, we get the above mentioned exception and the whole wpf application crashes.

We never had such problems. It's just since 2017 version of webbrowser.

I tried to look for an error in DevTools, but no success. All requests seem to be ok. When the blank screen appears, the DevTools are broken too. In Chrome everything works fine.

I tested the following WebBrowser versions:
- problem occured in versions: 2017.0.64.0, 2017.0.95.0, 2017.2.0.0, 2017.2.43
- after going back to version 2015.4.5.0 everythings works fine. The requests are just slower


After crash I got following stacktrace:

at EO.Base.Runtime.a(Object A_0, Exception A_1, Boolean A_2)
at EO.WebBrowser.WebView.s()
at EO.WebBrowser.WebView.a(String A_0, Boolean A_1)
at EO.WebBrowser.WebView.LoadUrl(String url)
at myProject.mywebview.loadUrl(String url)

When I call loadUrl() webview and webcontrol are not null and both of them don't seem to be broken or destroyed. I don't understand, why webview is crashing.


So my question is: How can I detect the webview crash when blank screen appears? I just get the exception, when it's too late. I just get it when I am trying to load an new URL. I don't get any event or error when browser is crashing. I can't really find a way to find out what is causing the crash.
Or do you know a quick fix or a heplful setting?

Thank you in advance!

Best regards
eo_support
Posted: Friday, September 8, 2017 10:23:48 AM
Rank: Administration
Groups: Administration

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

Thanks for the detailed information. This does seem to be a crash somewhere in the browser engine. You can detect the crash by handling the WebView's Closed event. The Closed event also provides a Reason field that tells you why the WebView has been closed (with crash being one of the reasons).

We do not know why it crashes for your case though. The most effective way to troubleshoot a crash is if you can reproduce it. If you can reproduce it, please send the repro project to us:

https://www.essentialobjects.com/forum/test_project.aspx

If you can not reproduce it, you can follow the steps here to collect crash logs:

https://www.essentialobjects.com/doc/common/crash_report.aspx

Most of the time we can NOT find out the root cause just from crash logs alone. However it does give us pointers and sometimes using the crash log together with some other information (for example, what your application was doing when it crashes), we might be able to piece together enough information to reproduce and fix the problem --- so the ultimate goal is still to reproduce it. As such if you can reproduce it it will be the best.

Thanks!
Riephi
Posted: Tuesday, September 12, 2017 5:28:55 AM
Rank: Advanced Member
Groups: Member

Joined: 7/17/2015
Posts: 50
Hi,

Thanks for your quick response and the information!
Unfortunately we are not able to create a test project. The crash randomly appears while navigating through our masks in our web application. We have one HTML page. In this page we are drawing our content. A web application can have several masks with different content. E.g. when clicking a Button, we're communicating with our backend via HTTP. The backend sends HTTP Requests with XML content to the web application. This XML contains all information about the new mask, which is then drawn in the HTML document.
Summarized: In our wpf application we load only one URL to start the web application. This web application uses only one HTML to display different content, which it receives from the backend via HTTP.

I handle WebView's Closed event now. The reason for closing is RenderCrash.
I also enabled CrashLog. You should have some entries. Our ApplicationID for Crashlog is a29530de-ca8e-47aa-8394-87078e5615a5.
I hope this information can help you finding out the reason for the crash.

Best Regards
eo_support
Posted: Tuesday, September 12, 2017 2:13:11 PM
Rank: Administration
Groups: Administration

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

Thanks for the additional information. We are able to locate the location of the crash based on crash report. While we can not reproduce the problem, just by looking at Chromium's source code statically the issue seems to be triggered by canceled requests (could be that you try to switch page before the underlying HTTP requests has completed). Apparently the code in question has been changed in newer version of Chromium. So this issue should have already been fixed by Chromium team.

We are just starting the process of re-synching our product to the latest Chromium source code and expect to have new build with newer version of Chromium ready in a few month. So once that is done this issue should be resolved.

Thanks!
Riephi
Posted: Tuesday, October 10, 2017 9:30:59 AM
Rank: Advanced Member
Groups: Member

Joined: 7/17/2015
Posts: 50
Hi,

thanks for your reply! Unfortunately we also can't really reproduce this crash, because it is very random. But we don't switch our page. We are always on the same page. We only have one loadUrl() call and then we only change the content of this page.
I looked up our requests in WireShark and all our request are fine. No request is canceled. All requests have status code 200.
Nevertheless the webview is crashing.

I also recognized an other rendering problem: Sometimes images are missing in our masks.


After clicking somewhere in this mask the images are shown.


We also can't hover these image buttons in developer tools elements. The blue overlay is missing for these gui elements.

Do you know such rendering issues? Or can you give an estimated release date for webview render crash fix? We have much trouble with that crash at our customers.

Thank you in advance!

Best regards
eo_support
Posted: Tuesday, October 10, 2017 12:49:22 PM
Rank: Administration
Groups: Administration

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

Without being able to reproducing the problem we are not sure what else to tell you. We should have a new release around year end. So it's not that far away --- however please keep in mind that while we hope this issue will be addressed in that build, we have no way to know for sure unless we can reproduce it. So if you managed to reduce it to a reproducing project, please feel free to send it to us.

Thanks!
Bob Noordam
Posted: Friday, October 20, 2017 2:09:46 AM
Rank: Newbie
Groups: Member

Joined: 10/12/2015
Posts: 9
@Phillip
In the same boat, been installing every update since waiting for it to go away.
Impossible to reproduce due to internal enterprise application and low appearance rate (~1 in 6000 opened views), but always at the first request in that view).
Seems we must just wait and see, but you can safely stop tearing your hair out over your own code i suppose :)

eo_support
Posted: Monday, October 23, 2017 9:08:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Bob Noordam wrote:
@Phillip
In the same boat, been installing every update since waiting for it to go away.
Impossible to reproduce due to internal enterprise application and low appearance rate (~1 in 6000 opened views), but always at the first request in that view).
Seems we must just wait and see, but you can safely stop tearing your hair out over your own code i suppose :)


Hello Bob,

Phillip has been able to successfully create a repro project for us and we were able to trace to the root of the problem to a bug to the Chromium browser engine using his repro project. The bug has already been fixed in newer version of Chromium. We are in the process of updating to the current version so as soon as that is done this issue should be resolved.

Having that said, there can be many different cases that can cause the browser engine to crash. Phillip's case is just one of them. So the situation you run into maybe different than his. Nevertheless, as the browser engine keeps evolving it should get more and more stable.

Thanks!
Gregg
Posted: Tuesday, November 7, 2017 5:31:13 PM
Rank: Newbie
Groups: Member

Joined: 8/31/2017
Posts: 3
Hello,

Does anyone know if this issue has been fixed yet? We have been having this problem as well. Seeing the issue with version EO.2017.2.14.0

Thanks for any feedback!
eo_support
Posted: Tuesday, November 7, 2017 5:38:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Gregg wrote:
Hello,

Does anyone know if this issue has been fixed yet? We have been having this problem as well. Seeing the issue with version EO.2017.2.14.0

Thanks for any feedback!


Please see our last reply.
Gregg
Posted: Tuesday, November 7, 2017 5:40:33 PM
Rank: Newbie
Groups: Member

Joined: 8/31/2017
Posts: 3
Thanks! Do you have an ETA?
eo_support
Posted: Tuesday, November 7, 2017 5:44:10 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Currently we are looking at the end of the year.
Gregg
Posted: Tuesday, November 7, 2017 5:53:31 PM
Rank: Newbie
Groups: Member

Joined: 8/31/2017
Posts: 3
Since that would seem to be another ~2~ months we can't wait that long. Is there a way to download an older version of control that works? OP mentioned they do not have the issue with version 2015.4.5.0. How do we get to older builds?

Thanks for your help.
eo_support
Posted: Wednesday, November 8, 2017 8:30:07 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Gregg wrote:
Since that would seem to be another ~2~ months we can't wait that long. Is there a way to download an older version of control that works? OP mentioned they do not have the issue with version 2015.4.5.0. How do we get to older builds?

Thanks for your help.


Please see your private message for the download location. In order to try it, make sure you do NOT apply your current license key with that version.
Jamie
Posted: Thursday, July 19, 2018 10:40:11 PM
Rank: Newbie
Groups: Member

Joined: 7/19/2016
Posts: 5
Hi. Im getting this same issue, using version 18.1.31.0, referencing the site http://harvestkorp.com/. I've tried this site with my own implementation and the sample projects and they all fail. Hopefully this helps reproduce/resolve the issue?
Bob Noordam
Posted: Friday, July 20, 2018 2:27:57 AM
Rank: Newbie
Groups: Member

Joined: 10/12/2015
Posts: 9
Jamie wrote:
Hi. Im getting this same issue, using version 18.1.31.0, referencing the site http://harvestkorp.com/. I've tried this site with my own implementation and the sample projects and they all fail. Hopefully this helps reproduce/resolve the issue?


Sorry, not the same problem :) thanks for posting the link tho.

That site does certainly something funny and brings the EOBrowser down with it's image rotater. In my tests with this page the page starts loading fine, and is even partialy shown in the EOBrowser, then the moment the spinner tries to display images things go down the drain and the page ends up white. Never saw the webview already destroyed exception.

In some cases i got an out of memory thrown (release builds mainly), while debug builds tended to end up with a white page and no exception. That could very well be related to my setup, so it may be worth checking if you see these out of memory messages to and play around with the EO.Base.Runtime.EnableEOWP setting.

(edit: tested with version 18.1.75.0 )
Jamie
Posted: Friday, July 20, 2018 10:24:27 AM
Rank: Newbie
Groups: Member

Joined: 7/19/2016
Posts: 5
Bob Noordam wrote:
Jamie wrote:
Hi. Im getting this same issue, using version 18.1.31.0, referencing the site http://harvestkorp.com/. I've tried this site with my own implementation and the sample projects and they all fail. Hopefully this helps reproduce/resolve the issue?


Sorry, not the same problem :) thanks for posting the link tho.

That site does certainly something funny and brings the EOBrowser down with it's image rotater. In my tests with this page the page starts loading fine, and is even partialy shown in the EOBrowser, then the moment the spinner tries to display images things go down the drain and the page ends up white. Never saw the webview already destroyed exception.

In some cases i got an out of memory thrown (release builds mainly), while debug builds tended to end up with a white page and no exception. That could very well be related to my setup, so it may be worth checking if you see these out of memory messages to and play around with the EO.Base.Runtime.EnableEOWP setting.

(edit: tested with version 18.1.75.0 )


Hey. Thanks for the pointer. I tested with setting EO.Base.Runtime.EnableEOWP = true and that site now loads. Thanks again
eo_support
Posted: Friday, July 20, 2018 2:11:53 PM
Rank: Administration
Groups: Administration

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

Yes. EnableEOWP is the correct workaround for this issue. We have looked into the issue and the root of the problem is an out of memory issue when allocating an image buffer that is 5616 by 3744. The raw buffer for this size requires an allocation of over 80M and it is failing. Setting EnableEOWP to true would increase the memory space used by the browser engine from 2GB to 4GB thus alleviates this problem.

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.