West Wind WebSurge
Websurge WebView error
Gravatar is a globally recognized avatar based on your email address. Websurge WebView error
  Richard Kaye
  All
  Jan 23, 2025 @ 09:38am

Hi Rick,

I had an idle Websurge session open and had left it alone for a day or two. When I went back to it this dialog came up:

I'm not particularly concerned about it; just passing it on in case you are. Here's the log excerpt:

1/23/2025 1:54:11 PM - Critical - AppDispatcher: The WebView control is no longer valid because the browser process crashed.To work around this, please listen for the CoreWebView2.ProcessFailed event to explicitly manage the lifetime of the WebView2 control in the event of a browser failure.https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.processfailed
The WebView control is no longer valid because the browser process crashed.To work around this, please listen for the CoreWebView2.ProcessFailed event to explicitly manage the lifetime of the WebView2 control in the event of a browser failure.https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.processfailed
WebSurge v3.0.0.65
10.0.19041.1.amd64fre.vb_release.191206-1406 - en-US - NET 4.8 - 64 bit
en-US - en-US    
---
Microsoft.Web.WebView2.Wpf
   at Microsoft.Web.WebView2.Wpf.WebView2Base.get_CoreWebView2()
   at Microsoft.Web.WebView2.Wpf.WebView2.get_CoreWebView2()
   at WebSurge.Controls.PreviewerWebViewHandler.UpdatePreview(HttpRequestData request, String url, Boolean noActivate) in D:\projects\WebSurge2\WebSurge\Controls\PreviewerWebViewHandler.cs:line 297
   at WebSurge.Controls.SessionRequestList.ListRequests_SelectionChanged(Object sender, SelectionChangedEventArgs e) in D:\projects\WebSurge2\WebSurge\Controls\SessionRequestList.xaml.cs:line 93
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.Controls.ListBox.OnSelectionChanged(SelectionChangedEventArgs e)
   at System.Windows.Controls.Primitives.Selector.SelectionChanger.SelectJustThisItem(ItemInfo info, Boolean assumeInItemsCollection)
   at System.Windows.Controls.ListBox.MakeSingleSelection(ListBoxItem listItem)
   at System.Windows.Controls.ListBoxItem.OnMouseLeftButtonDown(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
System.InvalidOperationException
---------------------------
Gravatar is a globally recognized avatar based on your email address. re: Websurge WebView error
  Rick Strahl
  Richard Kaye
  Jan 24, 2025 @ 01:58pm

Yeah I've seen this myself. Apparently there's something in the WebView that dies if it stays running too long. Doesn't happen all the time, but does occasionally.

Not a big deal in WebSurge, since there's typically nothing that gets lost, but also same issue in Help Builder...

There's no way to debug this unfortunately since it's very rare, and it's not reproducible in a meaningful way. The stack traces also don't show anything useful as the WebView external process literally just dies underneath the app.

Seems better in very recent versions of the WebView (I see a lot fewer of these in my user logs) but still occurs from time to time.

+++ Rick ---

© 1996-2025