Welcome Guest Search | Active Topics | Sign In | Register

This WebView either has already been destroyed or is being destroyed. Options
Michael Forde
Posted: Friday, December 15, 2017 8:02:02 AM
Rank: Newbie
Groups: Member

Joined: 12/15/2017
Posts: 3
I am testing EO.PDF and I am getting the following error message.

"This WebView either has already been destroyed or is being destroyed."

when using the HtmlToPdf.ConvertHtml method (stack trace below).

We are creating large documents and can sometimes get system of memory exceptions. This error only seems to happen after one of these, and will persist until the app pool is restarted.

[Exception: This WebView either has already been destroyed or is being destroyed.]
EO.Base.Runtime.a(Object A_0, Exception A_1, Boolean A_2) +519
EO.WebBrowser.WebView.s() +184
EO.WebBrowser.WebView.LoadHtml(String html, String baseUrl) +15
EO.Internal.pb.a(adk A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, String A_6, Boolean A_7) +319
EO.Pdf.HtmlToPdfSession.a(adk A_0, String A_1, String A_2, Int32 A_3, Int32 A_4, String A_5, Boolean A_6) +113
EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options) +98
EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options) +16
EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream) +7
BackEnd_Residents.lnkBtnBulkPrint_Click(Object sender, EventArgs e) in C:\TCASOnline\FreshLiving_UAT\BackEnd\Residents.aspx.vb:1707
System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +116
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +106
System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9997462
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1738
eo_support
Posted: Friday, December 15, 2017 8:33:50 AM
Rank: Administration
Groups: Administration

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

Please check whether you are trying the latest build (18.0.15.0). I believe we have fixed an issue like this very recently. If you are still seeing this problem on the latest build, please try to isolate the problem into a test app and send the test app to us:

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

Once we have that we will be happy to investigate further.

Thanks!
Michael Forde
Posted: Friday, December 15, 2017 10:00:57 AM
Rank: Newbie
Groups: Member

Joined: 12/15/2017
Posts: 3
It is still occuring in the lastest version.

The code I am using is copied exactly from online documents section.

Dim response As HttpResponse = HttpContext.Current.Response
response.Clear()
response.ClearHeaders()
response.ContentType = "application/pdf"

'Convert to the output stream
EO.Pdf.HtmlToPdf.ConvertHtml(strHtml, response.OutputStream)

response.End()
eo_support
Posted: Friday, December 15, 2017 10:10:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Can you send us a test project? We will need to debug it here to find out the root cause.
Michael Forde
Posted: Friday, December 15, 2017 10:22:15 AM
Rank: Newbie
Groups: Member

Joined: 12/15/2017
Posts: 3
Any test project wont consist of any more than those lines of code as anything else would rely on database connections. I also cannot provide you with Html we are using either as there would be data protection issues.

All we do is populate the string "strHtml" in a loop by concatenating values pulled from our db. Then generate the pdf using the code above.
eo_support
Posted: Friday, December 15, 2017 11:04:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
You can try to create fake data in memory to reproduce it. One of the main purpose of having a test project is to isolate it so that it no longer depends on your actual environment but still present us the same problem you run into. For example, say hypothetically you might have a special string in your database that triggers disastrous result in EO.Pdf, if that's the case we will need to know what that string is in order to start our investigation. Otherwise we would be shooting the dark --- not only there is little chance for us to hit anything, but even if we hit something, it could be something else that is completely different than the one you run into. So unless we have a test app from you, we have no way of giving you a definite answer about whether this issue is resolved or not. We could keep telling you try this and try that to see which one sticks, but that would be a waste of time for both of us since there is no clear direction on that exercise, and in the end neither of us would know for sure if your issue is resolved or not, and there is a great chance of the same issue may surface again later in a different form so we got to start this guessing game all over again. Obviously that's not a good or effective way to operate, so we do not do that.


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.