Bug: Null Reference Exceptions in SetAsyncMethodContinuation() #3402
Open
Description
I'm running into a null reference exception in CoreWebView2PrivateHostObjectHelper. In the debugger I can see where the exception originates:
The stack trace doesn't originate in my code but the code I'm launching from has to do with WebView key handling which no longer works and appears to have been broken. The stacktrace in the debugger shows the main event loop as the source which is likely due to a Dispatcher originated operation in my code.
In my logs, however the error shows up as:
4/17/2023 6:22:49 PM - AppRoot: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Markdown Monster v2.8.15.1
10.0.22621.1.amd64fre.ni_release.220506-1250 - en-US - NET 4.8 - 64 bit
Dell Inc. XPS 15 9520, NVIDIA GeForce RTX 3050 Laptop GPU, hw-acc: True
en-US - en-US
---
WindowsBase
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at StartUp.Main() in D:\projects\MarkdownMonsterCode\MarkdownMonster\Program.cs:line 53
System.AccessViolationException
---------------------------
I'm seeing a ton of these in my application and I suspect they are all hitting this same issue.