WebView2Feedback icon indicating copy to clipboard operation
WebView2Feedback copied to clipboard

[Problem/Bug]: No memory causing WebView2 to crash

Open zprettytext opened this issue 1 year ago • 1 comments

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: image

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

zprettytext avatar May 09 '24 10:05 zprettytext

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 avatar May 10 '24 18:05 lflores-ms

@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:

  1. The problems are all caused by the 64-bit version. According to regulations, there should not be insufficient memory.
  2. We have not received a similar crash dump before. Today we found another crash, the dump is as follows: image

zprettytext avatar May 14 '24 10:05 zprettytext

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 avatar May 17 '24 15:05 yildirimcagri-msft

@yildirimcagri-msft Thank you very much for your reminder. We will carefully confirm the code related to the WebResourceRequested event.

ztextplus avatar May 22 '24 02:05 ztextplus

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.

applefanbois avatar Oct 10 '24 17:10 applefanbois