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

Windows / desktop_multi_window: Crash when closing app window using Windows close button (X)

Open zathras opened this issue 2 years ago • 5 comments

On windows, including desktop_multi_window causes a crash when attempting to exit the application by clicking on the OS's "close" button (the X in the upper-right hand corner).

Reproduce Steps

  1. flutter create glorp
  2. cd glorp
  3. edit pubspec.yaml, adding "desktop_multi_window: ^0.2.0" in dependencies
  4. flutter run
  5. (pick windows, that is, not edge)
  6. Wait for window to launch/stabilize
  7. Close by clicking on the X in the upper-right corner
  8. Get windows error dialog: "glorp has stopped working. A problem caused the program yada yada yada"

Expected behavior

No windows error dialog

Version (please complete the following information):

  • Flutter Version: 3.7.7
  • OS: Microsoft Windows 10 Home, version 10.0.19044
  • plugin: desktop_multi_window 0.2.0

zathras avatar Mar 10 '23 06:03 zathras

With flutter 3.7.8, this is no longer reproducible. Unclear if this is a Heisenbug, or if Google fixed something in 3.7.8. Their release notes don't mention anything relevant, but that's not determinative.

It would be reasonable to just close this issue at this point, but I'll leave it to you, in case you want to take a look or something.

zathras avatar Mar 25 '23 19:03 zathras

Nope, it's back to crashing with flutter 3.7.11.

zathras avatar Apr 18 '23 18:04 zathras

Can confirm, facing the same issue, unfortunately. @zathras did you find any solution?

pauli2406 avatar Jul 25 '23 15:07 pauli2406

Sorry for later.

Seems already works fine on flutter 3.10.6 now.

Thanks for the report, closing.

boyan01 avatar Aug 09 '23 04:08 boyan01

It is still failing, viz: glorp Flutter doctor output:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.13.2, on Microsoft Windows [Version 10.0.19045.3324], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[X] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.1.6)
[!] Android Studio (not installed)
[√] Connected device (2 available)
[√] Network resources

! Doctor found issues in 3 categories.

zathras avatar Sep 02 '23 07:09 zathras