[Problem/Bug]: No memory causing WebView2 to crash
What happened?
In our 64-bit Native Client, during normal use, a WebView2 error is encountered causing Native Client to crash.
The call stack is as follows:
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
123.0.2320.97
SDK Version
1.0221
Framework
Win32
Operating System
Windows 11
OS Version
No response
Repro steps
During normal use, a WebView2 error is encountered causing Native Client to crash.
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
Hi @zprettytext,
It's hard to tell what happened here from just the stack. It could be the system ran out of memory or something in WebView library. How often does this happen for your app? Are you able to reproduce the issue or identified any particular scenario where this happens? Do you use WebResourceRequested events or send large data through WebView? Can you share a dump?
@lflores-ms We found that starting from WebView2 version 123.0.2320.97, the probability of Out Of Memory in WebView2 has become significantly higher. At present, the company has collected about 5 related crashes. We suspect that the recent changes in WebView2 have introduced a certain BUG for the following reasons:
- The problems are all caused by the 64-bit version. According to regulations, there should not be insufficient memory.
- We have not received a similar crash dump before.
Today we found another crash, the dump is as follows:
It seems you use WebResourceRequested event here to set some response to network requests in WebView. What is the nature of this response, can they be large, are they repeatedly set? Do you see app memory usage gradually increase over usage or whenever the WebResourceRequested is handled in this manner?
@yildirimcagri-msft Thank you very much for your reminder. We will carefully confirm the code related to the WebResourceRequested event.
Our customers report "Insufficient memory to continue the execution of the program." very often, the only thing running in our app is WebView2. The people getting that error only have 8 gig of ram. Does WebView2 require 16 gig of ram to run normally? I had this problem before implementing the WebResourceRequested, so the problem is not related to these functions/events.