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

[desktop_webview_window] Create a window and close it immediately, but an error message will appear saying 'Warning: Failed to respond to a message. This is a memory leak. Lost connection to device.'

Open gk-1213 opened this issue 1 year ago • 1 comments

A clear and concise description of what the bug is.

Reproduce Steps

Steps to reproduce the behavior:

  1. await WebviewWindow.create() Create a webview window
  2. Close the window within less than 1 second (presumably before the window is successfully created, click the "x" button on the white screen window to close the window)
  3. The program crashes and reports error 'Warning: Failed to respond to a message. This is a memory leak.'
  4. Simultaneously pop up an error pop-up window image

Expected behavior

Closing the window immediately will not result in an error

Version (please complete the following information):

  • Flutter Version: 3.19.5
  • OS: Windows11
  • plugin: [desktop_webview_window]

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

The detailed log is as follows

[ +142 ms] flutter: args: [web_view_title_bar, 1] [ +900 ms] ../../flutter/shell/platform/embedder/embedder.cc (2472): 'FlutterEngineSendPlatformMessage' returned 'kInvalidArguments'. Invalid engine handle. [ ] Warning: Failed to respond to a message. This is a memory leak. [+2240 ms] Service protocol connection closed. [ +1 ms] Lost connection to device. [ +1 ms] DevFS: Deleting filesystem on the device (file:///C:/Users/%E9%BE%9A%E5%8F%AF/AppData/Local/Temp/exampleb34795ca/example/) [ +265 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed

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