Rank: Member Groups: Member
Joined: 10/30/2019 Posts: 10
|
Hi, We currently use the Version 20.0.81.0. We switched the Internal Winforms .Net Webbrowser Control to a EO.Webbrowser in our Application, and it worked fine for most of our clinets. But on some machines our process crashes on application exit, first with the Exception Code 0xc0020001, and than with the Exception Code c000041d. This only happens if we the EO.Webbrowser Controls, and Displayed a Page with them. According to a Websearch this exception happens when callbacks get executed, after CLR began the shudown. After we added this Code do the Dispose of our Mainform, it happened less, but still happens: Quote: EO.Base.Runtime.Shutdown() While Not EO.Base.Runtime.HasShutdown Threading.Thread.Sleep(100) End While
Not sure if there is anything else we can/should try.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi,
This usually occurs when you have orphan WebViews that you have not explicitly disposed. Please check your code to make sure you have properly disposed every one. The easiest way to dispose the WebView is to destroy the hosting window. For example, if you have a WebControl inside a Form, then closing the Form would be sufficient to destroy the WebView. However since WebView is not multi-thread safe, you must destroy the WebView in the same thread in which it was created.
Thanks!
|
Rank: Member Groups: Member
Joined: 10/30/2019 Posts: 10
|
eo_support wrote:Hi,
This usually occurs when you have orphan WebViews that you have not explicitly disposed. Please check your code to make sure you have properly disposed every one. The easiest way to dispose the WebView is to destroy the hosting window. For example, if you have a WebControl inside a Form, then closing the Form would be sufficient to destroy the WebView. However since WebView is not multi-thread safe, you must destroy the WebView in the same thread in which it was created.
Thanks! I checked the source of our app with the version with witch I had this Crash the last time, but all WebViews are Disposed. We currently use the WebView only in 2 Locations, and the Dispose Code we currently this:
Code: Visual Basic.NET
If disposing AndAlso Me.WebControl1 IsNot Nothing Then
Me.WebControl1.Parent = Nothing
If Not Runtime.HasShutdown Then
Me.WebView1.Destroy()
Me.WebView1.Dispose()
End If
Me.WebControl1.Dispose()
End If
and This:
Code: Visual Basic.NET
If Me.webViewMail IsNot Nothing Then
Me.webViewMail.Dispose()
Me.webViewMail = Nothing
End If
If Me.webControlMail IsNot Nothing Then
Me.webControlMail.WebView = Nothing
Me.webControlMail.Dispose()
Me.webControlMail = Nothing
End If
Quote: However since WebView is not multi-thread safe, you must destroy the WebView in the same thread in which it was created.
Is there any way to check from the WebView Control if we are in the Correct Thread? (like Control.InvokeRequired with WinForm Controls) Or any way to switch to the correct thread? (like Control.Invoke with WinForm Controls) Remark: We ensure that for all our Forms/Controls are Disposed.
|
Rank: Member Groups: Member
Joined: 10/30/2019 Posts: 10
|
Hi, I just testet after a Update (using the NuGet Pacakge Version 2020.1.31) and it still crashes on Exit for me. I activated LocalDump, and checked the created Dump, and there is no instance of a WebView pressent, at the time of the crash. I will see if I can redruce/reproduce it in a test project. Anyway, not sure if this Helps, but here is the output of the call '!dumpheap -stat -type EO.' on the Debugger (WinDbg) Quote: 0:000> !dumpheap -stat -type EO. Statistics: MT Count TotalSize Class Name 00007ffe969f2768 1 24 System.Collections.Generic.Dictionary`2+ValueCollection[[System.IntPtr, mscorlib],[EO.Internal.prva+kcfi, EO.Base]] 00007ffe969f21d8 1 24 System.Collections.Generic.Dictionary`2+KeyCollection[[EO.Internal.xcfo, EO.WebEngine],[System.String, mscorlib]] 00007ffe969f1ad0 1 24 System.Collections.Generic.Dictionary`2+ValueCollection[[System.Int32, mscorlib],[EO.WebEngine.Engine, EO.WebEngine]] 00007ffe969f1890 1 24 EO.WebEngine.Engine+scsq 00007ffe9648f2f0 1 24 EO.Internal.hoqq+miwx 00007ffe9648dad0 1 24 System.Collections.Generic.ObjectEqualityComparer`1[[EO.WebBrowser.WebView, EO.WebBrowser]] 00007ffe9648d080 1 24 System.Collections.Generic.Dictionary`2+ValueCollection[[System.Int32, mscorlib],[EO.Internal.psaj+mpbc, EO.Base]] 00007ffe9648bd78 1 24 EO.WebBrowser.WebView+speh[] 00007ffe9648ae08 1 24 EO.WinForm.WebViewHost+bdhl+lryc 00007ffe964815d0 1 24 System.Nullable`1[[EO.Internal.prum, EO.Base]] 00007ffe9645d5c8 1 24 System.Collections.Generic.EnumEqualityComparer`1[[EO.Internal.psal, EO.Base]] 00007ffe964526c8 1 24 EO.Internal.prvg+qcap 00007ffe9644ea38 1 24 EO.Internal.psaj+mpbd 00007ffe9644cd48 1 24 EO.Internal.psbc`2+tfxr[[EO.Internal.pruq+ixsq+cxxp, EO.Base],[System.Object, mscorlib]][] 00007ffe96446290 1 24 System.Collections.Generic.EnumEqualityComparer`1[[EO.Internal.prvj, EO.Base]] 00007ffe96444698 1 24 EO.Internal.pruq+ixsq+cxxs+wyht 00007ffe96444570 1 24 EO.Internal.pruq+ixsq+cxxs 00007ffe96443e70 1 24 EO.Internal.psah+cvdo 00007ffe96440b90 1 24 System.Collections.Generic.EnumEqualityComparer`1[[EO.Internal.xcev+lxxz, EO.WebEngine]] 00007ffe9640ee68 1 24 System.Collections.Generic.ObjectEqualityComparer`1[[EO.Internal.xcfo, EO.WebEngine]] 00007ffe9640c2d8 1 24 EO.WebEngine.CookieManager 00007ffe963dda68 1 24 EO.WebBrowser.NavigationTask[] 00007ffe963dca50 1 24 EO.Base.Action[] 00007ffe963d9ee8 1 24 System.Collections.Generic.ObjectEqualityComparer`1[[EO.Internal.prtw+lkhg, EO.Base]] 00007ffe963d43b8 1 24 EO.WebBrowser.WebView+spes 00007ffe963d41c8 1 24 EO.WebBrowser.Shortcut[] 00007ffe963d3050 1 24 EO.WebBrowser.WebView+spen 00007ffe964c0038 1 32 EO.Internal.psbf[] 00007ffe96459dc8 1 32 EO.Internal.przm 00007ffe9644df18 1 32 EO.Internal.prvp 00007ffe9640a9c0 1 32 EO.Internal.xcgg 00007ffe963dfdd8 1 32 EO.Internal.pruw`2[[System.Int32, mscorlib],[EO.WebBrowser.NavigationTask, EO.WebBrowser]] 00007ffe9454c2c0 1 32 EO.Internal.przd+irou 00007ffe9454b050 1 32 EO.Internal.psbu 00007ffe9648f720 1 40 EO.Internal.psbe 00007ffe9648ac10 1 40 EO.Internal.hoqk 00007ffe964561a0 1 40 EO.Internal.prvl 00007ffe9644e248 1 40 EO.Internal.psaj+mpbc 00007ffe9640beb0 1 40 EO.Internal.pruu`1[[System.Int64, mscorlib]] 00007ffe963d6768 1 40 System.Collections.Generic.List`1[[EO.Internal.prtw+lkhg, EO.Base]] 00007ffe963d3258 1 40 System.Collections.Generic.List`1[[EO.WebBrowser.WebView, EO.WebBrowser]] 00007ffe9454c468 1 40 EO.Internal.przd 00007ffe9648fad8 1 48 EO.Internal.psbf 00007ffe96484cb8 1 48 EO.Internal.psaz`3+wfko[[EO.Internal.prxc`1[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base],[EO.Internal.psbb`1+elgn[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base],[EO.Internal.psbb`1+elgo[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base]] 00007ffe9645b930 1 48 EO.Internal.przn+okov+emal 00007ffe9645a660 1 48 EO.Internal.przn+okoq 00007ffe96443a18 1 48 EO.Internal.psaw+oemy 00007ffe963da038 2 48 EO.Internal.prxu 00007ffe963d66d8 2 48 EO.Internal.prtw+lkhh 00007ffe9648f5e8 1 56 EO.Internal.psbh 00007ffe9645b658 1 56 EO.Internal.przn+okov 00007ffe96458c60 1 56 EO.Internal.przq 00007ffe969f1940 1 64 System.Comparison`1[[EO.WebEngine.Engine, EO.WebEngine]] 00007ffe9648af48 1 64 EO.Internal.hoqk+bumk 00007ffe9648a970 1 64 EO.Internal.hoqj 00007ffe96456d90 1 64 EO.Internal.xcfs 00007ffe9644d028 2 64 EO.Internal.prxa 00007ffe964420f8 1 64 EO.Internal.psah+cvdn 00007ffe96409d80 1 64 EO.Internal.xcga+fcah 00007ffe963d4908 1 64 EO.Internal.houp+yvdn 00007ffe9454a420 1 64 EO.Internal.psbo+jkib 00007ffe96484e40 1 80 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[EO.Internal.psaz`3+wfko+dlvr[[EO.Internal.prxc`1[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base],[EO.Internal.psbb`1+elgn[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base],[EO.Internal.psbb`1+elgo[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base]], EO.Base]] 00007ffe96482c70 1 80 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[EO.Internal.prva+kcfi, EO.Base]] 00007ffe96482568 1 80 System.Collections.Generic.Dictionary`2[[System.IntPtr, mscorlib],[EO.Internal.prva+kcfi, EO.Base]] 00007ffe9645c3c0 1 80 System.Collections.Generic.Dictionary`2[[EO.Internal.psal, EO.Base],[System.Object, mscorlib]] 00007ffe96458e68 1 80 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[EO.Internal.przq, EO.Base]] 00007ffe96455528 2 80 System.Collections.Generic.List`1[[EO.Internal.prul+dxak, EO.Base]] 00007ffe9644e2f8 1 80 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[EO.Internal.psaj+mpbc, EO.Base]] 00007ffe96445088 1 80 System.Collections.Generic.Dictionary`2[[EO.Internal.prvj, EO.Base],[EO.Internal.prvk, EO.Base]] 00007ffe96443230 1 80 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[EO.Internal.psaw+oemx, EO.Base]] 00007ffe96442200 1 80 System.Collections.Generic.Dictionary`2[[System.IntPtr, mscorlib],[EO.Internal.psah, EO.Base]] 00007ffe9640e3d0 1 80 System.Collections.Generic.Dictionary`2[[EO.Internal.xcfo, EO.WebEngine],[System.String, mscorlib]] 00007ffe9640c9a8 1 80 System.Collections.Generic.Dictionary`2[[System.Int64, mscorlib],[EO.Internal.prut`2+wkqw[[System.Int64, mscorlib],[System.Int32, mscorlib]], EO.Base]] 00007ffe96409820 2 80 EO.Internal.xcev 00007ffe963d9238 1 80 System.Collections.Generic.Dictionary`2[[System.Object, mscorlib],[EO.Internal.prtw+lkhi+vwkn, EO.Base]] 00007ffe963d8998 1 80 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[EO.WebEngine.Engine, EO.WebEngine]] 00007ffe963d8290 1 80 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[EO.WebEngine.Engine, EO.WebEngine]] 00007ffe963d4700 2 80 EO.WebBrowser.WebView[] 00007ffe9454cb68 1 80 System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[EO.Internal.przd+irou+gqjl, EO.Base]] 00007ffe96487e78 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[EO.Internal.psaz`3+wfko+dlvr[[EO.Internal.prxc`1[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base],[EO.Internal.psbb`1+elgn[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base],[EO.Internal.psbb`1+elgo[[EO.Internal.przn+okov+emaj, EO.Base]], EO.Base]], EO.Base]][] 00007ffe96483840 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[EO.Internal.prva+kcfi, EO.Base]][] 00007ffe964834a8 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.IntPtr, mscorlib],[EO.Internal.prva+kcfi, EO.Base]][] 00007ffe9645e728 2 96 EO.Internal.pryd[] 00007ffe964596c0 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[EO.Internal.przq, EO.Base]][] 00007ffe96456778 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[EO.Internal.psaw+oemx, EO.Base]][] 00007ffe96454c60 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.IntPtr, mscorlib],[EO.Internal.psah, EO.Base]][] 00007ffe964468b0 1 96 System.Collections.Generic.Dictionary`2+Entry[[EO.Internal.prvj, EO.Base],[EO.Internal.prvk, EO.Base]][] 00007ffe96441cd8 1 96 System.Collections.Generic.Dictionary`2+Entry[[EO.Internal.xcfo, EO.WebEngine],[System.String, mscorlib]][] 00007ffe96441940 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[EO.WebEngine.Engine, EO.WebEngine]][] 00007ffe964415a8 1 96 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[EO.WebEngine.Engine, EO.WebEngine]][] 00007ffe96484698 1 128 EO.Internal.przn+okov+emak 00007ffe96409390 1 128 EO.WebEngine.EngineOptions 00007ffe9454dba8 2 128 EO.Base.Action 00007ffe9645b2c0 6 144 EO.Internal.pryd 00007ffe9640c420 3 144 EO.Internal.prvk 00007ffe963dfaf0 3 144 EO.Internal.prvy 00007ffe9640f950 2 160 System.Collections.Generic.Dictionary`2[[EO.Internal.xcev+lxxz, EO.WebEngine],[System.String, mscorlib]] 00007ffe9454cad8 7 168 EO.Internal.przd+irou+gqjl 00007ffe9645fed0 1 176 EO.Internal.prva+kcfi 00007ffe963d6ef0 2 176 EO.Internal.prtw+lkhg[] 00007ffe96483d50 1 192 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[EO.Internal.przd+irou+gqjl, EO.Base]][] 00007ffe96455e88 3 200 EO.Internal.prul+dxak[] 00007ffe96408c48 1 200 EO.Internal.xcfu 00007ffe9644d328 2 208 EO.Internal.prwy 00007ffe96401460 8 256 EO.WebBrowser.Request 00007ffe9454c738 7 280 EO.Internal.prup 00007ffe9640c8f8 8 384 EO.Internal.prut`2+wkqw[[System.Int64, mscorlib],[System.Int32, mscorlib]] 00007ffe964c5c08 6 432 EO.WebEngine.Cookie 00007ffe964c4148 1 432 System.Collections.Generic.Dictionary`2+Entry[[System.Int64, mscorlib],[EO.Internal.prut`2+wkqw[[System.Int64, mscorlib],[System.Int32, mscorlib]], EO.Base]][] 00007ffe9644ec08 1 432 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[EO.Internal.psaj+mpbc, EO.Base]][] 00007ffe963d9a90 1 432 System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[EO.Internal.prtw+lkhi+vwkn, EO.Base]][] 00007ffe9648efd8 5 480 EO.Internal.psbj 00007ffe964099c0 6 576 EO.Internal.xcfe 00007ffe9640c148 6 624 EO.WebEngine.CookieCollection 00007ffe964c4b20 8 704 EO.Internal.horm 00007ffe964411b0 2 864 System.Collections.Generic.Dictionary`2+Entry[[EO.Internal.xcev+lxxz, EO.WebEngine],[System.String, mscorlib]][] 00007ffe963dcd78 8 1088 EO.Internal.horr 00007ffe9640a708 2 2608 EO.Internal.xcge[] 00007ffe9454ada8 2 2608 EO.Internal.psbs[] 00007ffe9454b360 638 25520 EO.Internal.psbt Total 841 objects
|
Rank: Member Groups: Member
Joined: 10/30/2019 Posts: 10
|
I think I found the Reason, wo do Call 'System.Windows.Forms.Application.Exit()' or 'System.Environment.Exit(0)' when our Main Window is closed, or on the End-Button is clicked. If I remove these Calls, then I get no crash, but if they are pressent, then it crashes. I will submit a repor project soon.
Correction: Removing these 2 Lines only fixes the Crash in the TestApp, not in our Normal application.
|
Rank: Member Groups: Member
Joined: 10/30/2019 Posts: 10
|
eo_support wrote:Hi,
We did uncomment those two lines and it still works fine.
Thanks! We testet on multiple machines, with Different Windows Versions, and it crashed on all of them. But we noticed, that on Some Windows-Version the Error Dialog wasn't displayed, but the Crash still happened. (But is logged in Eventlog) Also, if You start a Debugging, then the Crash also doesn't happen.
|