-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Closed
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: desktopRunning on desktopRunning on desktopplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically
Description
Problem
On the master channel, "raw" dart:ui apps without widgets cannot be closed using the x in the title bar:
- Windows - The window remains open
- macOS - The window closes, however, both the app and
flutter rundo not exit. Onstable, the window, app, andflutter runall exit. - Linux - First close attempt does nothing, second close attempt prints the error
** (layers:754): WARNING **: 10:07:23.518: Error returned from System.requestAppExit: Requested method is not implementedand the app exits.
Background
#30735 allowed Flutter apps to listen to application exits using the System.exitApplication handler registered by ServicesBinding. This works as expected for Flutter apps that have widgets.
However, "raw" Flutter apps that use dart:ui directly without widgets don't register a ServicesBinding, and the System.exitApplication handler is never registered. As a result, the embedder's application exit messages aren't processed and the app does not exit.
Reproduction
- Switch to the master channel
- Run the
hello_worldraw layer example on Windows or macOS:- cd
./flutter/examples/layers - If on Windows:
flutter create --platforms=windows . - If on Linux:
flutter create --platforms=linux . flutter run ./raw/hello_world.dart
- cd
- Close the app using the
xbutton on the app's title bar
The app should shutdown, however, it stays open.
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressiona: desktopRunning on desktopRunning on desktopplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-macBuilding on or for macOS specificallyBuilding on or for macOS specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specifically