MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Bug: Null Reference Exceptions in SetAsyncMethodContinuation()

Open
#3,402 10 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

bug priority-low tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

I'm running into a null reference exception in CoreWebView2PrivateHostObjectHelper. In the debugger I can see where the exception originates:

image

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.

AB#44249026

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.