Ableton crash when deleting WebView2 Window

It seems to be related to this thread I created. Whenever the PluginEditor is destroyed, it automatically destroys all child HWNDs with it, before entering the destructor. This is due to the behavior of the Win32 DestroyWindow function.

Looking at the juce_win32_WebBrowserComponent.cpp on line 657 the CreateCoreWebView2Controller function is called. The documentation of that function says the first argument is the parentWindow the WebView2 should add itself to. So the WebView2 is a HWND child of the PluginEditor HWND, which is then destroyed by DestroyWindow while the JuceVST3Editor invokes removeFromDesktop() on the PluginEditor.

I’ve proposed two solution in my thread for redisplaying the juce::HWNDComponent after the plugineditor is destroyed, and I think those solutions might fix your issue too