|
Rank: Newbie Groups: Member
Joined: 2/23/2023 Posts: 6
|
Hello. I have a problem with ThreadRunner on version=22.2.79.0 I have the code:
Code: Visual Basic.NET
Private Async Function RunProcess() As Task
AddHandler EO.Base.Runtime.Exception, AddressOf EOException
Try
Using threadRunner As New ThreadRunner()
Using mainWebView As WebView = threadRunner.CreateWebView()
Await mainWebView.LoadUrlAsync(Utility.GetHtmlFilePath())
mainWebView.EvalScript("run some js code")
Dim pdfDoc As New PdfDocument()
HtmlToPdf.ConvertHtml(mainWebView.GetHtml(), pdfDoc)
pdfDoc.Save("c:\temp\testPdf.pdf")
mainWebView.Close(True)
End Using
threadRunner.Stop() ' <- freezes here
End Using ' <- or freezes here if remove threadRunner.Stop() above
Catch ex As Exception
RaiseUnhandledException(ex, True)
Finally
RemoveHandler EO.Base.Runtime.Exception, AddressOf EOException
End Try
End Function
Why doesn't ThreadRunner finish its work? What am I doing wrong? I think I don't have that problem in version 23. Thanks
|
|
Rank: Newbie Groups: Member
Joined: 2/23/2023 Posts: 6
|
There looks to be a problem with the PdfDocument. When I use File.WriteAllText to save the html file, I don't see a freeze.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, We are not aware of any such problems. If you continue to have problem, please try to isolate the problem into a test project and send the test project to us: https://www.essentialobjects.com/forum/test_project.aspxOnce we have the test project we will investigate further. Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is just to let you know that we have received the test project and found the root of the problem. We will post a new build next week and that build will contain the fix.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 2/23/2023 Posts: 6
|
Hi
Cool news. Thank you very much!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This is just to let you know that we have posted build 23.1.45 that should resolve this issue. You can download the new build from our download page. Please take a look and let us know how it goes.
Thanks!
|
|