Hi @kleinsimon ,
awesome work on this Wrapper for WebView2 in LabVIEW!
I’m currently integrating WebView2 in LabVIEW (and also prototyping my own wrapper). In the LabVIEW IDE, on repeated VI runs (run/stop/run), I sporadically get GCHandle/AppDomain-related errors. I’m wondering whether this could be related to how WebView2 is being disposed/teared down.
I noticed that your current “Dispose” path calls CoreWebView2.TrySuspendAsync() but does not call an explicit stop/close/teardown API. I'm wondering what the intention behind this is.
Questions:
- Is it intentional to use
TrySuspendAsync as part of disposal? If yes, what are the reasons? Seeing the WV2 Docs it looks more like a "put it into sleep"-mode.
- For a built EXE: what’s the intended approach for a full teardown? Does LabVIEW simply cleanup by itself and we don't need to do anything?
- Have you ever seen sporadic AppDomain/GCHandle-related errors when repeatedly running/stopping VIs in the IDE? If so, could that be related to why explicit Close()/Dispose is avoided?
Thanks a lot!
(If it helps I can add some documentation around that topic to the Dispose VI after our discussion.)
Hi @kleinsimon ,
awesome work on this Wrapper for WebView2 in LabVIEW!
I’m currently integrating WebView2 in LabVIEW (and also prototyping my own wrapper). In the LabVIEW IDE, on repeated VI runs (run/stop/run), I sporadically get GCHandle/AppDomain-related errors. I’m wondering whether this could be related to how WebView2 is being disposed/teared down.
I noticed that your current “Dispose” path calls
CoreWebView2.TrySuspendAsync()but does not call an explicit stop/close/teardown API. I'm wondering what the intention behind this is.Questions:
TrySuspendAsyncas part of disposal? If yes, what are the reasons? Seeing the WV2 Docs it looks more like a "put it into sleep"-mode.Thanks a lot!
(If it helps I can add some documentation around that topic to the Dispose VI after our discussion.)