Welcome Guest Search | Active Topics | Sign In | Register

WPF Webview.Close(true) Does Not Always Terminate eowp.exe Renderer Process Options
JK
Posted: Thursday, May 19, 2016 10:23:24 AM
Rank: Advanced Member
Groups: Member

Joined: 7/20/2015
Posts: 52
Hi All,

I'm using the WPF WebControl which by default has a WebView property that is populated by a WebView object. Typically I start using that WebView by setting the Url and I'm on my merry way. :)

Under a certain scenario, users of my app can have a second window enabled when they launch the app, and this second window hosts the same web pages rendered in the WebViews of the first window. The requirement is that when they have this 2nd window turned on, we want to shut down the WebViews in the first window for reasons I won't get into here.

So i wrote some code to detect this 2-windows condition and call WebView.Close(true) on the WebViews in window #1. However, I found that the eowp.exe processes behind these WebViews stick around sometimes.

Was able to diff a WebView whose eowp got successfully terminated vs. one that didn't and found that the properties listed below were different. Here are the different properties of one that didn't get shut down:

CanEvalScript false bool
CanGoBack false bool
IsCreated false bool
StatusMessage null string
Title null string
Url "" string

My workaround was to tie into the StatusMessageChanged event and if the StatusMessage is not null I retry WebView.Close(true) and this seems to work. But I wanted to let the good people at EO know because this seems like a bug. WebView.Close(true) should always terminate the worker process I think.

Thanks!

JK
eo_support
Posted: Thursday, May 19, 2016 11:53:23 AM
Rank: Administration
Groups: Administration

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

Thank you very much for the information. This looks like for some reason the WebView did not close properly. If you can somehow isolate this problem into a test project it will be very helpful for us to track to the bottom of this issue. See here for more information on how to send test project to us:

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

In the mean time, you can also try to close the WebView's parent window. For example, if you put the WebView in a Form then closing the Form. This should always destroy the WebView properly.

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.