flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

[desktop_webview_window v0.2.3] Webview crashes if window is manipulated before fully initializing

Open isaacy13 opened this issue 1 year ago • 2 comments

When the webview window is created, if you press minimize too early the entire application crashes.

Reproduce Steps

Steps to reproduce the behavior:

  1. Open Flutter app
  2. Call WebviewWindow.create
  3. As soon as window opens, press minimize
  4. App crashes

Expected behavior

The window should minimize without crashing

Version (please complete the following information):

  • Flutter 3.22.3, Dart 3.4.4
  • Windows 11 Pro | 23H2 | 22631.3880
  • desktop_webview_window v0.2.3

EXCEPTION_ACCESS_VIOLATION_READ / 0x0

  • webview_window::WebView::UpdateBounds (web_view.cc:202)

note that adding null check resolves issue and everything behaves as expected, haven't delved deep enough to see if has any repercussions

image image

Here's the parameters the webview is initialized with image

isaacy13 avatar Sep 19 '24 23:09 isaacy13

If the window is closed before complete initialization, Webview will also crash

gk-1213 avatar Sep 20 '24 02:09 gk-1213

如果在完成初始化之前关闭窗口,Webview 也会崩溃

image

gk-1213 avatar Sep 20 '24 03:09 gk-1213