MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: WebView2 control throws OutOfMemoryException on call to EnsureCoreWebView2Async()
@LiangTheDev is already working on this.
Since Jun 13, 2024.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
Our WinUI 3 (WindowsAppSdk) app allows users to navigate to various pages to define a model, compute, and review tabular and graphic outputs. Some of these pages have WebView2 controls on them to show their content. Once we've loaded a WebView2 control 252 times, the 253rd attempt throws an OutOfMemory exception when we call EnsureCoreWebView2Async() when initializing the WebView2 control.
This was tested with the following configurations with the same behavior:
- Windows 10 (10.0.19045), WebView Runtime 125.0.2535.67 and 124.0.2478.109
- Windows 11 (10.0.22631), WebView Runtime 125.0.2535.67
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
125.0.2535.67, 124.0.2478.109
SDK Version
1.0.2210.55
Framework
WinUI3/WinAppSDK
Operating System
Windows 10, Windows 11
OS Version
10.0.19045, 10.0.22631
Repro steps
- Run the attached application's Debug|x86 unpackaged configuration
- Click on a NavigationViewItem to load a page containing a single WebView2 control
- Continue clicking on a NavigationViewItem to load subsequent pages
- Once you start to load the 253rd page, it will crash with an OutOfMemory exception when the page calls the WebView2's EnsureCoreWebView2Async() method.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.