Welcome Guest Search | Active Topics | Sign In | Register

ThreadRunner freezes. version=22.2.79.0 Options
John
Posted: Tuesday, February 28, 2023 5:49:11 AM
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
John
Posted: Tuesday, February 28, 2023 11:22:09 AM
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.
eo_support
Posted: Tuesday, February 28, 2023 4:42:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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.aspx

Once we have the test project we will investigate further.

Thanks!
eo_support
Posted: Thursday, March 2, 2023 11:21:11 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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!
John
Posted: Thursday, March 2, 2023 11:24:07 AM
Rank: Newbie
Groups: Member

Joined: 2/23/2023
Posts: 6
Hi

Cool news. Thank you very much!
eo_support
Posted: Thursday, March 16, 2023 2:36:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
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!


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.